From 99941a97241e550985e8e5624e4959835eb0cd6b Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Wed, 19 Apr 2017 10:08:25 +0200 Subject: glsl: add intrinsics for ARB_shader_group_vote and ARB_shader_ballot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These operations are currently implemented as IR expressions. However, they cannot be transformed and moved in the way that other IR expressions can because they have non-trivial interactions with control-flow. Reviewed-by: Timothy Arceri Reviewed-by: Marek Olšák --- src/compiler/glsl/ir.h | 7 +++++++ src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/src/compiler/glsl/ir.h b/src/compiler/glsl/ir.h index d7a81c5196d..9ab4df7219e 100644 --- a/src/compiler/glsl/ir.h +++ b/src/compiler/glsl/ir.h @@ -1098,6 +1098,13 @@ enum ir_intrinsic_id { ir_intrinsic_memory_barrier_image, ir_intrinsic_memory_barrier_shared, + ir_intrinsic_vote_all, + ir_intrinsic_vote_any, + ir_intrinsic_vote_eq, + ir_intrinsic_ballot, + ir_intrinsic_read_invocation, + ir_intrinsic_read_first_invocation, + ir_intrinsic_shared_load, ir_intrinsic_shared_store = MAKE_INTRINSIC_FOR_TYPE(store, shared), ir_intrinsic_shared_atomic_add = MAKE_INTRINSIC_FOR_TYPE(atomic_add, shared), diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 8ca90f6c43d..85a55afb37e 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -3994,6 +3994,12 @@ glsl_to_tgsi_visitor::visit(ir_call *ir) return; } + case ir_intrinsic_vote_all: + case ir_intrinsic_vote_any: + case ir_intrinsic_vote_eq: + case ir_intrinsic_ballot: + case ir_intrinsic_read_first_invocation: + case ir_intrinsic_read_invocation: case ir_intrinsic_invalid: case ir_intrinsic_generic_load: case ir_intrinsic_generic_store: -- cgit v1.2.3