glsl: avoid lowering texcoord array except in simple cases
With compat creeping up to geometry and tess shaders, lowering texcoord accesses/writes becomes more complicated. Since it's an optimization anyways, just avoid the complication for now. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
@@ -558,6 +558,9 @@ do_dead_builtin_varyings(struct gl_context *ctx,
|
|||||||
if (producer) {
|
if (producer) {
|
||||||
producer_info.get(producer->ir, num_tfeedback_decls, tfeedback_decls);
|
producer_info.get(producer->ir, num_tfeedback_decls, tfeedback_decls);
|
||||||
|
|
||||||
|
if (producer->Stage == MESA_SHADER_TESS_CTRL)
|
||||||
|
producer_info.lower_texcoord_array = false;
|
||||||
|
|
||||||
if (!consumer) {
|
if (!consumer) {
|
||||||
/* At least eliminate unused gl_TexCoord elements. */
|
/* At least eliminate unused gl_TexCoord elements. */
|
||||||
if (producer_info.lower_texcoord_array) {
|
if (producer_info.lower_texcoord_array) {
|
||||||
@@ -570,6 +573,9 @@ do_dead_builtin_varyings(struct gl_context *ctx,
|
|||||||
if (consumer) {
|
if (consumer) {
|
||||||
consumer_info.get(consumer->ir, 0, NULL);
|
consumer_info.get(consumer->ir, 0, NULL);
|
||||||
|
|
||||||
|
if (consumer->Stage != MESA_SHADER_FRAGMENT)
|
||||||
|
consumer_info.lower_texcoord_array = false;
|
||||||
|
|
||||||
if (!producer) {
|
if (!producer) {
|
||||||
/* At least eliminate unused gl_TexCoord elements. */
|
/* At least eliminate unused gl_TexCoord elements. */
|
||||||
if (consumer_info.lower_texcoord_array) {
|
if (consumer_info.lower_texcoord_array) {
|
||||||
|
Reference in New Issue
Block a user