On 05/17/2017 12:05 PM, Tapani Pälli wrote:


On 05/17/2017 11:49 AM, Gao, Chun wrote:
Thanks for your comments. Are we working on GL_EXT_sRGB, or is there any plan for that?

There has been work done to enable it:

https://patchwork.freedesktop.org/patch/148975/

I believe Harish has been fixing some of the faults, work is still ongoing.

although yeah now when reading the spec, it's not going to solve this one, it says:

--- 8< ---

3) Should we allow the SRGB_*_S3TC_DXT* or any of the other COMPRESSED formats if the implementation supports any of those formats?

No since all hardware doesn't support this. It can be added as a separate extension if needed.
--- 8< ---

so ... ATM I'm not sure what the correct solution here is.



-----Original Message-----
From: Palli, Tapani
Sent: Wednesday, May 17, 2017 4:35 PM
To: Gao, Chun <chun....@intel.com>; mesa-dev@lists.freedesktop.org
Subject: Re: [Mesa-dev] [PATCH] mesa: Allow MESA_FORMAT_LAYOUT_S3TC in non-desktop mesa



On 05/17/2017 11:09 AM, Gao, Chun wrote:
I know EXT_texture_sRGB  is desktop OpenGL extension.
On Android-IA and ChromeOS ARC++, the game https://play.google.com/store/apps/details?id=com.eline.neveralonemobile could not display some texture correctly. I found the following formats which the game uses were blocked in _mesa_is_compressed_format():
GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT
GL_COMPRESSED_SRGB_S3TC_DXT1_EXT
GL_COMPRESSED_RGBA_S3TC_DXT5_EXT
GL_COMPRESSED_RGB_S3TC_DXT1_EXT

After removing _mesa_is_desktop_gl(ctx), the issue get fixed. I don't know why the android game uses desktop OpenGL formats GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT and GL_COMPRESSED_SRGB_S3TC_DXT1_EXT. To make it work, I removed the desktop check.

OK, this is useful information and means that the game has a bug.

If I understand requirements correctly here if/when GL_EXT_sRGB extension support is added, then this game should start to work OK.



-----Original Message-----
From: Palli, Tapani
Sent: Wednesday, May 17, 2017 3:36 PM
To: Gao, Chun <chun....@intel.com>; mesa-dev@lists.freedesktop.org
Subject: Re: [Mesa-dev] [PATCH] mesa: Allow MESA_FORMAT_LAYOUT_S3TC in non-desktop mesa

IMO this is not correct. Are you having problems with some application?

For Android games Mesa should already return true for the previous check
(ANGLE_texture_compression_dxt) and things should work OK. The check you are touching is desktop specific because EXT_texture_sRGB is available only on desktop GL (closest gles equivalent being GL_EXT_sRGB which we don't support).


On 05/17/2017 10:22 AM, Gao Chun wrote:
As s3tc formats are used in many Android games, desktop mesa check
should be removed for MESA_FORMAT_LAYOUT_S3TC.
---
    src/mesa/main/glformats.c | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index 4f240206ff45..e4f283c4dfa8 100644
--- a/src/mesa/main/glformats.c
+++ b/src/mesa/main/glformats.c
@@ -1376,8 +1376,7 @@ _mesa_is_compressed_format(const struct gl_context *ctx, GLenum format)
              */
             return ctx->Extensions.ANGLE_texture_compression_dxt;
          } else {
-         return _mesa_is_desktop_gl(ctx)
-            && ctx->Extensions.EXT_texture_sRGB
+         return ctx->Extensions.EXT_texture_sRGB
                && ctx->Extensions.EXT_texture_compression_s3tc;
          }
       case MESA_FORMAT_LAYOUT_FXT1:

_______________________________________________
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

Reply via email to