summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-04-02 11:07:48 -0700
committerJason Ekstrand <[email protected]>2015-04-03 14:04:12 -0700
commit7bdba4a24583f4cc2f9bca94f975cec9d384cddc (patch)
treea5863f743e6c466fd1c1e421b01388544074ae4c /src/mesa/drivers/dri
parentcb966fb2bea77b1d7b1bdb6597b7b85d810f2d0a (diff)
nir: Add a src_get_parent_instr function
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_nir_analyze_boolean_resolves.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_nir_analyze_boolean_resolves.c b/src/mesa/drivers/dri/i965/brw_nir_analyze_boolean_resolves.c
index 3a27cf1a3d2..f0b018cf84a 100644
--- a/src/mesa/drivers/dri/i965/brw_nir_analyze_boolean_resolves.c
+++ b/src/mesa/drivers/dri/i965/brw_nir_analyze_boolean_resolves.c
@@ -43,13 +43,7 @@
static uint8_t
get_resolve_status_for_src(nir_src *src)
{
- nir_instr *src_instr;
- if (src->is_ssa) {
- src_instr = src->ssa->parent_instr;
- } else {
- src_instr = src->reg.reg->parent_instr;
- }
-
+ nir_instr *src_instr = nir_src_get_parent_instr(src);
if (src_instr) {
uint8_t resolve_status = src_instr->pass_flags & BRW_NIR_BOOLEAN_MASK;
@@ -72,13 +66,7 @@ get_resolve_status_for_src(nir_src *src)
static bool
src_mark_needs_resolve(nir_src *src, void *void_state)
{
- nir_instr *src_instr;
- if (src->is_ssa) {
- src_instr = src->ssa->parent_instr;
- } else {
- src_instr = src->reg.reg->parent_instr;
- }
-
+ nir_instr *src_instr = nir_src_get_parent_instr(src);
if (src_instr) {
uint8_t resolve_status = src_instr->pass_flags & BRW_NIR_BOOLEAN_MASK;