summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/spirv/emit_spirv_special.cpp
diff options
context:
space:
mode:
authorGravatar Liam2024-02-19 00:34:00 -0500
committerGravatar Liam2024-02-19 00:34:00 -0500
commitf46dc31683737fabbb9b89ba85ca74242cdc405f (patch)
tree828305f28a073f8a190d9828c1935758d1f788d0 /src/shader_recompiler/backend/spirv/emit_spirv_special.cpp
parentMerge pull request #13070 from liamwhite/offset (diff)
downloadyuzu-f46dc31683737fabbb9b89ba85ca74242cdc405f.tar.gz
yuzu-f46dc31683737fabbb9b89ba85ca74242cdc405f.tar.xz
yuzu-f46dc31683737fabbb9b89ba85ca74242cdc405f.zip
shader_recompiler: throw on missing geometry streams in geometry shaders
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_spirv_special.cpp')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_special.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_special.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_special.cpp
index 9f7b6bb4b..f60da758e 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv_special.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_spirv_special.cpp
@@ -129,7 +129,9 @@ void EmitEmitVertex(EmitContext& ctx, const IR::Value& stream) {
129 if (ctx.runtime_info.convert_depth_mode && !ctx.profile.support_native_ndc) { 129 if (ctx.runtime_info.convert_depth_mode && !ctx.profile.support_native_ndc) {
130 ConvertDepthMode(ctx); 130 ConvertDepthMode(ctx);
131 } 131 }
132 if (stream.IsImmediate()) { 132 if (!ctx.profile.support_geometry_streams) {
133 throw NotImplementedException("Geometry streams");
134 } else if (stream.IsImmediate()) {
133 ctx.OpEmitStreamVertex(ctx.Def(stream)); 135 ctx.OpEmitStreamVertex(ctx.Def(stream));
134 } else { 136 } else {
135 LOG_WARNING(Shader_SPIRV, "Stream is not immediate"); 137 LOG_WARNING(Shader_SPIRV, "Stream is not immediate");
@@ -140,7 +142,9 @@ void EmitEmitVertex(EmitContext& ctx, const IR::Value& stream) {
140} 142}
141 143
142void EmitEndPrimitive(EmitContext& ctx, const IR::Value& stream) { 144void EmitEndPrimitive(EmitContext& ctx, const IR::Value& stream) {
143 if (stream.IsImmediate()) { 145 if (!ctx.profile.support_geometry_streams) {
146 throw NotImplementedException("Geometry streams");
147 } else if (stream.IsImmediate()) {
144 ctx.OpEndStreamPrimitive(ctx.Def(stream)); 148 ctx.OpEndStreamPrimitive(ctx.Def(stream));
145 } else { 149 } else {
146 LOG_WARNING(Shader_SPIRV, "Stream is not immediate"); 150 LOG_WARNING(Shader_SPIRV, "Stream is not immediate");