[Mesa-dev] [PATCH 1/2] i965: Fix BLORP sRGB MSAA overrides to cope with X vs. A formats.
Chris Forbes
chrisf at ijw.co.nz
Thu Jan 1 01:01:36 PST 2015
Both of these are also
Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>
On Jan 1, 2015 7:48 PM, "Kenneth Graunke" <kenneth at whitecape.org> wrote:
> The logic in brw_blorp_surface_info::set uses brw_format_for_mesa_format
> for source surfaces, and brw->render_target_format[] for destination
> surfaces. We should do the same in the sRGB MSAA overrides.
>
> Currently, this isn't a problem, since SRGB MSAA buffers are all RGBA.
> The next commit will introduce RGBX SRGB MSAA buffers, at which point
> we need to get the RGBX -> RGBA format overrides for rendering right.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
> src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
> b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
> index a103af0..936feaf 100644
> --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
> @@ -1868,8 +1868,9 @@ brw_blorp_blit_params::brw_blorp_blit_params(struct
> brw_context *brw,
> _mesa_get_format_color_encoding(dst_mt->format) == GL_SRGB &&
> _mesa_get_srgb_format_linear(src_mt->format) ==
> _mesa_get_srgb_format_linear(dst_mt->format)) {
> - dst.brw_surfaceformat = brw_format_for_mesa_format(dst_mt->format);
> - src.brw_surfaceformat = dst.brw_surfaceformat;
> + assert(brw->format_supported_as_render_target[dst_mt->format]);
> + dst.brw_surfaceformat = brw->render_target_format[dst_mt->format];
> + src.brw_surfaceformat = brw_format_for_mesa_format(dst_mt->format);
> }
>
> /* When doing a multisample resolve of a GL_LUMINANCE32F or
> GL_INTENSITY32F
> --
> 2.2.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150101/72374add/attachment.html>
More information about the mesa-dev
mailing list