Remove implicit state transitions for readonly wrappers
このコミットが含まれているのは:
1 親
1b5a96aaf5
コミット
9c9b28fd7f
3ファイル変更
+1
-13
検索条件に一致するファイルはありません
@@ -602,13 +602,6 @@ public unsafe abstract class Texture2D<T> : NativeObject, IGraphicsResource, Gra
|
||||
D3D12_RESOURCE_STATES d3D12ResourceStatesBefore = this.d3D12ResourceState;
|
||||
D3D12_RESOURCE_STATES d3D12ResourceStatesAfter = ResourceStateHelper.GetD3D12ResourceStates(resourceState);
|
||||
|
||||
// If the original state is COMMON, at the point where the transition is inserted into a ComputeContext the resource
|
||||
// would have already been implicitly promoted to be NON_PIXEL_SHADER_RESOURCE. Because of this, adjust this transition.
|
||||
if (d3D12ResourceStatesBefore == D3D12_RESOURCE_STATE_COMMON)
|
||||
{
|
||||
d3D12ResourceStatesBefore = D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE;
|
||||
}
|
||||
|
||||
this.d3D12ResourceState = d3D12ResourceStatesAfter;
|
||||
|
||||
d3D12Resource = D3D12Resource;
|
||||
|
||||
@@ -655,11 +655,6 @@ public unsafe abstract class Texture3D<T> : NativeObject, IGraphicsResource, Gra
|
||||
D3D12_RESOURCE_STATES d3D12ResourceStatesBefore = this.d3D12ResourceState;
|
||||
D3D12_RESOURCE_STATES d3D12ResourceStatesAfter = ResourceStateHelper.GetD3D12ResourceStates(resourceState);
|
||||
|
||||
if (d3D12ResourceStatesBefore == D3D12_RESOURCE_STATE_COMMON)
|
||||
{
|
||||
d3D12ResourceStatesBefore = D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE;
|
||||
}
|
||||
|
||||
this.d3D12ResourceState = d3D12ResourceStatesAfter;
|
||||
|
||||
d3D12Resource = D3D12Resource;
|
||||
|
||||
@@ -20,7 +20,7 @@ internal static class ResourceStateHelper
|
||||
{
|
||||
if (resourceState == ResourceState.ReadOnly)
|
||||
{
|
||||
return D3D12_RESOURCE_STATE_COMMON;
|
||||
return D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE;
|
||||
}
|
||||
|
||||
if (resourceState == ResourceState.ReadWrite)
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする