a4xx is same, we need to set dest type (s16/s32/u16/u32/f16/f32) in the shader instruction
BR, -R On Thu, Jun 4, 2015 at 12:48 PM, Ilia Mirkin <imir...@alum.mit.edu> wrote: > On a3xx at least, the format you get in the shader is separate from > sampler/texture settings. You can get int as floats back, or regular ints, > depending on instruction dest type. So we need to specify float or int value > in the shader, otherwise we get the wrong format back. > > On Jun 4, 2015 19:19, "Marek Olšák" <mar...@gmail.com> wrote: >> >> Reviewed-by: Marek Olšák <marek.ol...@amd.com> >> >> What does the type really do? Does it only disable filtering for >> int/uint? Because without filtering, there is no difference between a >> float and int texture fetch. >> >> Marek >> >> On Thu, Jun 4, 2015 at 5:50 PM, Rob Clark <robdcl...@gmail.com> wrote: >> > From: Rob Clark <robcl...@freedesktop.org> >> > >> > Some drivers (well, at least freedreno, maybe others?) need to know >> > when compiling the shader whether the texture is float/int/unsigned. >> > This information is in GLSL IR, and in NIR, but lacking in TGSI. >> > >> > This was previously worked around in the driver by using a shader >> > variant. But that is annoying and stupid. >> > >> > Rob Clark (2): >> > tgsi: add texture-type info to texture instructions >> > gallium/ttn: add texture-type support >> > >> > src/gallium/auxiliary/nir/tgsi_to_nir.c | 14 ++++++++++++++ >> > src/gallium/auxiliary/tgsi/tgsi_ureg.c | 7 +++++-- >> > src/gallium/auxiliary/tgsi/tgsi_ureg.h | 22 +++++++++++++++------- >> > src/gallium/include/pipe/p_shader_tokens.h | 7 ++++++- >> > src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 19 +++++++++++++++++++ >> > src/mesa/state_tracker/st_mesa_to_tgsi.c | 1 + >> > 6 files changed, 60 insertions(+), 10 deletions(-) >> > >> > -- >> > 2.4.2 >> > >> > _______________________________________________ >> > mesa-dev mailing list >> > mesa-dev@lists.freedesktop.org >> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev >> _______________________________________________ >> mesa-dev mailing list >> mesa-dev@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev