summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs.cpp
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2016-09-01 18:43:48 -0700
committerFrancisco Jerez <currojerez@riseup.net>2016-09-14 14:50:56 -0700
commit2d7d4a791083ff63f37ac1e40bfe8b448e7f8045 (patch)
tree5c2413d5587d8f78822d756241fdd0661a09964e /src/mesa/drivers/dri/i965/brw_fs.cpp
parent0bc46cc9619b8ae43e7a7c96bfe91f19371d301d (diff)
downloadexternal_mesa3d-2d7d4a791083ff63f37ac1e40bfe8b448e7f8045.zip
external_mesa3d-2d7d4a791083ff63f37ac1e40bfe8b448e7f8045.tar.gz
external_mesa3d-2d7d4a791083ff63f37ac1e40bfe8b448e7f8045.tar.bz2
i965/fs: Simplify a bunch of fs_inst::size_written calculations by using component_size().
Using component_size() is easier and generally more correct because it takes into account the register type and stride for you. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 6ad5272..227627e 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -191,7 +191,7 @@ fs_visitor::VARYING_PULL_CONSTANT_LOAD(const fs_builder &bld,
fs_reg vec4_result = bld.vgrf(BRW_REGISTER_TYPE_F, 4);
fs_inst *inst = bld.emit(FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_LOGICAL,
vec4_result, surf_index, vec4_offset);
- inst->size_written = 4 * bld.dispatch_width() / 8 * REG_SIZE;
+ inst->size_written = 4 * vec4_result.component_size(inst->exec_size);
if (type_sz(dst.type) == 8) {
shuffle_32bit_load_result_to_64bit_data(