mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Remove cubemap binding from D3D/HLSL texture view. Just use 2D array
This commit is contained in:
@@ -162,7 +162,7 @@ D3D11 / HLSL
|
||||
#. Depth + Stencil
|
||||
#. Depth (Multisampled)
|
||||
#. Depth + Stencil (Multisampled)
|
||||
#. Cubemap
|
||||
#. Legacy: used to be cubemap, removed as it's unused
|
||||
#. 2D texture (Multisampled)
|
||||
|
||||
OpenGL / GLSL
|
||||
@@ -214,7 +214,6 @@ D3D11 / HLSL
|
||||
Texture2DArray<uint2> texDisplayTexStencilArray : register(t5);
|
||||
Texture2DMSArray<float2> texDisplayTexDepthMSArray : register(t6);
|
||||
Texture2DMSArray<uint2> texDisplayTexStencilMSArray : register(t7);
|
||||
Texture2DArray<float4> texDisplayTexCubeArray : register(t8);
|
||||
Texture2DMSArray<float4> texDisplayTex2DMSArray : register(t9);
|
||||
|
||||
Texture1DArray<uint4> texDisplayUIntTex1DArray : register(t11);
|
||||
|
||||
@@ -125,7 +125,6 @@ cbuffer HistogramCBufferData REG(b0)
|
||||
#define RESTYPE_DEPTH_STENCIL 0x5
|
||||
#define RESTYPE_DEPTH_MS 0x6
|
||||
#define RESTYPE_DEPTH_STENCIL_MS 0x7
|
||||
#define RESTYPE_CUBE 0x8
|
||||
#define RESTYPE_TEX2D_MS 0x9
|
||||
|
||||
#define MESHDISPLAY_SOLID 0x1
|
||||
|
||||
@@ -42,7 +42,6 @@ Texture2DArray<float2> texDisplayTexDepthArray : register(t4);
|
||||
Texture2DArray<uint2> texDisplayTexStencilArray : register(t5);
|
||||
Texture2DMSArray<float2> texDisplayTexDepthMSArray : register(t6);
|
||||
Texture2DMSArray<uint2> texDisplayTexStencilMSArray : register(t7);
|
||||
Texture2DArray<float4> texDisplayTexCubeArray : register(t8);
|
||||
Texture2DMSArray<float4> texDisplayTex2DMSArray : register(t9);
|
||||
|
||||
Texture1DArray<uint4> texDisplayUIntTex1DArray : register(t11);
|
||||
|
||||
@@ -731,6 +731,9 @@ bool D3D11DebugManager::InitDebugRendering()
|
||||
|
||||
for(int t = eTexType_1D; t < eTexType_Max; t++)
|
||||
{
|
||||
if(t == eTexType_Unused)
|
||||
continue;
|
||||
|
||||
// float, uint, sint
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
@@ -2707,7 +2710,6 @@ D3D11DebugManager::TextureShaderDetails D3D11DebugManager::GetShaderDetails(
|
||||
|
||||
bool msaaDepth = false;
|
||||
|
||||
bool cube = false;
|
||||
DXGI_FORMAT srvFormat = DXGI_FORMAT_UNKNOWN;
|
||||
|
||||
if(WrappedID3D11Texture1D::m_TextureList.find(id) != WrappedID3D11Texture1D::m_TextureList.end())
|
||||
@@ -2781,9 +2783,6 @@ D3D11DebugManager::TextureShaderDetails D3D11DebugManager::GetShaderDetails(
|
||||
D3D11_TEXTURE2D_DESC desc2d = {0};
|
||||
wrapTex2D->GetDesc(&desc2d);
|
||||
|
||||
if(desc2d.MiscFlags & D3D11_RESOURCE_MISC_TEXTURECUBE)
|
||||
cube = true;
|
||||
|
||||
details.texFmt = desc2d.Format;
|
||||
details.texWidth = desc2d.Width;
|
||||
details.texHeight = desc2d.Height;
|
||||
@@ -2957,12 +2956,6 @@ D3D11DebugManager::TextureShaderDetails D3D11DebugManager::GetShaderDetails(
|
||||
srvDesc[eTexType_3D].Texture3D.MipLevels = details.texMips;
|
||||
srvDesc[eTexType_3D].Texture3D.MostDetailedMip = 0;
|
||||
|
||||
srvDesc[eTexType_Cube].ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBEARRAY;
|
||||
srvDesc[eTexType_Cube].TextureCubeArray.First2DArrayFace = 0;
|
||||
srvDesc[eTexType_Cube].TextureCubeArray.MipLevels = details.texMips;
|
||||
srvDesc[eTexType_Cube].TextureCubeArray.MostDetailedMip = 0;
|
||||
srvDesc[eTexType_Cube].TextureCubeArray.NumCubes = RDCMAX(1U, details.texArraySize / 6);
|
||||
|
||||
for(int i = 0; i < eTexType_Max; i++)
|
||||
srvDesc[i].Format = srvFormat;
|
||||
|
||||
@@ -3064,22 +3057,6 @@ D3D11DebugManager::TextureShaderDetails D3D11DebugManager::GetShaderDetails(
|
||||
details.srv[eTexType_StencilMS] = cache.srv[1];
|
||||
}
|
||||
|
||||
if((details.texType == eTexType_2D || details.texType == eTexType_Depth ||
|
||||
details.texType == eTexType_Stencil) &&
|
||||
cube)
|
||||
{
|
||||
if(!cache.created)
|
||||
{
|
||||
hr = m_pDevice->CreateShaderResourceView(details.srvResource, &srvDesc[eTexType_Cube],
|
||||
&cache.srv[2]);
|
||||
|
||||
if(FAILED(hr))
|
||||
RDCERR("Failed to create cache SRV 2 %08x", hr);
|
||||
}
|
||||
|
||||
details.srv[eTexType_Cube] = cache.srv[2];
|
||||
}
|
||||
|
||||
cache.created = true;
|
||||
|
||||
return details;
|
||||
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
eTexType_Stencil,
|
||||
eTexType_DepthMS,
|
||||
eTexType_StencilMS,
|
||||
eTexType_Cube,
|
||||
eTexType_Unused, // removed, kept just to keep slots the same
|
||||
eTexType_2DMS,
|
||||
eTexType_Max
|
||||
};
|
||||
@@ -261,7 +261,7 @@ private:
|
||||
CacheElem(ResourceId id_, FormatComponentType typeHint_, bool raw_)
|
||||
: created(false), id(id_), typeHint(typeHint_), raw(raw_), srvResource(NULL)
|
||||
{
|
||||
srv[0] = srv[1] = srv[2] = NULL;
|
||||
srv[0] = srv[1] = NULL;
|
||||
}
|
||||
|
||||
void Release()
|
||||
@@ -269,7 +269,6 @@ private:
|
||||
SAFE_RELEASE(srvResource);
|
||||
SAFE_RELEASE(srv[0]);
|
||||
SAFE_RELEASE(srv[1]);
|
||||
SAFE_RELEASE(srv[2]);
|
||||
}
|
||||
|
||||
bool created;
|
||||
@@ -277,7 +276,7 @@ private:
|
||||
FormatComponentType typeHint;
|
||||
bool raw;
|
||||
ID3D11Resource *srvResource;
|
||||
ID3D11ShaderResourceView *srv[3];
|
||||
ID3D11ShaderResourceView *srv[2];
|
||||
};
|
||||
|
||||
static const int NUM_CACHED_SRVS = 64;
|
||||
|
||||
@@ -2192,7 +2192,6 @@ namespace renderdocui.Windows
|
||||
"Texture2DArray<uint2> texDisplayTexStencilArray : register(t5);" + Environment.NewLine +
|
||||
"Texture2DMSArray<float2> texDisplayTexDepthMSArray : register(t6);" + Environment.NewLine +
|
||||
"Texture2DMSArray<uint2> texDisplayTexStencilMSArray : register(t7);" + Environment.NewLine +
|
||||
"Texture2DArray<float4> texDisplayTexCubeArray : register(t8);" + Environment.NewLine +
|
||||
"Texture2DMSArray<float4> texDisplayTex2DMSArray : register(t9);" + Environment.NewLine +
|
||||
"" + Environment.NewLine +
|
||||
"Texture1DArray<uint4> texDisplayUIntTex1DArray : register(t11);" + Environment.NewLine +
|
||||
|
||||
Reference in New Issue
Block a user