gboisse / gfx

A minimalist and easy to use graphics API.
MIT License
498 stars 35 forks source link

Fix Validation errors #109

Closed maoliver-amd closed 6 months ago

maoliver-amd commented 7 months ago

This PR fixes validation errors that occur when enabling SetEnableGPUBasedValidation. These errors are due to kernel parameters being default transitioned to D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE even though the associated kernel was compute/non-pixel shader. Changing to D3D12_RESOURCE_STATE_ALL_SHADER_RESOURCE fixes this for all cases I could find, however, I went 1 step further and set the transition state based on the associated kernel (this last part is in a second commit that can be reverted if desired)