Skip to content

Commit aedc12a

Browse files
committed
internal/graphicsdriver/directx: bug fix: Go 1.22 + 32bit Windows + DirectX 12 didn't work well
Apparently, a pseudo padding was needed for D3D12_RESOURCE_DESC, but this is still mysterious. This change also add Go 1.22 to the GitHub Actions. Closes #2867
1 parent 256d403 commit aedc12a

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
os: [ubuntu-latest, macos-latest, windows-latest]
10-
go: ['1.18.x', '1.19.x', '1.20.x', '1.21.x']
10+
go: ['1.18.x', '1.19.x', '1.20.x', '1.21.x', '1.22.0-rc.2']
1111
name: Test with Go ${{ matrix.go }} on ${{ matrix.os }}
1212
runs-on: ${{ matrix.os }}
1313
env:

internal/graphicsdriver/directx/api_32bit_windows.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ type _D3D12_RESOURCE_DESC struct {
4040
SampleDesc _DXGI_SAMPLE_DESC
4141
Layout _D3D12_TEXTURE_LAYOUT
4242
Flags _D3D12_RESOURCE_FLAGS
43+
44+
// This is a pseudo padding which D3D12_RESOURCE_DESC1 would use.
45+
// Mysteriously, some functions don't work correctly without this hack (#2867).
46+
_ [12]byte
4347
}
4448

4549
type _D3D12_ROOT_PARAMETER struct {

0 commit comments

Comments
 (0)