#include "glheader.h"
-#include "imports.h"
+
#include "accum.h"
#include "api_exec.h"
#include "api_loopback.h"
#include "compiler/glsl/builtin_functions.h"
#include "compiler/glsl/glsl_parser_extras.h"
#include <stdbool.h>
+#include "util/u_memory.h"
#ifndef MESA_VERBOSE
{
if (MESA_VERBOSE & VERBOSE_SWAPBUFFERS)
_mesa_debug(ctx, "SwapBuffers\n");
- FLUSH_CURRENT( ctx, 0 );
+ FLUSH_VERTICES(ctx, 0);
if (ctx->Driver.Flush) {
ctx->Driver.Flush(ctx);
}
* \param stencilBits requested minimum bits per stencil buffer value
* \param accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits number
* of bits per color component in accum buffer.
- * \param indexBits number of bits per pixel if \p rgbFlag is GL_FALSE
* \param redBits number of bits per color component in frame buffer for RGB(A)
* mode. We always use 8 in core Mesa though.
* \param greenBits same as above.
assert(accumBlueBits >= 0);
assert(accumAlphaBits >= 0);
- vis->rgbMode = GL_TRUE;
vis->doubleBufferMode = dbFlag;
vis->stereoMode = stereoFlag;
vis->alphaBits = alphaBits;
vis->rgbBits = redBits + greenBits + blueBits;
- vis->indexBits = 0;
vis->depthBits = depthBits;
vis->stencilBits = stencilBits;
vis->accumBlueBits = accumBlueBits;
vis->accumAlphaBits = accumAlphaBits;
- vis->haveAccumBuffer = accumRedBits > 0;
- vis->haveDepthBuffer = depthBits > 0;
- vis->haveStencilBuffer = stencilBits > 0;
-
vis->numAuxBuffers = 0;
vis->level = 0;
vis->sampleBuffers = numSamples > 0 ? 1 : 0;
consts->GLSLVersion = api == API_OPENGL_CORE ? 130 : 120;
consts->GLSLVersionCompat = consts->GLSLVersion;
+ consts->GLSLLowerConstArrays = true;
+
/* Assume that if GLSL 1.30+ (or GLSL ES 3.00+) is supported that
* gl_VertexID is implemented using a native hardware register with OpenGL
* semantics.
consts->ConservativeRasterDilateRange[0] = 0.0;
consts->ConservativeRasterDilateRange[1] = 0.0;
consts->ConservativeRasterDilateGranularity = 0.0;
+
+ consts->glBeginEndBufferSize = 512 * 1024;
}
* \sa _mesa_initialize_context() and init_attrib_groups().
*/
void
-_mesa_free_context_data(struct gl_context *ctx, bool destroy_compiler_types)
+_mesa_free_context_data(struct gl_context *ctx)
{
if (!_mesa_get_current_context()){
/* No current context, but we may need one in order to delete
_mesa_destroy_context( struct gl_context *ctx )
{
if (ctx) {
- _mesa_free_context_data(ctx, true);
+ _mesa_free_context_data(ctx);
free( (void *) ctx );
}
}
ctxvis->foo != bufvis->foo) \
return GL_FALSE
- check_component(redMask);
- check_component(greenMask);
- check_component(blueMask);
+ check_component(redShift);
+ check_component(greenShift);
+ check_component(blueShift);
+ check_component(redBits);
+ check_component(greenBits);
+ check_component(blueBits);
check_component(depthBits);
check_component(stencilBits);
* changed since the last time this FBO was bound).
*/
_mesa_update_draw_buffers(newCtx);
+ _mesa_update_allow_draw_out_of_order(newCtx);
}
if (!newCtx->ReadBuffer || _mesa_is_winsys_fbo(newCtx->ReadBuffer)) {
_mesa_reference_framebuffer(&newCtx->ReadBuffer, readBuffer);
_mesa_flush(struct gl_context *ctx)
{
FLUSH_VERTICES( ctx, 0 );
- FLUSH_CURRENT( ctx, 0 );
if (ctx->Driver.Flush) {
ctx->Driver.Flush(ctx);
}
ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, 0);
- FLUSH_CURRENT(ctx, 0);
if (ctx->Driver.Finish) {
ctx->Driver.Finish(ctx);