summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-08-30 16:32:51 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-09-12 19:42:57 -0700
commit9286f62f11ccd3ffd8f7d3d93b516b79d5ab36fd (patch)
tree926800fffe34a3cf39dca671897510ff4dc5cff9 /src
parentab03e59867ebf078d910063e717498cdf8905fa0 (diff)
downloadexternal_mesa3d-9286f62f11ccd3ffd8f7d3d93b516b79d5ab36fd.zip
external_mesa3d-9286f62f11ccd3ffd8f7d3d93b516b79d5ab36fd.tar.gz
external_mesa3d-9286f62f11ccd3ffd8f7d3d93b516b79d5ab36fd.tar.bz2
intel/blorp: Add support for clearing R9G9B9E5 surfaces
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/intel/blorp/blorp_clear.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c
index 2213ada..384a4cf 100644
--- a/src/intel/blorp/blorp_clear.c
+++ b/src/intel/blorp/blorp_clear.c
@@ -23,6 +23,9 @@
#include "util/ralloc.h"
+#include "main/macros.h" /* Needed for MAX3 and MAX2 for format_rgb9e5 */
+#include "util/format_rgb9e5.h"
+
#include "blorp_priv.h"
#include "brw_defines.h"
@@ -252,6 +255,11 @@ blorp_clear(struct blorp_batch *batch,
params.x1 = x1;
params.y1 = y1;
+ if (format == ISL_FORMAT_R9G9B9E5_SHAREDEXP) {
+ clear_color.u32[0] = float3_to_rgb9e5(clear_color.f32);
+ format = ISL_FORMAT_R32_UINT;
+ }
+
memcpy(&params.wm_inputs, clear_color.f32, sizeof(float) * 4);
bool use_simd16_replicated_data = true;