aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_resource_texture.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-06-24 14:59:53 -0600
committerBrian Paul <[email protected]>2013-06-25 17:54:24 -0600
commit808da7d8ca26f71832dc94bb50180b60a5ee3af2 (patch)
tree9f9fea4c5eb909c0168070ff8d0dd834bc7b527d /src/gallium/drivers/svga/svga_resource_texture.h
parent2cc27c3faac79988dbf4693a543555cc58b2e4b0 (diff)
svga: use new svga_define_texture_level() helper
To get array bounds checking. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_resource_texture.h')
-rw-r--r--src/gallium/drivers/svga/svga_resource_texture.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_texture.h b/src/gallium/drivers/svga/svga_resource_texture.h
index 58646f70de5..7e2e61339e0 100644
--- a/src/gallium/drivers/svga/svga_resource_texture.h
+++ b/src/gallium/drivers/svga/svga_resource_texture.h
@@ -130,6 +130,19 @@ svga_age_texture_view(struct svga_texture *tex, unsigned level)
}
+/**
+ * Mark the given texture face/level as being defined.
+ */
+static INLINE void
+svga_define_texture_level(struct svga_texture *tex,
+ unsigned face,unsigned level)
+{
+ assert(face < Elements(tex->defined));
+ assert(level < Elements(tex->defined[0]));
+ tex->defined[face][level] = TRUE;
+}
+
+
struct pipe_resource *
svga_texture_create(struct pipe_screen *screen,
const struct pipe_resource *template);