diff options
author | Francisco Jerez <currojerez@riseup.net> | 2016-09-01 18:43:48 -0700 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2016-09-14 14:50:56 -0700 |
commit | 2d7d4a791083ff63f37ac1e40bfe8b448e7f8045 (patch) | |
tree | 5c2413d5587d8f78822d756241fdd0661a09964e /src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | |
parent | 0bc46cc9619b8ae43e7a7c96bfe91f19371d301d (diff) | |
download | external_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_visitor.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 5aea62c..2b2e21e 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -97,7 +97,7 @@ fs_visitor::emit_mcs_fetch(const fs_reg &coordinate, unsigned components, /* We only care about one or two regs of response, but the sampler always * writes 4/8. */ - inst->size_written = 4 * dispatch_width / 8 * REG_SIZE; + inst->size_written = 4 * dest.component_size(inst->exec_size); return dest; } |