projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20021e3
)
v3d: Add support for gl_HelperInvocation.
author
Eric Anholt
<eric@anholt.net>
Fri, 28 Dec 2018 19:30:52 +0000
(11:30 -0800)
committer
Eric Anholt
<eric@anholt.net>
Sun, 30 Dec 2018 16:05:11 +0000
(08:05 -0800)
We can just look at the MSF flags -- if they're unset, then we're
definitely in a helper invocation. Fixes
dEQP-GLES31.functional.shaders.helper_invocation.* with GLES3.1 enabled.
src/broadcom/compiler/nir_to_vir.c
patch
|
blob
|
history
diff --git
a/src/broadcom/compiler/nir_to_vir.c
b/src/broadcom/compiler/nir_to_vir.c
index
e01668c
..
73fed4e
100644
(file)
--- a/
src/broadcom/compiler/nir_to_vir.c
+++ b/
src/broadcom/compiler/nir_to_vir.c
@@
-1596,6
+1596,14
@@
ntq_emit_intrinsic(struct v3d_compile *c, nir_intrinsic_instr *instr)
ntq_store_dest(c, &instr->dest, 0, vir_MSF(c));
break;
+ case nir_intrinsic_load_helper_invocation:
+ vir_PF(c, vir_MSF(c), V3D_QPU_PF_PUSHZ);
+ ntq_store_dest(c, &instr->dest, 0,
+ vir_MOV(c, vir_SEL(c, V3D_QPU_COND_IFA,
+ vir_uniform_ui(c, ~0),
+ vir_uniform_ui(c, 0))));
+ break;
+
case nir_intrinsic_load_front_face:
/* The register contains 0 (front) or 1 (back), and we need to
* turn it into a NIR bool where true means front.