[Mesa-dev] [PATCH 52/74] i965: do not emit_bool_to_cond_code with ssbo load expressions
Iago Toral Quiroga
itoral at igalia.com
Thu May 14 07:06:55 PDT 2015
From: Kristian Høgsberg <krh at bitplanet.net>
We do the same with ubo load expressions.
---
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 6 ++++--
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 7df7bc7..3904fc5 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -2803,7 +2803,8 @@ fs_visitor::emit_bool_to_cond_code(ir_rvalue *ir)
{
ir_expression *expr = ir->as_expression();
- if (!expr || expr->operation == ir_binop_ubo_load) {
+ if (!expr || expr->operation == ir_binop_ubo_load ||
+ expr->operation == ir_binop_ssbo_load) {
ir->accept(this);
fs_inst *inst = emit(AND(reg_null_d, this->result, fs_reg(1)));
@@ -2935,7 +2936,8 @@ fs_visitor::emit_if_gen6(ir_if *ir)
{
ir_expression *expr = ir->condition->as_expression();
- if (expr && expr->operation != ir_binop_ubo_load) {
+ if (expr && expr->operation != ir_binop_ubo_load &&
+ expr->operation != ir_binop_ssbo_load) {
fs_reg op[3];
fs_inst *inst;
fs_reg temp;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index a2aece6..675e552 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -788,7 +788,8 @@ vec4_visitor::emit_bool_to_cond_code(ir_rvalue *ir,
*predicate = BRW_PREDICATE_NORMAL;
- if (expr && expr->operation != ir_binop_ubo_load) {
+ if (expr && expr->operation != ir_binop_ubo_load &&
+ expr->operation != ir_binop_ssbo_load) {
src_reg op[3];
vec4_instruction *inst;
@@ -936,7 +937,8 @@ vec4_visitor::emit_if_gen6(ir_if *ir)
{
ir_expression *expr = ir->condition->as_expression();
- if (expr && expr->operation != ir_binop_ubo_load) {
+ if (expr && expr->operation != ir_binop_ubo_load &&
+ expr->operation != ir_binop_ssbo_load) {
src_reg op[3];
dst_reg temp;
--
1.9.1
More information about the mesa-dev
mailing list