[Mesa-dev] [PATCH 07/12] i965/cnl: Restore lossless compression for sRGB formats
Ben Widawsky
ben at bwidawsk.net
Tue Apr 25 23:14:36 UTC 2017
On 17-04-25 14:53:46, Anuj Phogat wrote:
>On Mon, Apr 24, 2017 at 10:57 PM, Ben Widawsky <ben at bwidawsk.net> wrote:
>
>> On 17-04-15 18:27:33, Jason Ekstrand wrote:
>>
>>> On April 14, 2017 5:37:55 PM Anuj Phogat <anuj.phogat at gmail.com> wrote:
>>>
>>> From: Ben Widawsky <ben at bwidawsk.net>
>>>>
>>>> This support was removed on gen9 (it worked before then) and was brought
>>>> back
>>>> for gen10.
>>>>
>>>> Signed-off-by: Ben Widawsky <benjamin.widawsky at intel.com>
>>>> ---
>>>> src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
>>>> b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
>>>> index 467ada5..c8014b9 100644
>>>> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
>>>> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
>>>> @@ -207,7 +207,7 @@ intel_miptree_supports_non_msrt_fast_clear(struct
>>>> brw_context *brw,
>>>> if (!brw->format_supported_as_render_target[mt->format])
>>>> return false;
>>>>
>>>> - if (brw->gen >= 9) {
>>>> + if (brw->gen == 9) {
>>>> mesa_format linear_format = _mesa_get_srgb_format_linear(m
>>>> t->format);
>>>> const uint32_t brw_format = brw_isl_format_for_mesa_format
>>>> (linear_format);
>>>> return isl_format_supports_ccs_e(&brw->screen->devinfo,
>>>> brw_format);
>>>>
>>>
>>> I thought sRGB was supported for CCS_E on CNL. If so, we should update
>>> the table in isl_format_supports_ccs_e(). Also, I believe sRGB is
>>> supported for CCS_D even on sky lake, you just can't sample from it.
>>>
>>>
>> The patch predates ISL... yes, we should. Anuj, would you mind doing this?
>
>I'll update the table in v2. As sRGB now supports lossless compression,
>don't we
>also need to stop resolving single sampled color render buffers for sRGB
>formats
>in Gen 10? See i965/brw_context.c:329
>[snip]
> /* If FRAMEBUFFER_SRGB is used on Gen9+ then we need to resolve any of
>the
> * single-sampled color renderbuffers because the CCS buffer isn't
> * supported for SRGB formats. This only matters if FRAMEBUFFER_SRGB is
> * enabled because otherwise the surface state will be programmed with
>the
> * linear equivalent format anyway.
> */
> if (brw->gen >= 9 && ctx->Color.sRGBEnabled) {
> struct gl_framebuffer *fb = ctx->DrawBuffer;
> for (int i = 0; i < fb->_NumColorDrawBuffers; i++) {
>
>
>
Yes, it looks like it. Not sure how I missed that before.
>
>>
>>
>> --
>>>> 2.9.3
>>>>
>>>> _______________________________________________
>>>> mesa-dev mailing list
>>>> mesa-dev at lists.freedesktop.org
>>>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>>>
>>>
>>>
>>>
More information about the mesa-dev
mailing list