#include "main/buffers.h"
#include "main/clear.h"
#include "main/condrender.h"
+#include "main/draw.h"
#include "main/depth.h"
#include "main/enable.h"
#include "main/fbobject.h"
struct temp_texture *tex);
static void meta_glsl_clear_cleanup(struct gl_context *ctx,
struct clear_state *clear);
+static void meta_copypix_cleanup(struct gl_context *ctx,
+ struct copypix_state *copypix);
static void meta_decompress_cleanup(struct gl_context *ctx,
struct decompress_state *decompress);
static void meta_drawpix_cleanup(struct gl_context *ctx,
assert(att);
_mesa_framebuffer_texture(ctx, fb, attachment, att, texObj, texTarget,
- level, layer, false);
+ level, att->NumSamples, layer, false);
}
static struct gl_shader *
_mesa_make_current(ctx, NULL, NULL);
_mesa_meta_glsl_blit_cleanup(ctx, &ctx->Meta->Blit);
meta_glsl_clear_cleanup(ctx, &ctx->Meta->Clear);
+ meta_copypix_cleanup(ctx, &ctx->Meta->CopyPix);
_mesa_meta_glsl_generate_mipmap_cleanup(ctx, &ctx->Meta->Mipmap);
cleanup_temp_texture(ctx, &ctx->Meta->TempTex);
meta_decompress_cleanup(ctx, &ctx->Meta->Decompress);
else {
/* use 2D texture, NPOT if possible */
tex->Target = GL_TEXTURE_2D;
- tex->MaxSize = 1 << (ctx->Const.MaxTextureLevels - 1);
+ tex->MaxSize = ctx->Const.MaxTextureSize;
tex->NPOT = ctx->Extensions.ARB_texture_non_power_of_two;
}
tex->MinSize = 16; /* 16 x 16 at least */
/* load image */
_mesa_TexSubImage2D(tex->Target, 0,
0, 0, width, height, format, type, pixels);
+
+ _mesa_reference_buffer_object(ctx, &save_unpack_obj, NULL);
}
}
else {
}
}
+static void
+meta_copypix_cleanup(struct gl_context *ctx, struct copypix_state *copypix)
+{
+ if (copypix->VAO == 0)
+ return;
+ _mesa_DeleteVertexArrays(1, ©pix->VAO);
+ copypix->VAO = 0;
+ _mesa_reference_buffer_object(ctx, ©pix->buf_obj, NULL);
+}
+
+
/**
* Given a bitfield of BUFFER_BIT_x draw buffers, call glDrawBuffers to
* set GL to only draw to those buffers.