summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2014-08-15 20:58:50 -0700
committerJason Ekstrand <[email protected]>2014-09-30 10:29:14 -0700
commit894ec5a1d819ed896395117303b1ff25be59ba75 (patch)
tree0f936cd70900f4cf57dfefb32c888c748101d0f3 /src/mesa
parent8f1adb59659617a682988bc503b8a0a7077abb84 (diff)
i965/fs: Use instruction execution sizes to set compression state
Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_generator.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index 5bfc559889f..36a51fdc55f 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -1532,12 +1532,25 @@ fs_generator::generate_code(const cfg_t *cfg)
brw_set_default_mask_control(p, inst->force_writemask_all);
brw_set_default_acc_write_control(p, inst->writes_accumulator);
- if (inst->force_uncompressed || dispatch_width == 8) {
- brw_set_default_compression_control(p, BRW_COMPRESSION_NONE);
- } else if (inst->force_sechalf) {
- brw_set_default_compression_control(p, BRW_COMPRESSION_2NDHALF);
- } else {
- brw_set_default_compression_control(p, BRW_COMPRESSION_COMPRESSED);
+ switch (inst->exec_size) {
+ case 1:
+ case 2:
+ case 4:
+ assert(inst->force_writemask_all);
+ brw_set_default_compression_control(p, BRW_COMPRESSION_NONE);
+ break;
+ case 8:
+ if (inst->force_sechalf) {
+ brw_set_default_compression_control(p, BRW_COMPRESSION_2NDHALF);
+ } else {
+ brw_set_default_compression_control(p, BRW_COMPRESSION_NONE);
+ }
+ break;
+ case 16:
+ brw_set_default_compression_control(p, BRW_COMPRESSION_COMPRESSED);
+ break;
+ default:
+ unreachable(!"Invalid instruction width");
}
switch (inst->opcode) {