Re: [Mesa-dev] [PATCH 07/12] i965/cnl: Restore lossless compression for sRGB formats
On 17-04-25 14:53:46, Anuj Phogat wrote: On Mon, Apr 24, 2017 at 10:57 PM, Ben Widawskywrote: On 17-04-15 18:27:33, Jason Ekstrand wrote: On April 14, 2017 5:37:55 PM Anuj Phogat wrote: From: Ben Widawsky This support was removed on gen9 (it worked before then) and was brought back for gen10. Signed-off-by: Ben Widawsky --- 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(>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@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 07/12] i965/cnl: Restore lossless compression for sRGB formats
On Mon, Apr 24, 2017 at 10:57 PM, Ben Widawskywrote: > On 17-04-15 18:27:33, Jason Ekstrand wrote: > >> On April 14, 2017 5:37:55 PM Anuj Phogat wrote: >> >> From: Ben Widawsky >>> >>> This support was removed on gen9 (it worked before then) and was brought >>> back >>> for gen10. >>> >>> Signed-off-by: Ben Widawsky >>> --- >>> 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(>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++) { > > > -- >>> 2.9.3 >>> >>> ___ >>> mesa-dev mailing list >>> mesa-dev@lists.freedesktop.org >>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev >>> >> >> >> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 07/12] i965/cnl: Restore lossless compression for sRGB formats
On 17-04-15 18:27:33, Jason Ekstrand wrote: On April 14, 2017 5:37:55 PM Anuj Phogatwrote: From: Ben Widawsky This support was removed on gen9 (it worked before then) and was brought back for gen10. Signed-off-by: Ben Widawsky --- 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(mt->format); const uint32_t brw_format = brw_isl_format_for_mesa_format(linear_format); return isl_format_supports_ccs_e(>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? -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 07/12] i965/cnl: Restore lossless compression for sRGB formats
On April 14, 2017 5:37:55 PM Anuj Phogatwrote: From: Ben Widawsky This support was removed on gen9 (it worked before then) and was brought back for gen10. Signed-off-by: Ben Widawsky --- 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(mt->format); const uint32_t brw_format = brw_isl_format_for_mesa_format(linear_format); return isl_format_supports_ccs_e(>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. -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 07/12] i965/cnl: Restore lossless compression for sRGB formats
From: Ben WidawskyThis support was removed on gen9 (it worked before then) and was brought back for gen10. Signed-off-by: Ben Widawsky --- 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(mt->format); const uint32_t brw_format = brw_isl_format_for_mesa_format(linear_format); return isl_format_supports_ccs_e(>screen->devinfo, brw_format); -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev