diff options
author | Topi Pohjolainen <[email protected]> | 2016-02-02 10:04:34 +0200 |
---|---|---|
committer | Topi Pohjolainen <[email protected]> | 2016-02-16 08:52:24 +0200 |
commit | 2bd58790e2e2015cbf5033786cc16e4e4849ef21 (patch) | |
tree | 155b1e3666e9dcb1de53144851e0ed2b6dfc3ca8 /src/mesa/drivers | |
parent | 56f29911ec9da25c78fbd3d4945d499e65ca4b5a (diff) |
i965: Add a few assertions on lossless compression
v2 (Ben): Use combination of msaa_layout and number of samples
instead of introducing explicit type for lossless
compression (intel_miptree_is_lossless_compressed()).
Signed-off-by: Topi Pohjolainen <[email protected]>
Reviewed-by: Ben Widawsky <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp index e8c5e955247..05fff91ed57 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp @@ -70,7 +70,12 @@ brw_blorp_blit_miptrees(struct brw_context *brw, * the destination buffer because we use the standard render path to render * to destination color buffers, and the standard render path is * fast-color-aware. + * Lossless compression is only introduced for gen9 onwards whereas + * blorp is not supported even for gen8. Therefore it should be impossible + * to end up here with single sampled compressed surfaces. */ + assert(!intel_miptree_is_lossless_compressed(brw, src_mt)); + assert(!intel_miptree_is_lossless_compressed(brw, dst_mt)); intel_miptree_resolve_color(brw, src_mt, 0); intel_miptree_slice_resolve_depth(brw, src_mt, src_level, src_layer); intel_miptree_slice_resolve_depth(brw, dst_mt, dst_level, dst_layer); diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index d7bb1979e77..8144a0ea276 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -262,6 +262,10 @@ intel_update_state(struct gl_context * ctx, GLuint new_state) _mesa_get_srgb_format_linear(mt->format) == mt->format) continue; + /* Lossless compression is not supported for SRGB formats, it + * should be impossible to get here with such surfaces. + */ + assert(!intel_miptree_is_lossless_compressed(brw, mt)); intel_miptree_resolve_color(brw, mt, 0); brw_render_cache_set_check_flush(brw, mt->bo); } |