Commit 004c9209 authored by Marek Olšák's avatar Marek Olšák
Browse files

st/mesa: relax requirements for doing glCopyPixels via blit



glCopyPixels doesn't use a vertex shader, so ignore it.
The rest should be obvious.
Reviewed-by: Zoltán Böszörményi's avatarZoltán Böszörményi <zboszor@gmail.com>
Part-of: <mesa/mesa!7720>
parent 88481143
......@@ -1564,15 +1564,16 @@ blit_copy_pixels(struct gl_context *ctx, GLint srcx, GLint srcy,
!ctx->Color.AlphaEnabled &&
(!ctx->Color.ColorLogicOpEnabled || ctx->Color.LogicOp == GL_COPY) &&
!ctx->Depth.BoundsTest &&
!ctx->Depth.Test &&
(!ctx->Depth.Test || (ctx->Depth.Func == GL_ALWAYS && !ctx->Depth.Mask)) &&
!ctx->Fog.Enabled &&
!ctx->Stencil.Enabled &&
(!ctx->Stencil.Enabled ||
(ctx->Stencil.FailFunc[0] == GL_KEEP &&
ctx->Stencil.ZPassFunc[0] == GL_KEEP &&
ctx->Stencil.ZFailFunc[0] == GL_KEEP)) &&
!ctx->FragmentProgram.Enabled &&
!ctx->VertexProgram.Enabled &&
!ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT] &&
!_mesa_ati_fragment_shader_enabled(ctx) &&
ctx->DrawBuffer->_NumColorDrawBuffers == 1)) &&
!ctx->Query.CondRenderQuery &&
!ctx->Query.CurrentOcclusionObject) {
struct st_renderbuffer *rbRead, *rbDraw;
......@@ -1657,6 +1658,7 @@ blit_copy_pixels(struct gl_context *ctx, GLint srcx, GLint srcy,
blit.dst.box.height = drawH;
blit.dst.box.depth = 1;
blit.filter = PIPE_TEX_FILTER_NEAREST;
blit.render_condition_enable = ctx->Query.CondRenderQuery != NULL;
if (type == GL_COLOR)
blit.mask |= PIPE_MASK_RGBA;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment