UI support for shader objects

Info queries for pipeline state viewer and descriptor sets
Shader editing
This commit is contained in:
Jasmine Hansen
2024-06-25 17:55:10 +01:00
committed by Baldur Karlsson
parent 78d267a1d4
commit cb951ba689
3 changed files with 147 additions and 40 deletions
@@ -1685,8 +1685,11 @@ void VulkanPipelineStateViewer::setShaderState(const VKPipe::Pipeline &pipe,
{
ShaderReflection *shaderDetails = stage.reflection;
QString shText =
QFormatStr("%1: %2").arg(ToQStr(pipe.pipelineResourceId)).arg(ToQStr(stage.resourceId));
QString shText;
if(stage.shaderObject)
shText = QFormatStr("%1").arg(ToQStr(stage.resourceId));
else
shText = QFormatStr("%1: %2").arg(ToQStr(pipe.pipelineResourceId)).arg(ToQStr(stage.resourceId));
if(shaderDetails != NULL)
{
@@ -2261,7 +2264,7 @@ void VulkanPipelineStateViewer::setState()
ResourceId pipe = stage->stage == ShaderStage::Compute ? state.compute.pipelineResourceId
: state.graphics.pipelineResourceId;
b->setEnabled(stage->reflection && pipe != ResourceId());
b->setEnabled(stage->reflection && (pipe != ResourceId() || stage->shaderObject));
m_Common.SetupShaderEditButton(b, pipe, stage->resourceId, stage->reflection);
}