aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r--mesalib/src/mesa/state_tracker/st_extensions.c6
-rw-r--r--mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp14
2 files changed, 13 insertions, 7 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c
index 9e39729e9..457d5d62a 100644
--- a/mesalib/src/mesa/state_tracker/st_extensions.c
+++ b/mesalib/src/mesa/state_tracker/st_extensions.c
@@ -222,6 +222,12 @@ void st_init_limits(struct st_context *st)
c->UniformBooleanTrue = ~0;
c->StripTextureBorder = GL_TRUE;
+
+ c->GLSLSkipStrictMaxUniformLimitCheck =
+ screen->get_param(screen, PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS);
+
+ c->GLSLSkipStrictMaxVaryingLimitCheck =
+ screen->get_param(screen, PIPE_CAP_TGSI_CAN_COMPACT_VARYINGS);
}
diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 6cc655d70..9ef65c8fd 100644
--- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -1807,27 +1807,27 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir)
}
case ir_binop_lshift:
if (native_integers) {
- emit(ir, TGSI_OPCODE_SHL, result_dst, op[0]);
+ emit(ir, TGSI_OPCODE_SHL, result_dst, op[0], op[1]);
break;
}
case ir_binop_rshift:
if (native_integers) {
- emit(ir, TGSI_OPCODE_ISHR, result_dst, op[0]);
+ emit(ir, TGSI_OPCODE_ISHR, result_dst, op[0], op[1]);
break;
}
case ir_binop_bit_and:
if (native_integers) {
- emit(ir, TGSI_OPCODE_AND, result_dst, op[0]);
+ emit(ir, TGSI_OPCODE_AND, result_dst, op[0], op[1]);
break;
}
case ir_binop_bit_xor:
if (native_integers) {
- emit(ir, TGSI_OPCODE_XOR, result_dst, op[0]);
+ emit(ir, TGSI_OPCODE_XOR, result_dst, op[0], op[1]);
break;
}
case ir_binop_bit_or:
if (native_integers) {
- emit(ir, TGSI_OPCODE_OR, result_dst, op[0]);
+ emit(ir, TGSI_OPCODE_OR, result_dst, op[0], op[1]);
break;
}
case ir_unop_round_even:
@@ -3515,8 +3515,8 @@ glsl_to_tgsi_visitor::eliminate_dead_code_advanced(void)
case TGSI_OPCODE_ENDIF:
case TGSI_OPCODE_ELSE:
- /* Promote the recorded level all channels written inside the preceding
- * if or else block to the level above the if/else block.
+ /* Promote the recorded level of all channels written inside the
+ * preceding if or else block to the level above the if/else block.
*/
for (int r = 0; r < this->next_temp; r++) {
for (int c = 0; c < 4; c++) {