mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-15 19:16:32 +00:00
Add stencil reference as a supported shader builtin
This commit is contained in:
@@ -518,6 +518,7 @@ std::string DoStringise(const ShaderBuiltin &el)
|
||||
STRINGISE_ENUM_CLASS_NAMED(DepthOutput, "Depth Output");
|
||||
STRINGISE_ENUM_CLASS_NAMED(DepthOutputGreaterEqual, "Depth Output (GEqual)");
|
||||
STRINGISE_ENUM_CLASS_NAMED(DepthOutputLessEqual, "Depth Output (LEqual)");
|
||||
STRINGISE_ENUM_CLASS_NAMED(StencilReference, "Stencil Ref Value");
|
||||
}
|
||||
END_ENUM_STRINGISE();
|
||||
}
|
||||
|
||||
@@ -744,6 +744,10 @@ to apply to multiple related things - see :data:`ClipDistance`, :data:`CullDista
|
||||
|
||||
For indirect or multi-draw commands, the index of this draw call within the overall draw command.
|
||||
|
||||
.. data:: StencilReference
|
||||
|
||||
The stencil reference to be used for stenciling operations on this fragment.
|
||||
|
||||
)");
|
||||
enum class ShaderBuiltin : uint32_t
|
||||
{
|
||||
@@ -780,6 +784,7 @@ enum class ShaderBuiltin : uint32_t
|
||||
BaseVertex,
|
||||
BaseInstance,
|
||||
DrawIndex,
|
||||
StencilReference,
|
||||
Count,
|
||||
};
|
||||
|
||||
|
||||
@@ -177,6 +177,8 @@ ShaderDebug::State D3D11DebugManager::CreateShaderDebugState(ShaderDebugTrace &t
|
||||
v.name = "oDepthGreaterEqual";
|
||||
else if(sig.systemValue == ShaderBuiltin::MSAACoverage)
|
||||
v.name = "oMask";
|
||||
else if(sig.systemValue == ShaderBuiltin::StencilReference)
|
||||
v.name = "oStencilRef";
|
||||
// if(sig.systemValue == TYPE_OUTPUT_CONTROL_POINT) str = "oOutputControlPoint";
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1883,6 +1883,8 @@ void MakeShaderReflection(const GLHookSet &gl, GLenum shadType, GLuint sepProg,
|
||||
sig.systemValue = ShaderBuiltin::DepthOutput;
|
||||
if(IS_BUILTIN("gl_SampleMask"))
|
||||
sig.systemValue = ShaderBuiltin::MSAACoverage;
|
||||
if(IS_BUILTIN("gl_FragStencilRefARB"))
|
||||
sig.systemValue = ShaderBuiltin::StencilReference;
|
||||
|
||||
// CS built-in inputs
|
||||
if(IS_BUILTIN("gl_NumWorkGroups"))
|
||||
|
||||
@@ -3682,6 +3682,7 @@ ShaderBuiltin BuiltInToSystemAttribute(ShaderStage stage, const spv::BuiltIn el)
|
||||
case spv::BuiltInBaseInstance: return ShaderBuiltin::BaseInstance;
|
||||
case spv::BuiltInDrawIndex: return ShaderBuiltin::DrawIndex;
|
||||
case spv::BuiltInViewIndex: return ShaderBuiltin::ViewportIndex;
|
||||
case spv::BuiltInFragStencilRefEXT: return ShaderBuiltin::StencilReference;
|
||||
default: break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user