summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorIago Toral Quiroga <itoral@igalia.com>2015-10-30 08:48:57 +0100
committerIago Toral Quiroga <itoral@igalia.com>2015-11-05 16:11:52 +0100
commitd7013988fb1d1c277e1fbce8623abddc43f78e05 (patch)
treee21d4f8fc14785f35ad26a69b2cb2f208113cb5b /src/mesa/drivers
parent027b64a55afc0fe8efcf9f6217192807e285c830 (diff)
downloadexternal_mesa3d-d7013988fb1d1c277e1fbce8623abddc43f78e05.zip
external_mesa3d-d7013988fb1d1c277e1fbce8623abddc43f78e05.tar.gz
external_mesa3d-d7013988fb1d1c277e1fbce8623abddc43f78e05.tar.bz2
i965/fs: Do not mark used direct surfaces in UNIFORM_PULL_CONSTANT_LOAD
Right now the generator marks direct surfaces as used but leaves marking of indirect surfaces to the caller. Just make the callers handle marking in both cases for consistency. Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_generator.cpp10
2 files changed, 1 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index a813746..629fbbd 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2025,7 +2025,6 @@ fs_visitor::demote_pull_constants()
pull_index);
inst->src[i].reladdr = NULL;
inst->src[i].stride = 1;
- brw_mark_surface_used(prog_data, index);
} else {
const fs_builder ubld = ibld.exec_all().group(8, 0);
fs_reg offset = fs_reg((unsigned)(pull_index * 4) & ~15);
@@ -2033,6 +2032,7 @@ fs_visitor::demote_pull_constants()
dst, fs_reg(index), offset);
inst->src[i].set_smear(pull_index & 3);
}
+ brw_mark_surface_used(prog_data, index);
/* Rewrite the instruction to use the temporary VGRF. */
inst->src[i].file = GRF;
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index 8715263..c73257a 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -1184,8 +1184,6 @@ fs_generator::generate_uniform_pull_constant_load(fs_inst *inst,
brw_oword_block_read(p, dst, brw_message_reg(inst->base_mrf),
read_offset, surf_index);
-
- brw_mark_surface_used(prog_data, surf_index);
}
void
@@ -1246,9 +1244,6 @@ fs_generator::generate_uniform_pull_constant_load_gen7(fs_inst *inst,
header_present,
BRW_SAMPLER_SIMD_MODE_SIMD4X2,
0);
-
- brw_mark_surface_used(prog_data, surf_index);
-
} else {
struct brw_reg addr = vec1(retype(brw_address_reg(0), BRW_REGISTER_TYPE_UD));
@@ -1278,11 +1273,6 @@ fs_generator::generate_uniform_pull_constant_load_gen7(fs_inst *inst,
0);
brw_pop_insn_state(p);
-
- /* visitor knows more than we do about the surface limit required,
- * so has already done marking.
- */
-
}
}