summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/swrast.h
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2012-02-16 16:00:45 -0800
committerPaul Berry <[email protected]>2012-02-22 13:33:20 -0800
commit80513ec8b4c812b9c6249cc5824337a5f04ab34c (patch)
treeb746b0fc049cf906e27efcb1c6b786d1b5a42d0a /src/mesa/swrast/swrast.h
parent0beed7f072e2a8127c7c02dfc39fb37053d96b22 (diff)
i915: Initialize swrast_texture_image structure fields.
Commit 980f6f1 (mesa: move gl_texture_image::Width/Height/DepthScale fields to swrast) moved the initialization of the Width, Height, and DepthScale fields to _swrast_alloc_texture_image_buffer(). However, i915 doesn't call this function because it performs its own buffer allocation. As a result, the Width, Height, and DepthScale fields weren't getting initialized properly, and some operations requiring swrast would fail. This patch ensures that Width, Height, and DepthScale are properly initialized by separating the code that sets them into a new function, _swrast_init_texture_image(), which is called by intel_alloc_texture_image_buffer() as well as _swrast_alloc_texture_image_buffer(). It also moves the initialization of _IsPowerOfTwo into this function. Fixes piglit test fbo/fbo-cubemap on i915. Partially fixes https://bugs.freedesktop.org/show_bug.cgi?id=41216 This is a candidate for the 8.0 branch. Reviewed-and-tested-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/swrast/swrast.h')
-rw-r--r--src/mesa/swrast/swrast.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/swrast/swrast.h b/src/mesa/swrast/swrast.h
index 468d22f0b88..ad19eeeccd8 100644
--- a/src/mesa/swrast/swrast.h
+++ b/src/mesa/swrast/swrast.h
@@ -192,6 +192,10 @@ _swrast_alloc_texture_image_buffer(struct gl_context *ctx,
GLsizei height, GLsizei depth);
extern void
+_swrast_init_texture_image(struct gl_texture_image *texImage, GLsizei width,
+ GLsizei height, GLsizei depth);
+
+extern void
_swrast_free_texture_image_buffer(struct gl_context *ctx,
struct gl_texture_image *texImage);