diff --git a/src/xenia/gpu/d3d12/d3d12_command_processor.cc b/src/xenia/gpu/d3d12/d3d12_command_processor.cc index 57bf8cfeb..1bff38c60 100644 --- a/src/xenia/gpu/d3d12/d3d12_command_processor.cc +++ b/src/xenia/gpu/d3d12/d3d12_command_processor.cc @@ -1199,7 +1199,7 @@ bool D3D12CommandProcessor::SetupContext() { ui::d3d12::util::FillBufferResourceDesc( gamma_ramp_buffer_desc, (256 + 128 * 3) * 4, D3D12_RESOURCE_FLAG_NONE); // The first action will be uploading. - gamma_ramp_buffer_state_ = D3D12_RESOURCE_STATE_COPY_DEST; + gamma_ramp_buffer_state_ = D3D12_RESOURCE_STATE_COMMON; if (FAILED(device->CreateCommittedResource( &ui::d3d12::util::kHeapPropertiesDefault, heap_flag_create_not_zeroed, &gamma_ramp_buffer_desc, gamma_ramp_buffer_state_, nullptr, diff --git a/src/xenia/gpu/d3d12/d3d12_primitive_processor.cc b/src/xenia/gpu/d3d12/d3d12_primitive_processor.cc index f65379ea3..4a80d627b 100644 --- a/src/xenia/gpu/d3d12/d3d12_primitive_processor.cc +++ b/src/xenia/gpu/d3d12/d3d12_primitive_processor.cc @@ -100,7 +100,7 @@ bool D3D12PrimitiveProcessor::InitializeBuiltinIndexBuffer( if (FAILED(device->CreateCommittedResource( &ui::d3d12::util::kHeapPropertiesDefault, provider.GetHeapFlagCreateNotZeroed(), &resource_desc, - D3D12_RESOURCE_STATE_COPY_DEST, nullptr, + D3D12_RESOURCE_STATE_COMMON, nullptr, IID_PPV_ARGS(&draw_resource)))) { XELOGE( "D3D12 primitive processor: Failed to create the built-in index " diff --git a/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc b/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc index 767cd587b..f405a5e49 100644 --- a/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc +++ b/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc @@ -263,7 +263,7 @@ bool D3D12RenderTargetCache::Initialize() { D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS); // The first operation will likely be depth self-comparison with host render // targets or drawing with ROV. - edram_buffer_state_ = D3D12_RESOURCE_STATE_UNORDERED_ACCESS; + edram_buffer_state_ = D3D12_RESOURCE_STATE_COMMON; // Creating zeroed for stable initial value with ROV (though on a real // console it has to be cleared anyway probably) and not to leak irrelevant // data to trace dumps when not covered by host render targets entirely. diff --git a/src/xenia/gpu/d3d12/d3d12_texture_cache.cc b/src/xenia/gpu/d3d12/d3d12_texture_cache.cc index b2d37f94b..2f1bd3ce6 100644 --- a/src/xenia/gpu/d3d12/d3d12_texture_cache.cc +++ b/src/xenia/gpu/d3d12/d3d12_texture_cache.cc @@ -1490,8 +1490,7 @@ bool D3D12TextureCache::LoadTextureDataFromResidentMemoryImpl(Texture& texture, level_host_slice_size; copy_buffer_size += level_host_slice_size * array_size; } - D3D12_RESOURCE_STATES copy_buffer_state = - D3D12_RESOURCE_STATE_UNORDERED_ACCESS; + D3D12_RESOURCE_STATES copy_buffer_state = D3D12_RESOURCE_STATE_COMMON; ID3D12Resource* copy_buffer = command_processor_.RequestScratchGPUBuffer( uint32_t(copy_buffer_size), copy_buffer_state); if (copy_buffer == nullptr) { @@ -1687,7 +1686,7 @@ bool D3D12TextureCache::LoadTextureDataFromResidentMemoryImpl(Texture& texture, } std::memcpy(cbuffer_mapping, &load_constants, sizeof(load_constants)); command_list.D3DSetComputeRootConstantBufferView(0, cbuffer_gpu_address); - assert_true(copy_buffer_state == D3D12_RESOURCE_STATE_UNORDERED_ACCESS); + assert_true(copy_buffer_state == D3D12_RESOURCE_STATE_COMMON); command_processor_.SubmitBarriers(); command_list.D3DDispatch(group_count_x, group_count_y, load_constants.size_blocks[2]);