summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2015-08-28 17:10:00 -0700
committerMatt Turner <mattst88@gmail.com>2015-08-31 11:51:59 -0700
commita4ba41638d41865ef34bf36a525efcf8102c01ee (patch)
tree77046e06a90d5693300f289379d2509dfede9c36 /src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp
parentd2e3638ef9e2ddf7e02b9fbe3fa8d40c63ebe5da (diff)
downloadexternal_mesa3d-a4ba41638d41865ef34bf36a525efcf8102c01ee.zip
external_mesa3d-a4ba41638d41865ef34bf36a525efcf8102c01ee.tar.gz
external_mesa3d-a4ba41638d41865ef34bf36a525efcf8102c01ee.tar.bz2
i965/fs: Use greater-equal cmod to implement maximum.
The docs specifically call out SEL with .l and .ge as the implementations of MIN and MAX respectively. Among other things, SEL with these conditional mods are commutative. See commit 3b7f683f. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp b/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp
index 50e0acd..727e8d1 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp
@@ -686,7 +686,7 @@ namespace {
if (is_signed)
bld.emit_minmax(offset(dst, bld, c), offset(dst, bld, c),
fs_reg(-(int)scale(widths[c] - s) - 1),
- BRW_CONDITIONAL_G);
+ BRW_CONDITIONAL_GE);
}
}
@@ -717,7 +717,7 @@ namespace {
if (is_signed)
bld.emit_minmax(offset(dst, bld, c),
offset(dst, bld, c), fs_reg(-1.0f),
- BRW_CONDITIONAL_G);
+ BRW_CONDITIONAL_GE);
}
}
return dst;
@@ -741,7 +741,7 @@ namespace {
/* Clamp the normalized floating-point argument. */
if (is_signed) {
bld.emit_minmax(offset(fdst, bld, c), offset(src, bld, c),
- fs_reg(-1.0f), BRW_CONDITIONAL_G);
+ fs_reg(-1.0f), BRW_CONDITIONAL_GE);
bld.emit_minmax(offset(fdst, bld, c), offset(fdst, bld, c),
fs_reg(1.0f), BRW_CONDITIONAL_L);
@@ -812,7 +812,7 @@ namespace {
/* Clamp to the minimum value. */
if (widths[c] < 16)
bld.emit_minmax(offset(fdst, bld, c), offset(fdst, bld, c),
- fs_reg(0.0f), BRW_CONDITIONAL_G);
+ fs_reg(0.0f), BRW_CONDITIONAL_GE);
/* Convert to 16-bit floating-point. */
bld.F32TO16(offset(dst, bld, c), offset(fdst, bld, c));