#include "enable.h"
#include "errors.h"
#include "light.h"
-#include "util/simple_list.h"
#include "mtypes.h"
#include "enums.h"
#include "api_arrayelt.h"
if (texUnit->Enabled == newenabled)
return GL_FALSE;
- FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+ FLUSH_VERTICES(ctx, _NEW_TEXTURE_STATE);
texUnit->Enabled = newenabled;
return GL_TRUE;
}
return;
FLUSH_VERTICES(ctx, _NEW_FOG);
ctx->Fog.Enabled = state;
+ ctx->Fog._PackedEnabledMode = state ? ctx->Fog._PackedMode : FOG_NONE;
break;
case GL_LIGHT0:
case GL_LIGHT1:
FLUSH_VERTICES(ctx, _NEW_LIGHT);
ctx->Light.Light[cap-GL_LIGHT0].Enabled = state;
if (state) {
- insert_at_tail(&ctx->Light.EnabledList,
- &ctx->Light.Light[cap-GL_LIGHT0]);
+ ctx->Light._EnabledLights |= 1u << (cap - GL_LIGHT0);
}
else {
- remove_from_list(&ctx->Light.Light[cap-GL_LIGHT0]);
+ ctx->Light._EnabledLights &= ~(1u << (cap - GL_LIGHT0));
}
break;
case GL_LIGHTING:
FLUSH_VERTICES(ctx, _NEW_COLOR);
ctx->Color.IndexLogicOpEnabled = state;
break;
+ case GL_CONSERVATIVE_RASTERIZATION_INTEL:
+ if (!_mesa_has_INTEL_conservative_rasterization(ctx))
+ goto invalid_enum_error;
+ if (ctx->IntelConservativeRasterization == state)
+ return;
+ FLUSH_VERTICES(ctx, 0);
+ ctx->NewDriverState |=
+ ctx->DriverFlags.NewIntelConservativeRasterization;
+ ctx->IntelConservativeRasterization = state;
+ break;
case GL_COLOR_LOGIC_OP:
if (!_mesa_is_desktop_gl(ctx) && ctx->API != API_OPENGLES)
goto invalid_enum_error;
newenabled |= coordBit;
if (texUnit->TexGenEnabled == newenabled)
return;
- FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+ FLUSH_VERTICES(ctx, _NEW_TEXTURE_STATE);
texUnit->TexGenEnabled = newenabled;
}
}
newenabled |= STR_BITS;
if (texUnit->TexGenEnabled == newenabled)
return;
- FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+ FLUSH_VERTICES(ctx, _NEW_TEXTURE_STATE);
texUnit->TexGenEnabled = newenabled;
}
}
goto invalid_enum_error;
CHECK_EXTENSION(ARB_seamless_cube_map, cap);
if (ctx->Texture.CubeMapSeamless != state) {
- FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+ FLUSH_VERTICES(ctx, _NEW_TEXTURE_OBJECT);
ctx->Texture.CubeMapSeamless = state;
}
break;
ctx->Multisample.SampleMask = state;
break;
+ case GL_BLEND_ADVANCED_COHERENT_KHR:
+ CHECK_EXTENSION(KHR_blend_equation_advanced_coherent, cap);
+ if (ctx->Color.BlendCoherent == state)
+ return;
+ FLUSH_VERTICES(ctx, _NEW_COLOR);
+ ctx->Color.BlendCoherent = state;
+ break;
+
default:
goto invalid_enum_error;
}
CHECK_EXTENSION(ARB_sample_shading);
return ctx->Multisample.SampleShading;
+ case GL_BLEND_ADVANCED_COHERENT_KHR:
+ CHECK_EXTENSION(KHR_blend_equation_advanced_coherent);
+ return ctx->Color.BlendCoherent;
+
+ case GL_CONSERVATIVE_RASTERIZATION_INTEL:
+ CHECK_EXTENSION(INTEL_conservative_rasterization);
+ return ctx->IntelConservativeRasterization;
+
default:
goto invalid_enum_error;
}