X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fstate_tracker%2Fst_texture.h;h=d50c3c9af79a01b743d0f109b1afa58b548bd5d8;hb=c1477f6ffe6a3d032dbcc76a5f506a7293e2fece;hp=c78901c0360d25c485649ee4821e0b8a16ca9541;hpb=cd6a31cd4a9ea6deef4778c2eaef2d47240c3a6e;p=mesa.git diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h index c78901c0360..d50c3c9af79 100644 --- a/src/mesa/state_tracker/st_texture.h +++ b/src/mesa/state_tracker/st_texture.h @@ -71,7 +71,10 @@ struct st_texture_object */ GLuint lastLevel; - /** The size of the level=0 mipmap image */ + /** The size of the level=0 mipmap image. + * Note that the number of 1D array layers will be in height0 and the + * number of 2D array layers will be in depth0, as in GL. + */ GLuint width0, height0, depth0; /* On validation any active images held in main memory or in other @@ -125,9 +128,7 @@ st_create_texture_sampler_view(struct pipe_context *pipe, { struct pipe_sampler_view templ; - u_sampler_view_default_template(&templ, - texture, - texture->format); + u_sampler_view_default_template(&templ, texture, texture->format); return pipe->create_sampler_view(pipe, texture, &templ); } @@ -140,17 +141,15 @@ st_create_texture_sampler_view_format(struct pipe_context *pipe, { struct pipe_sampler_view templ; - u_sampler_view_default_template(&templ, - texture, - format); + u_sampler_view_default_template(&templ, texture, format); return pipe->create_sampler_view(pipe, texture, &templ); } + static INLINE struct pipe_sampler_view * st_get_texture_sampler_view(struct st_texture_object *stObj, struct pipe_context *pipe) - { if (!stObj || !stObj->pt) { return NULL; @@ -172,9 +171,20 @@ st_texture_create(struct st_context *st, GLuint width0, GLuint height0, GLuint depth0, + GLuint layers, GLuint tex_usage ); +extern void +st_gl_texture_dims_to_pipe_dims(GLenum texture, + GLuint widthIn, + GLuint heightIn, + GLuint depthIn, + GLuint *widthOut, + GLuint *heightOut, + GLuint *depthOut, + GLuint *layersOut); + /* Check if an image fits into an existing texture object. */ extern GLboolean