This option will be used later by GLSL, so move to a common struct.
Because nir_options is filled in the compiler instead of the Vulkan
driver, fix that up. GLSL will ignore that for now.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3913>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3913>
*/
bool has_imul24;
+ /* Whether to generate only scoped_memory_barrier intrinsics instead of the
+ * set of memory barrier intrinsics based on GLSL.
+ */
+ bool use_scoped_memory_barrier;
+
/**
* Is this the Intel vec4 backend?
*
*/
bool frag_coord_is_sysval;
- /* Whether to generate only scoped_memory_barrier intrinsics instead of the
- * set of memory barrier intrinsics based on GLSL.
- */
- bool use_scoped_memory_barrier;
-
struct spirv_supported_capabilities caps;
/* Address format for various kinds of pointers. */
vtn_emit_memory_barrier(struct vtn_builder *b, SpvScope scope,
SpvMemorySemanticsMask semantics)
{
- if (b->options->use_scoped_memory_barrier) {
+ if (b->shader->options->use_scoped_memory_barrier) {
vtn_emit_scoped_memory_barrier(b, scope, semantics);
return;
}
.vectorize_io = true, \
.use_interpolated_input_intrinsics = true, \
.vertex_id_zero_based = true, \
- .lower_base_vertex = true
+ .lower_base_vertex = true, \
+ .use_scoped_memory_barrier = true
#define COMMON_SCALAR_OPTIONS \
.lower_to_scalar = true, \
};
struct spirv_to_nir_options spirv_options = {
.frag_coord_is_sysval = true,
- .use_scoped_memory_barrier = true,
.caps = {
.demote_to_helper_invocation = true,
.derivative_group = true,