Lines Matching refs:ctx
176 is_valid_blit_filter(const struct gl_context *ctx, GLenum filter)
184 return ctx->Extensions.EXT_framebuffer_multisample_blit_scaled;
192 validate_color_buffer(struct gl_context *ctx, struct gl_framebuffer *readFb,
215 if (_mesa_is_gles3(ctx) && (colorDrawRb == colorReadRb)) {
216 _mesa_error(ctx, GL_INVALID_OPERATION,
224 _mesa_error(ctx, GL_INVALID_OPERATION,
240 if (_mesa_is_gles(ctx) &&
242 _mesa_error(ctx, GL_INVALID_OPERATION,
257 _mesa_error(ctx, GL_INVALID_OPERATION,
267 validate_stencil_buffer(struct gl_context *ctx, struct gl_framebuffer *readFb,
276 if (_mesa_is_gles3(ctx) && (drawRb == readRb)) {
277 _mesa_error(ctx, GL_INVALID_OPERATION,
288 _mesa_error(ctx, GL_INVALID_OPERATION,
304 _mesa_error(ctx, GL_INVALID_OPERATION,
313 validate_depth_buffer(struct gl_context *ctx, struct gl_framebuffer *readFb,
322 if (_mesa_is_gles3(ctx) && (drawRb == readRb)) {
323 _mesa_error(ctx, GL_INVALID_OPERATION,
333 _mesa_error(ctx, GL_INVALID_OPERATION,
346 _mesa_error(ctx, GL_INVALID_OPERATION,
355 do_blit_framebuffer(struct gl_context *ctx,
362 struct st_context *st = st_context(ctx);
395 if (!_mesa_clip_blit(ctx, readFB, drawFB,
474 if (drawFB != ctx->WinSysDrawBuffer)
475 st_window_rectangles_to_blit(ctx, &blit);
493 st_finalize_texture(ctx, ctx->pipe, srcAtt->Texture, srcAtt->CubeMapFace);
506 if (!ctx->Color.sRGBEnabled)
516 _mesa_update_renderbuffer_surface(ctx, srcRb);
535 _mesa_update_renderbuffer_surface(ctx, dstRb);
545 ctx->pipe->blit(ctx->pipe, &blit);
588 ctx->pipe->blit(ctx->pipe, &blit);
606 ctx->pipe->blit(ctx->pipe, &blit);
622 ctx->pipe->blit(ctx->pipe, &blit);
629 blit_framebuffer(struct gl_context *ctx,
635 FLUSH_VERTICES(ctx, 0, 0);
645 _mesa_update_framebuffer(ctx, readFb, drawFb);
648 _mesa_update_draw_buffer_bounds(ctx, drawFb);
658 _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
663 if (!is_valid_blit_filter(ctx, filter)) {
664 _mesa_error(ctx, GL_INVALID_ENUM, "%s(invalid filter %s)", func,
672 _mesa_error(ctx, GL_INVALID_OPERATION, "%s(%s: invalid samples)", func,
678 _mesa_error(ctx, GL_INVALID_VALUE, "%s(invalid mask bits set)", func);
685 _mesa_error(ctx, GL_INVALID_OPERATION,
690 if (_mesa_is_gles3(ctx)) {
698 _mesa_error(ctx, GL_INVALID_OPERATION,
718 _mesa_error(ctx, GL_INVALID_OPERATION,
726 _mesa_error(ctx, GL_INVALID_OPERATION,
737 _mesa_error(ctx, GL_INVALID_OPERATION,
759 if (!validate_color_buffer(ctx, readFb, drawFb, filter, func))
779 if (!validate_stencil_buffer(ctx, readFb, drawFb, func))
799 if (!validate_depth_buffer(ctx, readFb, drawFb, func))
860 do_blit_framebuffer(ctx, readFb, drawFb,
868 blit_framebuffer_err(struct gl_context *ctx,
878 blit_framebuffer(ctx, readFb, drawFb, srcX0, srcY0, srcX1, srcY1,
895 GET_CURRENT_CONTEXT(ctx);
897 blit_framebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer,
909 GET_CURRENT_CONTEXT(ctx);
912 _mesa_debug(ctx,
919 blit_framebuffer_err(ctx, ctx->ReadBuffer, ctx->DrawBuffer,
927 blit_named_framebuffer(struct gl_context *ctx,
945 readFb = _mesa_lookup_framebuffer(ctx, readFramebuffer);
947 readFb = _mesa_lookup_framebuffer_err(ctx, readFramebuffer,
953 readFb = ctx->WinSysReadBuffer;
958 drawFb = _mesa_lookup_framebuffer(ctx, drawFramebuffer);
960 drawFb = _mesa_lookup_framebuffer_err(ctx, drawFramebuffer,
966 drawFb = ctx->WinSysDrawBuffer;
969 blit_framebuffer(ctx, readFb, drawFb,
985 GET_CURRENT_CONTEXT(ctx);
987 blit_named_framebuffer(ctx, readFramebuffer, drawFramebuffer,
1000 GET_CURRENT_CONTEXT(ctx);
1003 _mesa_debug(ctx,
1011 blit_named_framebuffer(ctx, readFramebuffer, drawFramebuffer,