Skip to content

mesa: Fix glGetPixelMapuiv for I_TO_I and S_TO_S map case

Mamoru TASAKA requested to merge mtasaka/mesa:get_mixel_map-fix into main

mesa: Fix glGetPixelMapuiv for I_TO_I and S_TO_S map case

For GL_PIXEL_MAP_I_TO_I and GL_PIXEL_MAP_S_TO_S map cases, glPixelMapuiv just casts the original indexes from GLuint to GLfloat, just as glPixelMapusv does from GLushort to GLfloat.

So for the above 2 map cases, the correspoinding glGetPixelMapuiv should do just the reversed operation, that is to just cast from GLfloat to GLuint the stores the results to the destination one element by one, as same as what glGetPixelMapusv does. Here memcpy() cannot be used because the types of source and destination differ.

Closes #9958 .

Merge request reports