diff options
author | Ben Widawsky <[email protected]> | 2015-10-20 14:29:37 -0700 |
---|---|---|
committer | Ben Widawsky <[email protected]> | 2015-10-21 21:14:44 -0700 |
commit | 5fa7114652068735347c8715d1fc1d2cef72c433 (patch) | |
tree | ca35015ec10d0295d049ef00c8ccda5c2d4c803d /src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | |
parent | 18a631eb9056857a9ced477e7e3d1a435a906be2 (diff) |
i965/fs: Enumerate logical fb writes arguments
Gen9 adds the ability to write out a stencil value, so we need to expand the
virtual payload by one. Abstracting this now makes that change easier to read.
I was admittedly confused early on about some of the hardcoding. If people
believe the resulting code is inferior, I am not super attached to the patch.
v2:
Remove explicit numbering from the enumeration (Matt).
Use a real naming scheme, and reference it in the opcode definition (Curro)
Add a missed hardcoded logical position in get_lowered_simd_width (Ben)
Add an assertion to make sure the component numbering is correct (Ben)
Cc: Matt Turner <[email protected]>
Cc: Francisco Jerez <[email protected]>
Signed-off-by: Ben Widawsky <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_visitor.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 7cc4f3c927a..9e2b221265c 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -710,6 +710,7 @@ fs_visitor::emit_single_fb_write(const fs_builder &bld, color0, color1, src0_alpha, src_depth, dst_depth, sample_mask, fs_reg(components) }; + assert(ARRAY_SIZE(sources) - 1 == FB_WRITE_LOGICAL_SRC_COMPONENTS); fs_inst *write = bld.emit(FS_OPCODE_FB_WRITE_LOGICAL, fs_reg(), sources, ARRAY_SIZE(sources)); |