Bug 104908 - Texture Compression Hint not converted to enum16
Summary: Texture Compression Hint not converted to enum16
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: All All
: medium minor
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-01 16:34 UTC by Baldur Karlsson
Modified: 2018-02-01 19:00 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Baldur Karlsson 2018-02-01 16:34:12 UTC
In commit f96a69f916a "mesa: replace GLenum with GLenum16 in common structures (v4)" it looks like Hints.TextureCompression was missed, it's still listed as an int which leads to 0x11001100 being returned instead of 0x1100 as it reads into the next value.

This diff fixes it for me, but there might be something else that needs to update:

diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index e10282a156..df082af207 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -783,7 +783,7 @@ descriptor=[
   [ "EDGE_FLAG_ARRAY_COUNT_EXT", "CONST(0), NO_EXTRA" ],
 
 # GL_ARB_texture_compression
-  [ "TEXTURE_COMPRESSION_HINT_ARB", "CONTEXT_INT(Hint.TextureCompression), NO_EXTRA" ],
+  [ "TEXTURE_COMPRESSION_HINT_ARB", "CONTEXT_ENUM16(Hint.TextureCompression), NO_EXTRA" ],
 
 # GL_EXT_compiled_vertex_array
   [ "ARRAY_ELEMENT_LOCK_FIRST_EXT", "CONTEXT_INT(Array.LockFirst), NO_EXTRA" ],
Comment 1 Brian Paul 2018-02-01 18:31:11 UTC
The patch looks good to me.  I'll push it in a bit.

I don't see any other issues related to Hint.TextureCompression.
Unfortunately, there's no Piglit test that hits this.
Comment 2 Brian Paul 2018-02-01 19:00:31 UTC
Fixed with commit 030821a8737cd8a7be001e40dafc1879f3df7866


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.