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
This commit is contained in:
Hajime Hoshi 2024-01-27 17:44:29 +09:00
parent 8c8802f471
commit 770fcff4c2
2 changed files with 5 additions and 1 deletions

View File

@ -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:

View File

@ -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 {