DX12: change type of "level" to u32

This commit is contained in:
oltolm authored and lightningterror committed 2026-02-19 14:17:30 +01:00
1 parent 848a9fd551
commit e8ba3653ee
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -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<u32>(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];
+1 -1
View File
@@ -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.