ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_NORMAL], 0.0, 0.0, 1.0, 1.0 );
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR0], 1.0, 1.0, 1.0, 1.0 );
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR1], 0.0, 0.0, 0.0, 1.0 );
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_NORMAL], 0.0, 0.0, 1.0, 1.0 );
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR0], 1.0, 1.0, 1.0, 1.0 );
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR1], 0.0, 0.0, 0.0, 1.0 );
/* Constants, may be overriden (usually only reduced) by device drivers */
consts->MaxTextureMbytes = MAX_TEXTURE_MBYTES;
/* Constants, may be overriden (usually only reduced) by device drivers */
consts->MaxTextureMbytes = MAX_TEXTURE_MBYTES;
consts->Max3DTextureLevels = MAX_3D_TEXTURE_LEVELS;
consts->MaxCubeTextureLevels = MAX_CUBE_TEXTURE_LEVELS;
consts->MaxTextureRectSize = MAX_TEXTURE_RECT_SIZE;
consts->Max3DTextureLevels = MAX_3D_TEXTURE_LEVELS;
consts->MaxCubeTextureLevels = MAX_CUBE_TEXTURE_LEVELS;
consts->MaxTextureRectSize = MAX_TEXTURE_RECT_SIZE;
consts->Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits = MAX_TEXTURE_IMAGE_UNITS;
consts->MaxGeometryOutputVertices = MAX_GEOMETRY_OUTPUT_VERTICES;
consts->MaxGeometryTotalOutputComponents = MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS;
consts->Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits = MAX_TEXTURE_IMAGE_UNITS;
consts->MaxGeometryOutputVertices = MAX_GEOMETRY_OUTPUT_VERTICES;
consts->MaxGeometryTotalOutputComponents = MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS;
consts->MaxComputeVariableGroupSize[1] = 512;
consts->MaxComputeVariableGroupSize[2] = 64;
consts->MaxComputeVariableGroupInvocations = 512;
consts->MaxComputeVariableGroupSize[1] = 512;
consts->MaxComputeVariableGroupSize[2] = 64;
consts->MaxComputeVariableGroupInvocations = 512;
+
+ /** GL_NV_conservative_raster */
+ consts->MaxSubpixelPrecisionBiasBits = 0;
+
+ /** GL_NV_conservative_raster_dilate */
+ consts->ConservativeRasterDilateRange[0] = 0.0;
+ consts->ConservativeRasterDilateRange[1] = 0.0;
+ consts->ConservativeRasterDilateGranularity = 0.0;
assert(ctx->Const.Max3DTextureLevels <= MAX_3D_TEXTURE_LEVELS);
assert(ctx->Const.MaxCubeTextureLevels <= MAX_CUBE_TEXTURE_LEVELS);
assert(ctx->Const.MaxTextureRectSize <= MAX_TEXTURE_RECT_SIZE);
assert(ctx->Const.Max3DTextureLevels <= MAX_3D_TEXTURE_LEVELS);
assert(ctx->Const.MaxCubeTextureLevels <= MAX_CUBE_TEXTURE_LEVELS);
assert(ctx->Const.MaxTextureRectSize <= MAX_TEXTURE_RECT_SIZE);
assert(MAX_TEXTURE_LEVELS >= MAX_CUBE_TEXTURE_LEVELS);
/* Max texture size should be <= max viewport size (render to texture) */
assert(MAX_TEXTURE_LEVELS >= MAX_CUBE_TEXTURE_LEVELS);
/* Max texture size should be <= max viewport size (render to texture) */
- assert((1U << (ctx->Const.MaxTextureLevels - 1))
- <= ctx->Const.MaxViewportWidth);
- assert((1U << (ctx->Const.MaxTextureLevels - 1))
- <= ctx->Const.MaxViewportHeight);
+ assert(ctx->Const.MaxTextureSize <= ctx->Const.MaxViewportWidth);
+ assert(ctx->Const.MaxTextureSize <= ctx->Const.MaxViewportHeight);
ctx->NewState = _NEW_ALL;
ctx->NewDriverState = ~0;
ctx->ErrorValue = GL_NO_ERROR;
ctx->NewState = _NEW_ALL;
ctx->NewDriverState = ~0;
ctx->ErrorValue = GL_NO_ERROR;
/* Plug in driver functions and context pointer here.
* This is important because when we call alloc_shared_state() below
* we'll call ctx->Driver.NewTextureObject() to create the default
/* Plug in driver functions and context pointer here.
* This is important because when we call alloc_shared_state() below
* we'll call ctx->Driver.NewTextureObject() to create the default
* GL_OES_texture_cube_map says
* "Initially all texture generation modes are set to REFLECTION_MAP_OES"
*/
* GL_OES_texture_cube_map says
* "Initially all texture generation modes are set to REFLECTION_MAP_OES"
*/
- for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
- struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
+ for (i = 0; i < ARRAY_SIZE(ctx->Texture.FixedFuncUnit); i++) {
+ struct gl_fixedfunc_texture_unit *texUnit =
+ &ctx->Texture.FixedFuncUnit[i];
+
texUnit->GenS.Mode = GL_REFLECTION_MAP_NV;
texUnit->GenT.Mode = GL_REFLECTION_MAP_NV;
texUnit->GenR.Mode = GL_REFLECTION_MAP_NV;
texUnit->GenS.Mode = GL_REFLECTION_MAP_NV;
texUnit->GenT.Mode = GL_REFLECTION_MAP_NV;
texUnit->GenR.Mode = GL_REFLECTION_MAP_NV;
{
if (!_mesa_get_current_context()){
/* No current context, but we may need one in order to delete
{
if (!_mesa_get_current_context()){
/* No current context, but we may need one in order to delete
_mesa_reference_vao(ctx, &ctx->Array.VAO, NULL);
_mesa_reference_vao(ctx, &ctx->Array.DefaultVAO, NULL);
_mesa_reference_vao(ctx, &ctx->Array.VAO, NULL);
_mesa_reference_vao(ctx, &ctx->Array.DefaultVAO, NULL);
_mesa_free_attrib_data(ctx);
_mesa_free_buffer_objects(ctx);
_mesa_free_eval_data( ctx );
_mesa_free_texture_data( ctx );
_mesa_free_attrib_data(ctx);
_mesa_free_buffer_objects(ctx);
_mesa_free_eval_data( ctx );
_mesa_free_texture_data( ctx );
_mesa_free_matrix_data( ctx );
_mesa_free_pipeline_data(ctx);
_mesa_free_program_data(ctx);
_mesa_free_matrix_data( ctx );
_mesa_free_pipeline_data(ctx);
_mesa_free_program_data(ctx);
/* unbind the context if it's currently bound */
if (ctx == _mesa_get_current_context()) {
_mesa_make_current(NULL, NULL, NULL);
/* unbind the context if it's currently bound */
if (ctx == _mesa_get_current_context()) {
_mesa_make_current(NULL, NULL, NULL);
/* According to GL_MESA_configless_context the default value of
* glDrawBuffers depends on the config of the first surface it is bound to.
* For GLES it is always GL_BACK which has a magic interpretation.
*/
if (!ctx->HasConfig && _mesa_is_desktop_gl(ctx)) {
if (ctx->DrawBuffer != _mesa_get_incomplete_framebuffer()) {
/* According to GL_MESA_configless_context the default value of
* glDrawBuffers depends on the config of the first surface it is bound to.
* For GLES it is always GL_BACK which has a magic interpretation.
*/
if (!ctx->HasConfig && _mesa_is_desktop_gl(ctx)) {
if (ctx->DrawBuffer != _mesa_get_incomplete_framebuffer()) {
- /* We used to call _glapi_check_multithread() here. Now do it in drivers */
+ /* Call this periodically to detect when the user has begun using
+ * GL rendering from multiple threads.
+ */
+ _glapi_check_multithread();
/** \name Miscellaneous functions */
/**********************************************************************/
/*@{*/
/** \name Miscellaneous functions */
/**********************************************************************/
/*@{*/
-
-/**
- * Record an error.
- *
- * \param ctx GL context.
- * \param error error code.
- *
- * Records the given error code and call the driver's dd_function_table::Error
- * function if defined.
- *
- * \sa
- * This is called via _mesa_error().
- */
-void
-_mesa_record_error(struct gl_context *ctx, GLenum error)
-{
- if (!ctx)
- return;
-
- if (ctx->ErrorValue == GL_NO_ERROR) {
- ctx->ErrorValue = error;
- }
-}
-
-