diff options
author | marha <marha@users.sourceforge.net> | 2012-08-16 14:48:54 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-08-16 14:48:54 +0200 |
commit | 4aac32998c2b173b84aec0b020aa086fef4b1423 (patch) | |
tree | 3ffcb971bcc2f01929f60f8f704996544b69b2e1 /mesalib/src/gallium/auxiliary/util/u_inlines.h | |
parent | 9ddf44af81782451cee798e06749ce3067a14a41 (diff) | |
download | vcxsrv-4aac32998c2b173b84aec0b020aa086fef4b1423.tar.gz vcxsrv-4aac32998c2b173b84aec0b020aa086fef4b1423.tar.bz2 vcxsrv-4aac32998c2b173b84aec0b020aa086fef4b1423.zip |
libxcb xserver mesa git update 16 Aug 2012
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_inlines.h')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_inlines.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_inlines.h b/mesalib/src/gallium/auxiliary/util/u_inlines.h index 2d603e4dd..a1ece415f 100644 --- a/mesalib/src/gallium/auxiliary/util/u_inlines.h +++ b/mesalib/src/gallium/auxiliary/util/u_inlines.h @@ -548,23 +548,37 @@ util_query_clear_result(union pipe_query_result *result, unsigned type) /** Convert PIPE_TEXTURE_x to TGSI_TEXTURE_x */ static INLINE unsigned -util_pipe_tex_to_tgsi_tex(enum pipe_texture_target pipe_tex_target) +util_pipe_tex_to_tgsi_tex(enum pipe_texture_target pipe_tex_target, + unsigned nr_samples) { switch (pipe_tex_target) { case PIPE_TEXTURE_1D: + assert(nr_samples <= 1); return TGSI_TEXTURE_1D; + case PIPE_TEXTURE_2D: - return TGSI_TEXTURE_2D; + return nr_samples > 1 ? TGSI_TEXTURE_2D_MSAA : TGSI_TEXTURE_2D; + case PIPE_TEXTURE_RECT: + assert(nr_samples <= 1); return TGSI_TEXTURE_RECT; + case PIPE_TEXTURE_3D: + assert(nr_samples <= 1); return TGSI_TEXTURE_3D; + case PIPE_TEXTURE_CUBE: + assert(nr_samples <= 1); return TGSI_TEXTURE_CUBE; + case PIPE_TEXTURE_1D_ARRAY: + assert(nr_samples <= 1); return TGSI_TEXTURE_1D_ARRAY; + case PIPE_TEXTURE_2D_ARRAY: - return TGSI_TEXTURE_2D_ARRAY; + return nr_samples > 1 ? TGSI_TEXTURE_2D_ARRAY_MSAA : + TGSI_TEXTURE_2D_ARRAY; + default: assert(0 && "unexpected texture target"); return TGSI_TEXTURE_UNKNOWN; |