gl_shader_decompiler: Remove deprecated function and its usages
This commit is contained in:
parent
acf328a71f
commit
351816ac38
@ -393,10 +393,6 @@ std::string FlowStackTopName(MetaStackClass stack) {
|
|||||||
return fmt::format("{}_flow_stack_top", GetFlowStackPrefix(stack));
|
return fmt::format("{}_flow_stack_top", GetFlowStackPrefix(stack));
|
||||||
}
|
}
|
||||||
|
|
||||||
[[deprecated]] constexpr bool IsVertexShader(ShaderType stage) {
|
|
||||||
return stage == ShaderType::Vertex;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct GenericVaryingDescription {
|
struct GenericVaryingDescription {
|
||||||
std::string name;
|
std::string name;
|
||||||
u8 first_element = 0;
|
u8 first_element = 0;
|
||||||
@ -529,8 +525,9 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DeclareVertex() {
|
void DeclareVertex() {
|
||||||
if (!IsVertexShader(stage))
|
if (stage != ShaderType::Vertex) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
DeclareVertexRedeclarations();
|
DeclareVertexRedeclarations();
|
||||||
}
|
}
|
||||||
@ -602,14 +599,14 @@ private:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!IsVertexShader(stage) || device.HasVertexViewportLayer()) {
|
if (stage != ShaderType::Vertex || device.HasVertexViewportLayer()) {
|
||||||
if (ir.UsesLayer()) {
|
if (ir.UsesLayer()) {
|
||||||
code.AddLine("int gl_Layer;");
|
code.AddLine("int gl_Layer;");
|
||||||
}
|
}
|
||||||
if (ir.UsesViewportIndex()) {
|
if (ir.UsesViewportIndex()) {
|
||||||
code.AddLine("int gl_ViewportIndex;");
|
code.AddLine("int gl_ViewportIndex;");
|
||||||
}
|
}
|
||||||
} else if ((ir.UsesLayer() || ir.UsesViewportIndex()) && IsVertexShader(stage) &&
|
} else if ((ir.UsesLayer() || ir.UsesViewportIndex()) && stage == ShaderType::Vertex &&
|
||||||
!device.HasVertexViewportLayer()) {
|
!device.HasVertexViewportLayer()) {
|
||||||
LOG_ERROR(
|
LOG_ERROR(
|
||||||
Render_OpenGL,
|
Render_OpenGL,
|
||||||
@ -1147,7 +1144,7 @@ private:
|
|||||||
// TODO(Subv): Find out what the values are for the first two elements when inside a
|
// TODO(Subv): Find out what the values are for the first two elements when inside a
|
||||||
// vertex shader, and what's the value of the fourth element when inside a Tess Eval
|
// vertex shader, and what's the value of the fourth element when inside a Tess Eval
|
||||||
// shader.
|
// shader.
|
||||||
ASSERT(IsVertexShader(stage));
|
ASSERT(stage == ShaderType::Vertex);
|
||||||
switch (element) {
|
switch (element) {
|
||||||
case 2:
|
case 2:
|
||||||
// Config pack's first value is instance_id.
|
// Config pack's first value is instance_id.
|
||||||
@ -1218,12 +1215,12 @@ private:
|
|||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
return {};
|
return {};
|
||||||
case 1:
|
case 1:
|
||||||
if (IsVertexShader(stage) && !device.HasVertexViewportLayer()) {
|
if (stage == ShaderType::Vertex && !device.HasVertexViewportLayer()) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
return {{"gl_Layer", Type::Int}};
|
return {{"gl_Layer", Type::Int}};
|
||||||
case 2:
|
case 2:
|
||||||
if (IsVertexShader(stage) && !device.HasVertexViewportLayer()) {
|
if (stage == ShaderType::Vertex && !device.HasVertexViewportLayer()) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
return {{"gl_ViewportIndex", Type::Int}};
|
return {{"gl_ViewportIndex", Type::Int}};
|
||||||
@ -2532,7 +2529,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
u32 GetNumPhysicalInputAttributes() const {
|
u32 GetNumPhysicalInputAttributes() const {
|
||||||
return IsVertexShader(stage) ? GetNumPhysicalAttributes() : GetNumPhysicalVaryings();
|
return stage == ShaderType::Vertex ? GetNumPhysicalAttributes() : GetNumPhysicalVaryings();
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 GetNumPhysicalAttributes() const {
|
u32 GetNumPhysicalAttributes() const {
|
||||||
|
Loading…
Reference in New Issue
Block a user