aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-04-15 18:00:05 -0700
committerJason Ekstrand <[email protected]>2015-04-22 16:00:34 -0700
commit28e9601d0e681411b60a7de8be9f401b0df77d29 (patch)
treeb047241dc1652427e349488899f44fb3345eaa5e /src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp
parent73bf8f3d6b6b571175c5ce324b44fef26915875f (diff)
i965: Add a devinfo field to backend_visitor and use it for gen checks
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp b/src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp
index ebde8df2ff1..a51b726d4a4 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp
@@ -42,9 +42,9 @@
* replaced with a GRF source.
*/
static bool
-could_coissue(const struct brw_context *brw, const fs_inst *inst)
+could_coissue(const struct brw_device_info *devinfo, const fs_inst *inst)
{
- if (brw->gen != 7)
+ if (devinfo->gen != 7)
return false;
switch (inst->opcode) {
@@ -207,7 +207,7 @@ fs_visitor::opt_combine_constants()
foreach_block_and_inst(block, fs_inst, inst, cfg) {
ip++;
- if (!could_coissue(brw, inst) && !must_promote_imm(inst))
+ if (!could_coissue(devinfo, inst) && !must_promote_imm(inst))
continue;
for (int i = 0; i < inst->sources; i++) {
@@ -224,7 +224,7 @@ fs_visitor::opt_combine_constants()
imm->inst = NULL;
imm->block = intersection;
imm->uses->push_tail(link(const_ctx, &inst->src[i]));
- imm->uses_by_coissue += could_coissue(brw, inst);
+ imm->uses_by_coissue += could_coissue(devinfo, inst);
imm->must_promote = imm->must_promote || must_promote_imm(inst);
imm->last_use_ip = ip;
} else {
@@ -234,7 +234,7 @@ fs_visitor::opt_combine_constants()
imm->uses = new(const_ctx) exec_list();
imm->uses->push_tail(link(const_ctx, &inst->src[i]));
imm->val = val;
- imm->uses_by_coissue = could_coissue(brw, inst);
+ imm->uses_by_coissue = could_coissue(devinfo, inst);
imm->must_promote = must_promote_imm(inst);
imm->first_use_ip = ip;
imm->last_use_ip = ip;