Skip to content

Commit

Permalink
Do not transition D3D12_RESOURCE_STATE_GENERIC_READ resources some mo…
Browse files Browse the repository at this point in the history
…re because D3D told me that's no good
  • Loading branch information
RobDangerous committed Sep 25, 2024
1 parent 20fa12a commit 3b58a72
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void kope_d3d12_descriptor_set_set_sampler(kope_g5_device *device, kope_d3d12_de
}

void kope_d3d12_descriptor_set_prepare_cbv_buffer(kope_g5_command_list *list, kope_g5_buffer *buffer) {
if (buffer->d3d12.resource_state != D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER) {
if (buffer->d3d12.resource_state != D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER && buffer->d3d12.resource_state != D3D12_RESOURCE_STATE_GENERIC_READ) {
D3D12_RESOURCE_BARRIER barrier;
barrier.Transition.pResource = buffer->d3d12.resource;
barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
Expand Down

0 comments on commit 3b58a72

Please sign in to comment.