On Fri, Feb 2, 2018 at 4:07 AM, Gert Wollny <gw.foss...@gmail.com> wrote: > Am Freitag, den 02.02.2018, 09:04 +0100 schrieb Roland Scheidegger: >> >> >> Yes, the _GL spec_ says it is an array. >> But in gallium it can't be. Therefore I think it's incorrect if we >> end up with array accesses there (albeit I was too lazy to actually >> look at the tgsi, but I'm pretty sure it isn't declard as an array). > the TGSI for the relevant shader in the piglit looks like this: > > FRAG > DCL SV[0], SAMPLEMASK > DCL OUT[0], COLOR > DCL CONST[0][0] > DCL TEMP[0..1], LOCAL > DCL ADDR[0] > IMM[0] FLT32 { 1.0000, 0.0000, 0.0000, 0.0000} > IMM[1] INT32 {1, 0, 0, 0} > 0: MOV TEMP[0], IMM[0].xyyx > 1: UARL ADDR[0].x, CONST[0][0].xxxx > 2: USEQ TEMP[1].x, SV[ADDR[0].x].xxxx, IMM[1].xxxx
OK, this is a big problem. I'm guessing the GLSL code was something like gl_SampleMaskIn[uniform] What this got translated into was an indirect access into the *global implicit array of system values*. We don't want that. glsl_to_tgsi should just be dropping the indirect access entirely. Cheers, -ilia _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev