On Mon, Jan 2, 2012 at 3:31 PM, Dave Airlie <airl...@gmail.com> wrote: > On Mon, Jan 2, 2012 at 1:07 PM, Marek Olšák <mar...@gmail.com> wrote: >> Fetching int as float and vice versa is not allowed. >> Fetching unsigned int as signed int and vice versa is not allowed either. > > The first is true, the second isn't, otherwise I'd have implemented > this that way. > >> Doing conversions like that isn't allowed in OpenGL. > > I don't have chapter/verse but EXT_texture_integer doesn't seem to > disallow this.
EXT_texture_integer doesn't, but that extension doesn't define the new GLSL samplers, it only requires EXT_gpu_shader4. See this part from EXT_gpu_shader4 (modifications to section 8.7 of the GLSL spec): Table 8.xxx lists the supported combinations of sampler types and texture internal formats. texture internal default (float) integer unsigned integer format sampler sampler sampler float vec4 n/a n/a normalized vec4 n/a n/a signed int n/a ivec4 n/a unsigned int n/a n/a uvec4 That is, no conversions are allowed. The pack/unpack stuff is different, because it doesn't involve shaders. I have no opinion on whether we should be that strict in u_format or not. Being strict may later prevent making programming mistakes though. Marek _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev