diff options
author | Samuel Pitoiset <[email protected]> | 2017-04-21 10:32:39 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-04-21 19:33:36 +0200 |
commit | 64db02b5fabcf740b353904b05bd9b9e8c713b76 (patch) | |
tree | 41640b2ede731c321e5b33a0e057e76c84398138 /src/mesa | |
parent | cd78ab55d0afefa501929366205443e15ed85495 (diff) |
glsl: make use of glsl_type::is_record()
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Reviewed-by: Edward O'Callaghan <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 6b33266f1b9..083591cc0fe 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -1903,7 +1903,7 @@ ir_to_mesa_visitor::visit(ir_constant *ir) * get lucky, copy propagation will eliminate the extra moves. */ - if (ir->type->base_type == GLSL_TYPE_STRUCT) { + if (ir->type->is_record()) { src_reg temp_base = get_temp(ir->type); dst_reg temp = dst_reg(temp_base); diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 9a19167faa0..0c3ac8c7385 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -3091,7 +3091,7 @@ glsl_to_tgsi_visitor::emit_block_mov(ir_assignment *ir, const struct glsl_type * st_dst_reg *l, st_src_reg *r, st_src_reg *cond, bool cond_swap) { - if (type->base_type == GLSL_TYPE_STRUCT) { + if (type->is_record()) { for (unsigned int i = 0; i < type->length; i++) { emit_block_mov(ir, type->fields.structure[i].type, l, r, cond, cond_swap); @@ -3264,7 +3264,7 @@ glsl_to_tgsi_visitor::visit(ir_constant *ir) * aggregate constant and move each constant value into it. If we * get lucky, copy propagation will eliminate the extra moves. */ - if (ir->type->base_type == GLSL_TYPE_STRUCT) { + if (ir->type->is_record()) { st_src_reg temp_base = get_temp(ir->type); st_dst_reg temp = st_dst_reg(temp_base); |