glsl: make use of glsl_type::is_integer_64()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
This commit is contained in:
@@ -128,12 +128,6 @@ private:
|
|||||||
|
|
||||||
} /* anonymous namespace */
|
} /* anonymous namespace */
|
||||||
|
|
||||||
static bool
|
|
||||||
is_integer_64(const glsl_type *t)
|
|
||||||
{
|
|
||||||
return t->base_type == GLSL_TYPE_UINT64 || t->base_type == GLSL_TYPE_INT64;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if a particular type of lowering should occur
|
* Determine if a particular type of lowering should occur
|
||||||
*/
|
*/
|
||||||
@@ -208,8 +202,7 @@ lower_64bit::expand_source(ir_factory &body,
|
|||||||
ir_rvalue *val,
|
ir_rvalue *val,
|
||||||
ir_variable **expanded_src)
|
ir_variable **expanded_src)
|
||||||
{
|
{
|
||||||
assert(val->type->base_type == GLSL_TYPE_UINT64 ||
|
assert(val->type->is_integer_64());
|
||||||
val->type->base_type == GLSL_TYPE_INT64);
|
|
||||||
|
|
||||||
ir_variable *const temp = body.make_temp(val->type, "tmp");
|
ir_variable *const temp = body.make_temp(val->type, "tmp");
|
||||||
|
|
||||||
@@ -327,7 +320,7 @@ lower_64bit_visitor::handle_op(ir_expression *ir,
|
|||||||
function_generator generator)
|
function_generator generator)
|
||||||
{
|
{
|
||||||
for (unsigned i = 0; i < ir->get_num_operands(); i++)
|
for (unsigned i = 0; i < ir->get_num_operands(); i++)
|
||||||
if (!is_integer_64(ir->operands[i]->type))
|
if (!ir->operands[i]->type->is_integer_64())
|
||||||
return ir;
|
return ir;
|
||||||
|
|
||||||
/* Get a handle to the correct ir_function_signature for the core
|
/* Get a handle to the correct ir_function_signature for the core
|
||||||
|
Reference in New Issue
Block a user