diff options
author | Brian Paul <[email protected]> | 2012-09-16 19:42:15 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-09-17 19:49:27 -0600 |
commit | ead8847d4482d2690602cbfcef00c86c392d9934 (patch) | |
tree | c6c70614afd4b9bfdb80a7b76549c91aab426351 /src/mesa/state_tracker/st_texture.c | |
parent | bd8b43a9f467a244ac75dcbf13f162793ccc5f6e (diff) |
st/mesa: implement new proxy texture code
If the gallium driver implements the can_create_resource() function, call
it to do proxy texture size checks.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_texture.c')
-rw-r--r-- | src/mesa/state_tracker/st_texture.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index 9627a61177c..3670683b5a3 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -117,6 +117,7 @@ st_gl_texture_dims_to_pipe_dims(GLenum texture, { switch (texture) { case GL_TEXTURE_1D: + case GL_PROXY_TEXTURE_1D: assert(heightIn == 1); assert(depthIn == 1); *widthOut = widthIn; @@ -125,6 +126,7 @@ st_gl_texture_dims_to_pipe_dims(GLenum texture, *layersOut = 1; break; case GL_TEXTURE_1D_ARRAY: + case GL_PROXY_TEXTURE_1D_ARRAY: assert(depthIn == 1); *widthOut = widthIn; *heightOut = 1; @@ -132,7 +134,9 @@ st_gl_texture_dims_to_pipe_dims(GLenum texture, *layersOut = heightIn; break; case GL_TEXTURE_2D: + case GL_PROXY_TEXTURE_2D: case GL_TEXTURE_RECTANGLE: + case GL_PROXY_TEXTURE_RECTANGLE: case GL_TEXTURE_EXTERNAL_OES: assert(depthIn == 1); *widthOut = widthIn; @@ -141,6 +145,13 @@ st_gl_texture_dims_to_pipe_dims(GLenum texture, *layersOut = 1; break; case GL_TEXTURE_CUBE_MAP: + case GL_PROXY_TEXTURE_CUBE_MAP: + case GL_TEXTURE_CUBE_MAP_POSITIVE_X: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: + case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: + case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: assert(depthIn == 1); *widthOut = widthIn; *heightOut = heightIn; @@ -148,6 +159,7 @@ st_gl_texture_dims_to_pipe_dims(GLenum texture, *layersOut = 6; break; case GL_TEXTURE_2D_ARRAY: + case GL_PROXY_TEXTURE_2D_ARRAY: *widthOut = widthIn; *heightOut = heightIn; *depthOut = 1; @@ -157,6 +169,7 @@ st_gl_texture_dims_to_pipe_dims(GLenum texture, assert(0 && "Unexpected texture in st_gl_texture_dims_to_pipe_dims()"); /* fall-through */ case GL_TEXTURE_3D: + case GL_PROXY_TEXTURE_3D: *widthOut = widthIn; *heightOut = heightIn; *depthOut = depthIn; |