summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-03-10 10:50:17 -0700
committerBrian Paul <[email protected]>2010-03-10 10:50:19 -0700
commit06c44e852f4b38db03772adec769854b2f3096f6 (patch)
tree6e438073da3ba194486209d02edc6ff4e6723830 /src/mesa/state_tracker
parent9543b0a1eaf936dd75f2167c4cfcbdf1a0cda568 (diff)
st/mesa: set strb->format field in st_render_texture()
This fixes a problem in glReadPixels when reading from an FBO's texture attachment. We have a better chance at hitting a fast path for glReadPixels now.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 00e9d1dccbd..abf0c8d6cb1 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -379,6 +379,8 @@ st_render_texture(GLcontext *ctx,
PIPE_BUFFER_USAGE_GPU_READ |
PIPE_BUFFER_USAGE_GPU_WRITE);
+ strb->format = pt->format;
+
strb->Base.Format = st_pipe_format_to_mesa_format(pt->format);
strb->Base.DataType = st_format_datatype(pt->format);