summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEduardo Lima Mitev <[email protected]>2015-06-18 09:37:33 +0200
committerJason Ekstrand <[email protected]>2015-08-03 09:40:50 -0700
commit434481f3155040217c3e5a8da98dab4248435f0e (patch)
tree6e29776898633efc3eed0e2e5fcf501868676625
parentdb8a6de571bb72ef43209a415e5492001a87b1d8 (diff)
i965/vec4: Move is_high_sample() method to vec4_visitor class
The is_high_sample() method is currently accessible only in the implementation of vec4_visitor. Since we need to reuse it in the upcoming NIR->vec4 pass, lets make it a method of the class instead. Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.h1
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp6
2 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index 54fe84ae6c6..aea21c5897d 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -392,6 +392,7 @@ public:
void visit_atomic_counter_intrinsic(ir_call *ir);
int type_size(const struct glsl_type *type);
+ bool is_high_sampler(src_reg sampler);
virtual void emit_nir_code();
virtual void nir_setup_inputs(nir_shader *shader);
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 5346fde950a..737c9fa6d27 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -2509,8 +2509,8 @@ vec4_visitor::emit_mcs_fetch(ir_texture *ir, src_reg coordinate, src_reg sampler
return src_reg(inst->dst);
}
-static bool
-is_high_sampler(const struct brw_device_info *devinfo, src_reg sampler)
+bool
+vec4_visitor::is_high_sampler(src_reg sampler)
{
if (devinfo->gen < 8 && !devinfo->is_haswell)
return false;
@@ -2686,7 +2686,7 @@ vec4_visitor::visit(ir_texture *ir)
inst->header_size =
(devinfo->gen < 5 || devinfo->gen >= 9 ||
inst->offset != 0 || ir->op == ir_tg4 ||
- is_high_sampler(devinfo, sampler_reg)) ? 1 : 0;
+ is_high_sampler(sampler_reg)) ? 1 : 0;
inst->base_mrf = 2;
inst->mlen = inst->header_size + 1; /* always at least one */
inst->dst.writemask = WRITEMASK_XYZW;