8000 Disable SetShadingRate when not supported. by bostelk · Pull Request #30 · electronicarts/gigi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Disable SetShadingRate when not supported. #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

bostelk
Copy link
Contributor
@bostelk bostelk commented Mar 26, 2025

Hi Alan,

I tracked down the issue where ModelViewer.gg was causing my viewer to hang. I had run a development build through Visual Studio to get the D3D12 error messages. The short of it is that my system does not support variable-rate shading. I'm a little surprised ... I'm on Windows version 10.0.19045 Build 19045 which should be higher than version 1903. That said, my graphics device (a Radeon RX 570) is dated.

I was able to disable the sparse sampling path to render the bunny. I'm not sure what optional capabilities looks like in Gigi or whether it's desirable but I figure it's worth sharing if there are others limited by such an issue.

Kind regards, Kyle.

Screenshot

image

Output

D3D12 ERROR: ID3D12CommandList::RSSetShadingRate: Setting the shading rate requires D3D12_VARIABLE_SHADING_RATE_TIER_1 or higher. [ EXECUTION ERROR #1237: RSSETSHADINGRATE_REQUIRES_TIER_1]
D3D12 ERROR: ID3D12CommandList::RSSetShadingRate: Setting the shading rate requires D3D12_VARIABLE_SHADING_RATE_TIER_1 or higher. [ EXECUTION ERROR #1237: RSSETSHADINGRATE_REQUIRES_TIER_1]
D3D12 ERROR: ID3D12CommandList::RSSetShadingRateImage: Setting the shading rate image requires D3D12_VARIABLE_SHADING_RATE_TIER_2 or higher. [ EXECUTION ERROR #1236: RSSETSHADINGRATEIMAGE_REQUIRES_TIER_2]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Command lists must be successfully closed before execution. [ EXECUTION ERROR #838: EXECUTECOMMANDLISTS_FAILEDCOMMANDLIST]
Exception thrown at 0x00007FFBA5D8B699 in GigiViewerDX12.exe: Microsoft C++ exception: _com_error at memory location 0x000000CD863DE900.
D3D12: Removing Device.
D3D12 ERROR: ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_INVALID_CALL: There is strong evidence that the application has performed an illegal or undefined operation, and such a condition could not be returned to the application cleanly through a return code). [ EXECUTION ERROR #232: DEVICE_REMOVAL_PROCESS_AT_FAULT]
D3D12 ERROR: ID3D12GraphicsCommandList::*: This API cannot be called on a closed command list. [ EXECUTION ERROR #547: COMMAND_LIST_CLOSED]
...
Exception thrown at 0x00007FFBA5D8B699 in GigiViewerDX12.exe: Microsoft C++ exception: _com_error at memory location 0x000000CD863DC748.
...
D3D12 ERROR: ID3D12GraphicsCommandList::*: This API cannot be called on a closed command list. [ EXECUTION ERROR #547: COMMAND_LIST_CLOSED]
...
Exception thrown at 0x00007FFBA5D8B699 in GigiViewerDX12.exe: Microsoft C++ exception: _com_error at memory location 0x000000CD863DD6B8.
...
D3D12 ERROR: ID3D12GraphicsCommandList::*: This API cannot be called on a closed command list. [ EXECUTION ERROR #547: COMMAND_LIST_CLOSED]
...
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using CopyTextureRegion on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Resource state (0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE) of resource (0x000002263841E040:'ColorF32 Initial State') (subresource: 0) is invalid for use as a destination resource.  Expected State Bits (all): 0x400: D3D12_RESOURCE_STATE_COPY_DEST, Actual State: 0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE, Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using CopyResource on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Resource state (0x8: D3D12_RESOURCE_STATE_UNORDERED_ACCESS) of resource (0x0000022637ABD490:'ColorF32') (subresource: 0) is invalid for use as a destination resource.  Expected State Bits (all): 0x400: D3D12_RESOURCE_STATE_COPY_DEST, Actual State: 0x8: D3D12_RESOURCE_STATE_UNORDERED_ACCESS, Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using CopyTextureRegion on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Resource state (0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE) of resource (0x0000022637ABE170:'Depth Initial State') (subresource: 0) is invalid for use as a destination resource.  Expected State Bits (all): 0x400: D3D12_RESOURCE_STATE_COPY_DEST, Actual State: 0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE, Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using CopyResource on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Resource state (0x40: D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE) of resource (0x000002262A736640:'Depth') (subresource: 0) is invalid for use as a destination resource.  Expected State Bits (all): 0x400: D3D12_RESOURCE_STATE_COPY_DEST, Actual State: 0x40: D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE, Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using CopyTextureRegion on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Resource state (0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE) of resource (0x000002262A609160:'ColorU8sRGB Initial State') (subresource: 0) is invalid for use as a destination resource.  Expected State Bits (all): 0x400: D3D12_RESOURCE_STATE_COPY_DEST, Actual State: 0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE, Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using CopyResource on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Resource state (0x4: D3D12_RESOURCE_STATE_RENDER_TARGET) of resource (0x000002262A609E40:'ColorU8sRGB') (subresource: 0) is invalid for use as a destination resource.  Expected State Bits (all): 0x400: D3D12_RESOURCE_STATE_COPY_DEST, Actual State: 0x4: D3D12_RESOURCE_STATE_RENDER_TARGET, Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using CopyTextureRegion on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Resource state (0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE) of resource (0x000002262A62D590:'_loadedTexture_0 Initial State') (subresource: 0) is invalid for use as a destination resource.  Expected State Bits (all): 0x400: D3D12_RESOURCE_STATE_COPY_DEST, Actual State: 0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE, Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using CopyResource on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Resource state (0x40: D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE) of resource (0x00000226320E6640:'_loadedTexture_0') (subresource: 0) is invalid for use as a destination resource.  Expected State Bits (all): 0x400: D3D12_RESOURCE_STATE_COPY_DEST, Actual State: 0x40: D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE, Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using ResourceBarrier on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Before state (0x400: D3D12_RESOURCE_STATE_COPY_DEST) of resource (0x0000022637ABD490:'ColorF32') (subresource: 0) specified by transition barrier does not match with the state (0x8: D3D12_RESOURCE_STATE_UNORDERED_ACCESS) specified in preceding ResourceBarrier or as InitialState [ RESOURCE_MANIPULATION ERROR #527: RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using ResourceBarrier on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Before state (0x400: D3D12_RESOURCE_STATE_COPY_DEST) of resource (0x0000022637ABE170:'Depth Initial State') (subresource: 0) specified by transition barrier does not match with the state (0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE) specified in preceding ResourceBarrier or as InitialState [ RESOURCE_MANIPULATION ERROR #527: RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using ResourceBarrier on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Before state (0x400: D3D12_RESOURCE_STATE_COPY_DEST) of resource (0x000002263841E040:'ColorF32 Initial State') (subresource: 0) specified by transition barrier does not match with the state (0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE) specified in preceding ResourceBarrier or as InitialState [ RESOURCE_MANIPULATION ERROR #527: RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using ResourceBarrier on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Before state (0x400: D3D12_RESOURCE_STATE_COPY_DEST) of resource (0x000002262A736640:'Depth') (subresource: 0) specified by transition barrier does not match with the state (0x40: D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE) specified in preceding ResourceBarrier or as InitialState [ RESOURCE_MANIPULATION ERROR #527: RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using ResourceBarrier on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Before state (0x400: D3D12_RESOURCE_STATE_COPY_DEST) of resource (0x000002262A609160:'ColorU8sRGB Initial State') (subresource: 0) specified by transition barrier does not match with the state (0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE) specified in preceding ResourceBarrier or as InitialState [ RESOURCE_MANIPULATION ERROR #527: RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using ResourceBarrier on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Before state (0x400: D3D12_RESOURCE_STATE_COPY_DEST) of resource (0x000002262A609E40:'ColorU8sRGB') (subresource: 0) specified by transition barrier does not match with the state (0x4: D3D12_RESOURCE_STATE_RENDER_TARGET) specified in preceding ResourceBarrier or as InitialState [ RESOURCE_MANIPULATION ERROR #527: RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using ResourceBarrier on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Before state (0x400: D3D12_RESOURCE_STATE_COPY_DEST) of resource (0x000002262A62D590:'_loadedTexture_0 Initial State') (subresource: 0) specified by transition barrier does not match with the state (0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE) specified in preceding ResourceBarrier or as InitialState [ RESOURCE_MANIPULATION ERROR #527: RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using ResourceBarrier on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Before state (0x400: D3D12_RESOURCE_STATE_COPY_DEST) of resource (0x00000226320E6640:'_loadedTexture_0') (subresource: 0) specified by transition barrier does not match with the state (0x40: D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE) specified in preceding ResourceBarrier or as InitialState [ RESOURCE_MANIPULATION ERROR #527: RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Command lists must be successfully closed before execution. [ EXECUTION ERROR #838: EXECUTECOMMANDLISTS_FAILEDCOMMANDLIST]
Exception thrown at 0x00007FFBA5D8B699 in GigiViewerDX12.exe: Microsoft C++ exception: _com_error at memory location 0x000000CD863DE900.
D3D12 ERROR: ID3D12GraphicsCommandList::*: This API cannot be called on a closed command list. [ EXECUTION ERROR #547: COMMAND_LIST_CLOSED]
...
Exception thrown at 0x00007FFBA5D8B699 in GigiViewerDX12.exe: Microsoft C++ exception: _com_error at memory location 0x000000CD863DC748.
...
D3D12 ERROR: ID3D12GraphicsCommandList::*: This API cannot be called on a closed command list. [ EXECUTION ERROR #547: COMMAND_LIST_CLOSED]
...
Exception thrown at 0x00007FFBA5D8B699 in GigiViewerDX12.exe: Microsoft C++ exception: _com_error at memory location 0x000000CD863DE618.
D3D12 ERROR: ID3D12GraphicsCommandList::*: This API cannot be called on a closed command list. [ EXECUTION ERROR #547: COMMAND_LIST_CLOSED]
...
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using CopyTextureRegion on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Resource state (0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE) of resource (0x000002263841E040:'ColorF32 Initial State') (subresource: 0) is invalid for use as a destination resource.  Expected State Bits (all): 0x400: D3D12_RESOURCE_STATE_COPY_DEST, Actual State: 0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE, Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using CopyTextureRegion on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Resource state (0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE) of resource (0x0000022637ABE170:'Depth Initial State') (subresource: 0) is invalid for use as a destination resource.  Expected State Bits (all): 0x400: D3D12_RESOURCE_STATE_COPY_DEST, Actual State: 0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE, Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using CopyTextureRegion on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Resource state (0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE) of resource (0x000002262A609160:'ColorU8sRGB Initial State') (subresource: 0) is invalid for use as a destination resource.  Expected State Bits (all): 0x400: D3D12_RESOURCE_STATE_COPY_DEST, Actual State: 0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE, Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using CopyTextureRegion on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Resource state (0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE) of resource (0x000002262A62D590:'_loadedTexture_0 Initial State') (subresource: 0) is invalid for use as a destination resource.  Expected State Bits (all): 0x400: D3D12_RESOURCE_STATE_COPY_DEST, Actual State: 0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE, Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using CopyResource on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Resource state (0x40: D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE) of resource (0x00000226320E6640:'_loadedTexture_0') (subresource: 0) is invalid for use as a destination resource.  Expected State Bits (all): 0x400: D3D12_RESOURCE_STATE_COPY_DEST, Actual State: 0x40: D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE, Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using ResourceBarrier on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Before state (0x400: D3D12_RESOURCE_STATE_COPY_DEST) of resource (0x0000022637ABE170:'Depth Initial State') (subresource: 0) specified by transition barrier does not match with the state (0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE) specified in preceding ResourceBarrier or as InitialState [ RESOURCE_MANIPULATION ERROR #527: RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using ResourceBarrier on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Before state (0x400: D3D12_RESOURCE_STATE_COPY_DEST) of resource (0x000002263841E040:'ColorF32 Initial State') (subresource: 0) specified by transition barrier does not match with the state (0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE) specified in preceding ResourceBarrier or as InitialState [ RESOURCE_MANIPULATION ERROR #527: RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using ResourceBarrier on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Before state (0x400: D3D12_RESOURCE_STATE_COPY_DEST) of resource (0x000002262A609160:'ColorU8sRGB Initial State') (subresource: 0) specified by transition barrier does not match with the state (0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE) specified in preceding ResourceBarrier or as InitialState [ RESOURCE_MANIPULATION ERROR #527: RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using ResourceBarrier on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Before state (0x400: D3D12_RESOURCE_STATE_COPY_DEST) of resource (0x000002262A62D590:'_loadedTexture_0 Initial State') (subresource: 0) specified by transition barrier does not match with the state (0x80: D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE) specified in preceding ResourceBarrier or as InitialState [ RESOURCE_MANIPULATION ERROR #527: RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using ResourceBarrier on Command List (0x000002267C6B5860:'Unnamed ID3D12GraphicsCommandList Object'): Before state (0x400: D3D12_RESOURCE_STATE_COPY_DEST) of resource (0x00000226320E6640:'_loadedTexture_0') (subresource: 0) specified by transition barrier does not match with the state (0x40: D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE) specified in preceding ResourceBarrier or as InitialState [ RESOURCE_MANIPULATION ERROR #527: RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH]
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Command lists must be successfully closed before execution. [ EXECUTION ERROR #838: EXECUTECOMMANDLISTS_FAILEDCOMMANDLIST]
Exception thrown at 0x00007FFBA5D8B699 in GigiViewerDX12.exe: Microsoft C++ exception: _com_error at memory location 0x000000CD863DE900.

@Atrix256
Copy link
Contributor

Looks great, thanks a lot!
This will go out in the next release.

@Atrix256 Atrix256 merged commit 627ca45 into electronicarts:main Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0