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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user