From e8ba3653eedfcfddce3a71709cd1e0ca35c4083f Mon Sep 17 00:00:00 2001 From: oltolm Date: Wed, 21 Jan 2026 18:16:30 +0100 Subject: [PATCH] DX12: change type of "level" to u32 --- pcsx2/GS/Renderers/DX12/GSTexture12.cpp | 4 ++-- pcsx2/GS/Renderers/DX12/GSTexture12.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pcsx2/GS/Renderers/DX12/GSTexture12.cpp b/pcsx2/GS/Renderers/DX12/GSTexture12.cpp index bd96b85378..b885d82d79 100644 --- a/pcsx2/GS/Renderers/DX12/GSTexture12.cpp +++ b/pcsx2/GS/Renderers/DX12/GSTexture12.cpp @@ -817,7 +817,7 @@ void GSTexture12::TransitionToState(const D3D12CommandList& cmdlist, ResourceSta m_resource_state = state; } -void GSTexture12::TransitionSubresourceToState(const D3D12CommandList& cmdlist, int level, +void GSTexture12::TransitionSubresourceToState(const D3D12CommandList& cmdlist, u32 level, ResourceState before_state, ResourceState after_state) const { if (GSDevice12::GetInstance()->UseEnhancedBarriers()) @@ -829,7 +829,7 @@ void GSTexture12::TransitionSubresourceToState(const D3D12CommandList& cmdlist, D3D12_TEXTURE_BARRIER barriers[2] = {{D3D12_BARRIER_SYNC_NONE, D3D12_BARRIER_SYNC_NONE, D3D12_BARRIER_ACCESS_COMMON, D3D12_BARRIER_ACCESS_COMMON, D3D12_BARRIER_LAYOUT_COMMON, D3D12_BARRIER_LAYOUT_COMMON, - m_resource.get(), {static_cast(level), 0, 0, 0, 0, 0}, D3D12_TEXTURE_BARRIER_FLAG_NONE}}; + m_resource.get(), {level, 0, 0, 0, 0, 0}, D3D12_TEXTURE_BARRIER_FLAG_NONE}}; uint num_barriers = 1; D3D12_TEXTURE_BARRIER& barrier = barriers[0]; diff --git a/pcsx2/GS/Renderers/DX12/GSTexture12.h b/pcsx2/GS/Renderers/DX12/GSTexture12.h index 7ed880f81d..14139931c7 100644 --- a/pcsx2/GS/Renderers/DX12/GSTexture12.h +++ b/pcsx2/GS/Renderers/DX12/GSTexture12.h @@ -74,7 +74,7 @@ public: void Destroy(bool defer = true); void TransitionToState(const D3D12CommandList&, ResourceState state); - void TransitionSubresourceToState(const D3D12CommandList& cmdlist, int level, ResourceState before_state, + void TransitionSubresourceToState(const D3D12CommandList& cmdlist, u32 level, ResourceState before_state, ResourceState after_state) const; // Call when the texture is bound to the pipeline, or read from in a copy.