I was able to reproduce the issue directly on the hardware, i.e. a r600 based graphics card that is a vec4 based architecture.
@gerddie Thanks for the report! We'll take a look at this soon. We're currently in the middle of a major Wine upgrade, so may take some time.
Thanks, the changes based on this report are in Experimental ([bleeding edge] branch).
Nothing extracted yet.
Debugging an issue running
Tomb Raider IIby using the mesa/virgl driver within a Qemu VM showed a problem with the gamma correction as done with fshack: The shader doesn't specify any layout for the gamma array values which results that in this case the array values being allocated with a stride of 16 byte (vec4), but when the data is uploaded by usingglBufferDatait expects that the array is densely packed, and the result is that the "gamma corrected" output has only an incorrect red component.According to
OpenGL 4.6 (Core profile) May 14, 2018, section 7.6.2.2. theuniforms contained within a uniform block are extracted from buffer storage in an implementation-dependent mannerand the offsets and alignments can by queried by usingglGetActiveUniformsiv, and this latter step is missing here.To avoid the querying and the dynamic setup of the data to be passed into the buffer one can declare the UBO as
std140, and in this case the alignment of each array element isvec4(according to the same section in the spec).With that one could, for instance, use a shader like
And pack the data passed into an array of
4 * 256 * sizeof(float)ordered [r,g,b,0].