Skip to content

Commit

Permalink
internal/graphicsdriver/directx: bug fix: Go 1.22 + 32bit Windows + D…
Browse files Browse the repository at this point in the history
…irectX 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
  • Loading branch information
hajimehoshi committed Jan 27, 2024
1 parent 256d403 commit aedc12a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: ['1.18.x', '1.19.x', '1.20.x', '1.21.x']
go: ['1.18.x', '1.19.x', '1.20.x', '1.21.x', '1.22.0-rc.2']
name: Test with Go ${{ matrix.go }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
Expand Down
4 changes: 4 additions & 0 deletions internal/graphicsdriver/directx/api_32bit_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ type _D3D12_RESOURCE_DESC struct {
SampleDesc _DXGI_SAMPLE_DESC
Layout _D3D12_TEXTURE_LAYOUT
Flags _D3D12_RESOURCE_FLAGS

// This is a pseudo padding which D3D12_RESOURCE_DESC1 would use.
// Mysteriously, some functions don't work correctly without this hack (#2867).
_ [12]byte
}

type _D3D12_ROOT_PARAMETER struct {
Expand Down

0 comments on commit aedc12a

Please sign in to comment.