summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/shader_info.h1
-rw-r--r--src/compiler/spirv/spirv_to_nir.c8
-rw-r--r--src/compiler/spirv/vtn_variables.c4
3 files changed, 13 insertions, 0 deletions
diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
index 961f0930c8d..208235d8158 100644
--- a/src/compiler/shader_info.h
+++ b/src/compiler/shader_info.h
@@ -56,6 +56,7 @@ struct spirv_supported_capabilities {
bool trinary_minmax;
bool descriptor_array_dynamic_indexing;
bool runtime_descriptor_array;
+ bool stencil_export;
};
typedef struct shader_info {
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 59a89df201b..363be1c4a05 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -3408,6 +3408,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
spv_check_supported(runtime_descriptor_array, cap);
break;
+ case SpvCapabilityStencilExportEXT:
+ spv_check_supported(stencil_export, cap);
+ break;
+
default:
vtn_fail("Unhandled capability");
}
@@ -3585,6 +3589,10 @@ vtn_handle_execution_mode(struct vtn_builder *b, struct vtn_value *entry_point,
case SpvExecutionModeContractionOff:
break; /* OpenCL */
+ case SpvExecutionModeStencilRefReplacingEXT:
+ vtn_assert(b->shader->info.stage == MESA_SHADER_FRAGMENT);
+ break;
+
default:
vtn_fail("Unhandled execution mode");
}
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index fd8ab7f247a..53bee1b9288 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1354,6 +1354,10 @@ vtn_get_builtin_location(struct vtn_builder *b,
*location = SYSTEM_VALUE_SUBGROUP_LT_MASK,
set_mode_system_value(b, mode);
break;
+ case SpvBuiltInFragStencilRefEXT:
+ *location = FRAG_RESULT_STENCIL;
+ vtn_assert(*mode == nir_var_shader_out);
+ break;
default:
vtn_fail("unsupported builtin");
}