svga: add/use new svga_sampler_format() function
authorBrian Paul <brianp@vmware.com>
Mon, 16 Nov 2015 17:31:46 +0000 (10:31 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 18 Nov 2015 16:15:54 +0000 (09:15 -0700)
commit1a90e3e1e3ee70504f2ce57462fb592b448269be
treed89f00d00c7ed1e8c7ee5e34d09ceebf54d1e3f4
parent27ce75ed12c814b0d4b96c32f6e89ba308910e26
svga: add/use new svga_sampler_format() function

This is important for the case of sampling from a depth texture.  In
that case, we need to sample the texture as if it were a single-channel
color texture.  For other/color formats, we can use the format as-is.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/drivers/svga/svga_format.c
src/gallium/drivers/svga/svga_format.h
src/gallium/drivers/svga/svga_state_sampler.c