mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 21:20:14 +01:00
glsl: add a few missing int64 constant propagation cases
Fixes KHR-GL45.shader_ballot_tests.ShaderBallotAvailability, which
causes some silly swizzles to appear, triggering this optimization to
get hit.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 9c8f017f77)
This commit is contained in:
parent
e3e4477fed
commit
b31ccc62ab
2 changed files with 8 additions and 0 deletions
|
|
@ -725,6 +725,8 @@ ir_swizzle::constant_expression_value(struct hash_table *variable_context)
|
|||
case GLSL_TYPE_FLOAT: data.f[i] = v->value.f[swiz_idx[i]]; break;
|
||||
case GLSL_TYPE_BOOL: data.b[i] = v->value.b[swiz_idx[i]]; break;
|
||||
case GLSL_TYPE_DOUBLE:data.d[i] = v->value.d[swiz_idx[i]]; break;
|
||||
case GLSL_TYPE_UINT64:data.u64[i] = v->value.u64[swiz_idx[i]]; break;
|
||||
case GLSL_TYPE_INT64: data.i64[i] = v->value.i64[swiz_idx[i]]; break;
|
||||
default: assert(!"Should not get here."); break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -237,6 +237,12 @@ ir_constant_propagation_visitor::constant_propagation(ir_rvalue **rvalue) {
|
|||
case GLSL_TYPE_BOOL:
|
||||
data.b[i] = found->constant->value.b[rhs_channel];
|
||||
break;
|
||||
case GLSL_TYPE_UINT64:
|
||||
data.u64[i] = found->constant->value.u64[rhs_channel];
|
||||
break;
|
||||
case GLSL_TYPE_INT64:
|
||||
data.i64[i] = found->constant->value.i64[rhs_channel];
|
||||
break;
|
||||
default:
|
||||
assert(!"not reached");
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue