[Mesa-dev] [PATCH] mesa: fix texstore with GL_COLOR_INDEX data

Roland Scheidegger sroland at vmware.com
Wed Aug 13 10:46:35 PDT 2014


Ha one minute faster :-).
FWIW interestingly this one also fixes the other conform failures I was
seeing (with GL_BYTE/GL_RGB data) when unconditionally disabling
texstore_swizzle so I guess the results of the swizzle path aren't quite
identical to the fallback one, which is a bit worrying.

Roland


Am 13.08.2014 19:35, schrieb Jason Ekstrand:
> Roland,
> I just sent the exact same patch.
> 
> Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com
> <mailto:jason.ekstrand at intel.com>>
> 
> 
> On Wed, Aug 13, 2014 at 10:33 AM, <sroland at vmware.com
> <mailto:sroland at vmware.com>> wrote:
> 
>     From: Roland Scheidegger <sroland at vmware.com
>     <mailto:sroland at vmware.com>>
> 
>     This got broken by 3dbf5bf6571e0c9d3e4febce01dea82be190d9d2.
>     GL_COLOR_INDEX data is still supported (in legacy contexts), but the new
>     texstore_swizzle path cannot handle it (and didn't detect this).
>     Unfortunately there's no piglit test trying to specify textures with a
>     GL_COLOR_INDEX source format, and I don't really understand how all
>     the color
>     map stuff which is used by this works, but this caused conform failures
>     (with a reported mesa implementation error when trying to figure out
>     the color
>     mapping).
>     ---
>      src/mesa/main/texstore.c | 3 +++
>      1 file changed, 3 insertions(+)
> 
>     diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
>     index 50306d8..4ea5bd8 100644
>     --- a/src/mesa/main/texstore.c
>     +++ b/src/mesa/main/texstore.c
>     @@ -1495,6 +1495,9 @@ texstore_swizzle(TEXSTORE_PARAMS)
>         if (!is_array)
>            return GL_FALSE;
> 
>     +   if (srcFormat == GL_COLOR_INDEX)
>     +      return GL_FALSE;
>     +
>         switch (srcType) {
>         case GL_FLOAT:
>         case GL_UNSIGNED_BYTE:
>     --
>     1.9.1
>     _______________________________________________
>     mesa-dev mailing list
>     mesa-dev at lists.freedesktop.org <mailto:mesa-dev at lists.freedesktop.org>
>     http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>     <https://urldefense.proofpoint.com/v1/url?u=http://lists.freedesktop.org/mailman/listinfo/mesa-dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=F4msKE2WxRzA%2BwN%2B25muztFm5TSPwE8HKJfWfR2NgfY%3D%0A&m=kpN1ocKMKopthTMpVD729xdP3L%2F%2BKfivsbBUJlBpVdY%3D%0A&s=079b1ceec81b05c2373f584c1766e6c24fe8895f13610993060e66d56dc2a1de>
> 
> 



More information about the mesa-dev mailing list