[D3D12] Submit barriers before uploading gamma ramp

This commit is contained in:
Triang3l 2018-10-08 19:42:02 +03:00
parent fccebae703
commit 6a6e63060b
1 changed files with 2 additions and 0 deletions

View File

@ -892,6 +892,7 @@ void D3D12CommandProcessor::PerformSwap(uint32_t frontbuffer_ptr,
PushTransitionBarrier(gamma_ramp_texture_, gamma_ramp_texture_state_, PushTransitionBarrier(gamma_ramp_texture_, gamma_ramp_texture_state_,
D3D12_RESOURCE_STATE_COPY_DEST); D3D12_RESOURCE_STATE_COPY_DEST);
gamma_ramp_texture_state_ = D3D12_RESOURCE_STATE_COPY_DEST; gamma_ramp_texture_state_ = D3D12_RESOURCE_STATE_COPY_DEST;
SubmitBarriers();
D3D12_TEXTURE_COPY_LOCATION location_source, location_dest; D3D12_TEXTURE_COPY_LOCATION location_source, location_dest;
location_source.pResource = gamma_ramp_upload_; location_source.pResource = gamma_ramp_upload_;
location_source.Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT; location_source.Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT;
@ -916,6 +917,7 @@ void D3D12CommandProcessor::PerformSwap(uint32_t frontbuffer_ptr,
PushTransitionBarrier(gamma_ramp_texture_, gamma_ramp_texture_state_, PushTransitionBarrier(gamma_ramp_texture_, gamma_ramp_texture_state_,
D3D12_RESOURCE_STATE_COPY_DEST); D3D12_RESOURCE_STATE_COPY_DEST);
gamma_ramp_texture_state_ = D3D12_RESOURCE_STATE_COPY_DEST; gamma_ramp_texture_state_ = D3D12_RESOURCE_STATE_COPY_DEST;
SubmitBarriers();
D3D12_TEXTURE_COPY_LOCATION location_source, location_dest; D3D12_TEXTURE_COPY_LOCATION location_source, location_dest;
location_source.pResource = gamma_ramp_upload_; location_source.pResource = gamma_ramp_upload_;
location_source.Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT; location_source.Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT;