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.
This commit is contained in:
Brian Paul
2010-03-10 10:50:17 -07:00
parent 9543b0a1ea
commit 06c44e852f

View File

@@ -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);