Skip to content

Commit d626dc0

Browse files
dx12::PlatformStructuredBuffer::AsD3D12ShaderResourceView() transition is for all shader stages.
1 parent 6ebae77 commit d626dc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DirectX12/PlatformStructuredBuffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ D3D12_CPU_DESCRIPTOR_HANDLE* PlatformStructuredBuffer::AsD3D12ShaderResourceView
397397

398398
// Check the resource state
399399
bool is_pixel_shader=(deviceContext.contextState.currentEffectPass->shaders[crossplatform::SHADERTYPE_PIXEL]!=nullptr);
400-
D3D12_RESOURCE_STATES readState = is_pixel_shader?D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE:D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE;
400+
D3D12_RESOURCE_STATES readState = is_pixel_shader ? D3D12_RESOURCE_STATE_ALL_SHADER_RESOURCE : D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE;
401401
if (mCurrentState != readState)
402402
{
403403
mRenderPlatform->ResourceTransitionSimple(deviceContext,mGPUBuffer, mCurrentState, readState);

0 commit comments

Comments
 (0)