summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2017-10-18 11:22:43 -0700
committerKenneth Graunke <[email protected]>2017-10-19 10:19:20 -0700
commit3d112a7cd49656da3dde5f9b476b6ddc2d984528 (patch)
treec92d96c573f087a06a18f706ded0d5a1d34afe1b
parent77b8392858815625ee7909cf9e866043dab9d074 (diff)
i965: Move fs_inst::has_side_effects()'s eot check to the parent class.
This eliminates a layer of wrapping, and makes a backend_instruction sufficient. The downside is that it exposes 'eot' to the vec4 backend, which it doesn't need, but can basically happily ignore. Reviewed-by: Matt Turner <[email protected]> Tested-by: Pallavi G <[email protected]>
-rw-r--r--src/intel/compiler/brw_fs.cpp6
-rw-r--r--src/intel/compiler/brw_ir_fs.h2
-rw-r--r--src/intel/compiler/brw_shader.cpp2
-rw-r--r--src/intel/compiler/brw_shader.h1
-rw-r--r--src/intel/compiler/brw_vec4_visitor.cpp1
5 files changed, 3 insertions, 9 deletions
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index 66cb33131b6..30e8841242d 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -393,12 +393,6 @@ fs_inst::can_change_types() const
!src[1].abs && !src[1].negate));
}
-bool
-fs_inst::has_side_effects() const
-{
- return this->eot || backend_instruction::has_side_effects();
-}
-
void
fs_reg::init()
{
diff --git a/src/intel/compiler/brw_ir_fs.h b/src/intel/compiler/brw_ir_fs.h
index 58beae0d1f0..0e7c55bcc03 100644
--- a/src/intel/compiler/brw_ir_fs.h
+++ b/src/intel/compiler/brw_ir_fs.h
@@ -347,7 +347,6 @@ public:
unsigned size_read(int arg) const;
bool can_do_source_mods(const struct gen_device_info *devinfo);
bool can_change_types() const;
- bool has_side_effects() const;
bool has_source_and_destination_hazard() const;
/**
@@ -367,7 +366,6 @@ public:
uint8_t sources; /**< Number of fs_reg sources. */
- bool eot:1;
bool pi_noperspective:1; /**< Pixel interpolator noperspective flag */
};
diff --git a/src/intel/compiler/brw_shader.cpp b/src/intel/compiler/brw_shader.cpp
index 53d0742d2e8..4eb602b000a 100644
--- a/src/intel/compiler/brw_shader.cpp
+++ b/src/intel/compiler/brw_shader.cpp
@@ -1000,7 +1000,7 @@ backend_instruction::has_side_effects() const
case TCS_OPCODE_RELEASE_INPUT:
return true;
default:
- return false;
+ return eot;
}
}
diff --git a/src/intel/compiler/brw_shader.h b/src/intel/compiler/brw_shader.h
index 30e7bf75c58..d632f6dcd4e 100644
--- a/src/intel/compiler/brw_shader.h
+++ b/src/intel/compiler/brw_shader.h
@@ -167,6 +167,7 @@ struct backend_instruction {
bool no_dd_check:1;
bool saturate:1;
bool shadow_compare:1;
+ bool eot:1;
/* Chooses which flag subregister (f0.0 or f0.1) is used for conditional
* mod and predication.
diff --git a/src/intel/compiler/brw_vec4_visitor.cpp b/src/intel/compiler/brw_vec4_visitor.cpp
index ae516196b15..a62c79ee7f3 100644
--- a/src/intel/compiler/brw_vec4_visitor.cpp
+++ b/src/intel/compiler/brw_vec4_visitor.cpp
@@ -46,6 +46,7 @@ vec4_instruction::vec4_instruction(enum opcode opcode, const dst_reg &dst,
this->predicate_inverse = false;
this->target = 0;
this->shadow_compare = false;
+ this->eot = false;
this->ir = NULL;
this->urb_write_flags = BRW_URB_WRITE_NO_FLAGS;
this->header_size = 0;