diff options
author | Neil Roberts <[email protected]> | 2015-11-19 14:02:59 +0100 |
---|---|---|
committer | Neil Roberts <[email protected]> | 2015-12-10 11:03:49 +0000 |
commit | 9a31d9870b0c2113eefd1c2baf347ab8b288f6a6 (patch) | |
tree | 94cd9afad37fbd5724a8299621f2b76fe1d4525f /src/mesa | |
parent | d15133859424e73ed892ab05c2bdbb76157da517 (diff) |
i965/gen8: Allow rendering to B8G8R8X8
Since Gen8 this is allowed as a rendering target so we don't need to
override it to B8G8R8A8. This is helpful on Gen9+ where using this
override causes fast clears not to work.
Reviewed-by: Anuj Phogat <[email protected]>
Reviewed-by: Ben Widawsky <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_surface_formats.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c index e04ba7ca75e..ff8aac2c0e5 100644 --- a/src/mesa/drivers/dri/i965/brw_surface_formats.c +++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c @@ -165,8 +165,8 @@ const struct surface_format_info surface_formats[] = { SF( Y, 50, Y, x, x, x, x, x, x, x, I32_FLOAT) SF( Y, 50, Y, x, x, x, x, x, x, x, L32_FLOAT) SF( Y, 50, Y, x, x, x, x, x, x, x, A32_FLOAT) - SF( Y, Y, x, Y, x, x, x, x, 60, 90, B8G8R8X8_UNORM) - SF( Y, Y, x, x, x, x, x, x, x, x, B8G8R8X8_UNORM_SRGB) + SF( Y, Y, x, Y, 80, 80, x, x, 60, 90, B8G8R8X8_UNORM) + SF( Y, Y, x, x, 80, 80, x, x, x, x, B8G8R8X8_UNORM_SRGB) SF( Y, Y, x, x, x, x, x, x, x, x, R8G8B8X8_UNORM) SF( Y, Y, x, x, x, x, x, x, x, x, R8G8B8X8_UNORM_SRGB) SF( Y, Y, x, x, x, x, x, x, x, x, R9G9B9E5_SHAREDEXP) @@ -668,9 +668,10 @@ brw_init_surface_formats(struct brw_context *brw) * mask writes to alpha (ala glColorMask) and reconfigure the * alpha blending hardware to use GL_ONE (or GL_ZERO) for * cases where GL_DST_ALPHA (or GL_ONE_MINUS_DST_ALPHA) is - * used. + * used. On Gen8+ BGRX is actually allowed (but not RGBX). */ - render = BRW_SURFACEFORMAT_B8G8R8A8_UNORM; + if (gen < tinfo->render_target) + render = BRW_SURFACEFORMAT_B8G8R8A8_UNORM; break; case BRW_SURFACEFORMAT_R8G8B8X8_UNORM: render = BRW_SURFACEFORMAT_R8G8B8A8_UNORM; |