summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/spirv
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-03-30 23:39:42 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:25 +0200
commit09e1927b702b6a57fdea3c137b8e08c1ecd06b4f (patch)
treeab7c91dc4d6ee7ce5eea8e3b6c83b308be68c899 /src/shader_recompiler/backend/spirv
parentshader: Implement ClipDistance (diff)
downloadyuzu-09e1927b702b6a57fdea3c137b8e08c1ecd06b4f.tar
yuzu-09e1927b702b6a57fdea3c137b8e08c1ecd06b4f.tar.gz
yuzu-09e1927b702b6a57fdea3c137b8e08c1ecd06b4f.tar.bz2
yuzu-09e1927b702b6a57fdea3c137b8e08c1ecd06b4f.tar.lz
yuzu-09e1927b702b6a57fdea3c137b8e08c1ecd06b4f.tar.xz
yuzu-09e1927b702b6a57fdea3c137b8e08c1ecd06b4f.tar.zst
yuzu-09e1927b702b6a57fdea3c137b8e08c1ecd06b4f.zip
Diffstat (limited to 'src/shader_recompiler/backend/spirv')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_context.cpp6
-rw-r--r--src/shader_recompiler/backend/spirv/emit_context.h2
2 files changed, 2 insertions, 6 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_context.cpp b/src/shader_recompiler/backend/spirv/emit_context.cpp
index 2e3e3346d..b0f7e2269 100644
--- a/src/shader_recompiler/backend/spirv/emit_context.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_context.cpp
@@ -176,9 +176,6 @@ void EmitContext::DefineCommonTypes(const Info& info) {
AddCapability(spv::Capability::Float64);
F64.Define(*this, TypeFloat(64), "f64");
}
- if (info.stores_clip_distance) {
- Array8F32 = Name(TypeArray(F32[1], Constant(U32[1], 8)), "array_8_f32");
- }
}
void EmitContext::DefineCommonConstants() {
@@ -509,7 +506,8 @@ void EmitContext::DefineOutputs(const Info& info) {
if (stage == Stage::Fragment) {
throw NotImplementedException("Storing PointSize in Fragment stage");
}
- clip_distances = DefineOutput(*this, Array8F32, spv::BuiltIn::ClipDistance);
+ const Id type{TypeArray(F32[1], Constant(U32[1], 8U))};
+ clip_distances = DefineOutput(*this, type, spv::BuiltIn::ClipDistance);
}
for (size_t i = 0; i < info.stores_generics.size(); ++i) {
if (info.stores_generics[i]) {
diff --git a/src/shader_recompiler/backend/spirv/emit_context.h b/src/shader_recompiler/backend/spirv/emit_context.h
index bffe1558c..dc4e1227a 100644
--- a/src/shader_recompiler/backend/spirv/emit_context.h
+++ b/src/shader_recompiler/backend/spirv/emit_context.h
@@ -67,8 +67,6 @@ public:
VectorTypes F16;
VectorTypes F64;
- Id Array8F32{};
-
Id true_value{};
Id false_value{};
Id u32_zero_value{};