summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ir.h
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2016-10-25 03:38:54 -0700
committerEmil Velikov <emil.l.velikov@gmail.com>2016-10-27 11:33:14 +0100
commit02d5e60ee0261a86227a0dbd058a87608dc174bf (patch)
treee949728d07b9de42bea0aa6e99e8aefd07f2d622 /src/compiler/glsl/ir.h
parent649a47a8343fbc35e17f17fac6e010a106e34b64 (diff)
downloadexternal_mesa3d-02d5e60ee0261a86227a0dbd058a87608dc174bf.zip
external_mesa3d-02d5e60ee0261a86227a0dbd058a87608dc174bf.tar.gz
external_mesa3d-02d5e60ee0261a86227a0dbd058a87608dc174bf.tar.bz2
glsl: Size TCS->TES unsized arrays to gl_MaxPatchVertices for queries.
SSO validation and other program interface queries want to see that unsized (non-patch) TCS output/TES input arrays are implicitly sized to gl_MaxPatchVertices. By the time we create the program resource lists, we've sized the arrays to their actual size. (We try to create TCS output arrays to match the output patch size right away, and at this point, we should have shrunk TES input arrays.) One option would be to keep them sized to gl_MaxPatchVertices, and defer shrinking them. But that's a big change, and I don't think it's a good idea. Instead, this patch introduces a new ir_variable flag which indicates the variable is implicitly to gl_MaxPatchVertices. Then, the linker munges the types when creating the resource list, ignoring the size in the IR's types. Basically, lie about it for resource queries. It's ugly, but I think it ought to work. We probably could use var->data.implicit_sized_array for this, but I opted for a separate bit to try and avoid convoluting the existing SSBO handling. They're similar in concept, but share none of the same code... Fixes: ES31-CTS.core.tessellation_shader.single.xfb_captures_data_from_correct_stage and the ES32-CTS and ESEXT-CTS variants. v2: Add a comment (requested by Timothy, written by me). Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> (cherry picked from commit 173558445dce26ce641faf260a17696221acf23d)
Diffstat (limited to 'src/compiler/glsl/ir.h')
-rw-r--r--src/compiler/glsl/ir.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/glsl/ir.h b/src/compiler/glsl/ir.h
index 3d28dd5..f07e3b2 100644
--- a/src/compiler/glsl/ir.h
+++ b/src/compiler/glsl/ir.h
@@ -833,6 +833,12 @@ public:
unsigned implicit_sized_array:1;
/**
+ * Is this a non-patch TCS output / TES input array that was implicitly
+ * sized to gl_MaxPatchVertices?
+ */
+ unsigned tess_varying_implicit_sized_array:1;
+
+ /**
* Whether this is a fragment shader output implicitly initialized with
* the previous contents of the specified render target at the
* framebuffer location corresponding to this shader invocation.