softpipe: Add an extra code path for the buffer texel lookup
authorGert Wollny <gert.wollny@collabora.com>
Sun, 7 Apr 2019 06:37:45 +0000 (08:37 +0200)
committerGert Wollny <gw.fossdev@gmail.com>
Tue, 9 Apr 2019 08:17:44 +0000 (08:17 +0000)
commit8cf8dfe408a7dda5121cefc2fd5d772186484f76
tree479582b1849e00f16e8d4cc7f597b808bcca6b8d
parent47dd7c40544e00888ca8942af2914b2fcdcd94f0
softpipe: Add an extra code path for the buffer texel lookup

With buffers the addressing is done on a per-byte bases so the code
path for normal textures doesn't work properly. Also add an assert
to make sure that the bit cound for storing the X coordinate is
large enough.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/softpipe/sp_tex_sample.c