diff options
author | Brian Paul <brianp@vmware.com> | 2011-01-25 20:26:22 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2011-01-25 20:26:22 -0700 |
commit | 9b56a2cb626b254bcb7b7202e6babd1b5570208f (patch) | |
tree | a745724a278b221674b953ec53f2dc7dd09a579e | |
parent | c0d941877b410b2402ed853d1d33b0664a3d1445 (diff) | |
download | external_mesa3d-9b56a2cb626b254bcb7b7202e6babd1b5570208f.zip external_mesa3d-9b56a2cb626b254bcb7b7202e6babd1b5570208f.tar.gz external_mesa3d-9b56a2cb626b254bcb7b7202e6babd1b5570208f.tar.bz2 |
st/mesa: support for 1D/2D texture arrays
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 9 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 6 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_mesa_to_tgsi.c | 2 |
3 files changed, 12 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 7959107..9653dcd 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -74,19 +74,18 @@ gl_target_to_pipe(GLenum target) switch (target) { case GL_TEXTURE_1D: return PIPE_TEXTURE_1D; - case GL_TEXTURE_2D: return PIPE_TEXTURE_2D; - case GL_TEXTURE_RECTANGLE_NV: return PIPE_TEXTURE_RECT; - case GL_TEXTURE_3D: return PIPE_TEXTURE_3D; - case GL_TEXTURE_CUBE_MAP_ARB: return PIPE_TEXTURE_CUBE; - + case GL_TEXTURE_1D_ARRAY_EXT: + return PIPE_TEXTURE_1D_ARRAY; + case GL_TEXTURE_2D_ARRAY_EXT: + return PIPE_TEXTURE_2D_ARRAY; default: assert(0); return 0; diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index d7ed7ea..a81cbe8 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -420,6 +420,12 @@ void st_init_extensions(struct st_context *st) ctx->Extensions.MESA_ycbcr_texture = GL_TRUE; } + /* GL_EXT_texture_array */ + if (screen->get_param(screen, PIPE_CAP_ARRAY_TEXTURES)) { + ctx->Extensions.EXT_texture_array = GL_TRUE; + ctx->Extensions.MESA_texture_array = GL_TRUE; + } + /* GL_ARB_framebuffer_object */ if (ctx->Extensions.EXT_packed_depth_stencil) { /* we support always support GL_EXT_framebuffer_blit */ diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index a14551b..5c68fd7 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -286,6 +286,8 @@ translate_texture_target( GLuint textarget, case TEXTURE_3D_INDEX: return TGSI_TEXTURE_3D; case TEXTURE_CUBE_INDEX: return TGSI_TEXTURE_CUBE; case TEXTURE_RECT_INDEX: return TGSI_TEXTURE_RECT; + case TEXTURE_1D_ARRAY_INDEX: return TGSI_TEXTURE_1D_ARRAY; + case TEXTURE_2D_ARRAY_INDEX: return TGSI_TEXTURE_2D_ARRAY; default: debug_assert( 0 ); return TGSI_TEXTURE_1D; |