mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Use view format instead of resource format for Vulkan
* Since the Vulkan views are tighter and more strictly specified, we can always safely use the view format (in the non-mutable case it must exactly match the underlying resource's format).
This commit is contained in:
@@ -71,6 +71,7 @@ struct VulkanPipelineState
|
||||
bool32 customSamplerName;
|
||||
|
||||
// image views
|
||||
ResourceFormat viewfmt;
|
||||
uint32_t baseMip;
|
||||
uint32_t baseLayer;
|
||||
|
||||
@@ -315,6 +316,7 @@ struct VulkanPipelineState
|
||||
ResourceId view;
|
||||
ResourceId img;
|
||||
|
||||
ResourceFormat viewfmt;
|
||||
uint32_t baseMip;
|
||||
uint32_t baseLayer;
|
||||
};
|
||||
|
||||
@@ -3390,6 +3390,8 @@ void VulkanReplay::SavePipelineState()
|
||||
m_VulkanPipelineState.Pass.framebuffer.attachments[i].img =
|
||||
rm->GetOriginalID(c.m_ImageView[viewid].image);
|
||||
|
||||
m_VulkanPipelineState.Pass.framebuffer.attachments[i].viewfmt =
|
||||
MakeResourceFormat(c.m_ImageView[viewid].format);
|
||||
m_VulkanPipelineState.Pass.framebuffer.attachments[i].baseMip =
|
||||
c.m_ImageView[viewid].range.baseMipLevel;
|
||||
m_VulkanPipelineState.Pass.framebuffer.attachments[i].baseLayer =
|
||||
@@ -3564,6 +3566,7 @@ void VulkanReplay::SavePipelineState()
|
||||
|
||||
dst.bindings[b].binds[a].view = rm->GetOriginalID(viewid);
|
||||
dst.bindings[b].binds[a].res = rm->GetOriginalID(c.m_ImageView[viewid].image);
|
||||
dst.bindings[b].binds[a].viewfmt = MakeResourceFormat(c.m_ImageView[viewid].format);
|
||||
dst.bindings[b].binds[a].baseMip = c.m_ImageView[viewid].range.baseMipLevel;
|
||||
dst.bindings[b].binds[a].baseLayer = c.m_ImageView[viewid].range.baseArrayLayer;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,9 @@ namespace renderdoc
|
||||
public string SamplerName;
|
||||
public bool customSamplerName;
|
||||
|
||||
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
|
||||
public ResourceFormat viewfmt;
|
||||
|
||||
public UInt32 baseMip;
|
||||
public UInt32 baseLayer;
|
||||
|
||||
@@ -370,6 +373,9 @@ namespace renderdoc
|
||||
public ResourceId view;
|
||||
public ResourceId img;
|
||||
|
||||
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
|
||||
public ResourceFormat viewfmt;
|
||||
|
||||
public UInt32 baseMip;
|
||||
public UInt32 baseArray;
|
||||
};
|
||||
|
||||
@@ -620,7 +620,7 @@ namespace renderdocui.Windows.PipelineState
|
||||
node = parentNodes.Add(new object[] {
|
||||
"", bindset, slotname, typename, name,
|
||||
dim,
|
||||
format,
|
||||
descriptorBind.viewfmt.ToString(),
|
||||
arraydim,
|
||||
});
|
||||
|
||||
@@ -1450,7 +1450,7 @@ namespace renderdocui.Windows.PipelineState
|
||||
{
|
||||
UInt32 w = 1, h = 1, d = 1;
|
||||
UInt32 a = 1;
|
||||
string format = "Unknown";
|
||||
string format = p.viewfmt.ToString();
|
||||
string name = "Texture " + p.ToString();
|
||||
string typename = "Unknown";
|
||||
object tag = null;
|
||||
@@ -1471,7 +1471,6 @@ namespace renderdocui.Windows.PipelineState
|
||||
h = texs[t].height;
|
||||
d = texs[t].depth;
|
||||
a = texs[t].arraysize;
|
||||
format = texs[t].format.ToString();
|
||||
name = texs[t].name;
|
||||
typename = texs[t].resType.Str();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user