ARB prog parser: Correct handling of some extensions that interact w/ARB_vp
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -815,10 +815,20 @@ vtxAttribItem: POSITION
|
|||||||
}
|
}
|
||||||
| COLOR optColorType
|
| COLOR optColorType
|
||||||
{
|
{
|
||||||
|
if (!state->ctx->Extensions.EXT_secondary_color) {
|
||||||
|
yyerror(& @2, state, "GL_EXT_secondary_color not supported");
|
||||||
|
YYERROR;
|
||||||
|
}
|
||||||
|
|
||||||
$$ = VERT_ATTRIB_COLOR0 + $2;
|
$$ = VERT_ATTRIB_COLOR0 + $2;
|
||||||
}
|
}
|
||||||
| FOGCOORD
|
| FOGCOORD
|
||||||
{
|
{
|
||||||
|
if (!state->ctx->Extensions.EXT_fog_coord) {
|
||||||
|
yyerror(& @1, state, "GL_EXT_fog_coord not supported");
|
||||||
|
YYERROR;
|
||||||
|
}
|
||||||
|
|
||||||
$$ = VERT_ATTRIB_FOG;
|
$$ = VERT_ATTRIB_FOG;
|
||||||
}
|
}
|
||||||
| TEXCOORD optTexCoordUnitNum
|
| TEXCOORD optTexCoordUnitNum
|
||||||
@@ -827,6 +837,7 @@ vtxAttribItem: POSITION
|
|||||||
}
|
}
|
||||||
| MATRIXINDEX '[' vtxWeightNum ']'
|
| MATRIXINDEX '[' vtxWeightNum ']'
|
||||||
{
|
{
|
||||||
|
yyerror(& @1, state, "GL_ARB_matrix_palette not supported");
|
||||||
YYERROR;
|
YYERROR;
|
||||||
}
|
}
|
||||||
| VTXATTRIB '[' vtxAttribNum ']'
|
| VTXATTRIB '[' vtxAttribNum ']'
|
||||||
@@ -1060,6 +1071,11 @@ stateLightProperty: ambDiffSpecProperty
|
|||||||
}
|
}
|
||||||
| ATTENUATION
|
| ATTENUATION
|
||||||
{
|
{
|
||||||
|
if (!state->ctx->Extensions.EXT_point_parameters) {
|
||||||
|
yyerror(& @1, state, "GL_ARB_point_parameters not supported");
|
||||||
|
YYERROR;
|
||||||
|
}
|
||||||
|
|
||||||
$$ = STATE_ATTENUATION;
|
$$ = STATE_ATTENUATION;
|
||||||
}
|
}
|
||||||
| SPOT stateSpotProperty
|
| SPOT stateSpotProperty
|
||||||
@@ -1346,6 +1362,7 @@ stateMatrixName: MODELVIEW stateOptModMatNum
|
|||||||
}
|
}
|
||||||
| PALETTE '[' statePaletteMatNum ']'
|
| PALETTE '[' statePaletteMatNum ']'
|
||||||
{
|
{
|
||||||
|
yyerror(& @1, state, "GL_ARB_matrix_palette not supported");
|
||||||
YYERROR;
|
YYERROR;
|
||||||
}
|
}
|
||||||
| MAT_PROGRAM '[' stateProgramMatNum ']'
|
| MAT_PROGRAM '[' stateProgramMatNum ']'
|
||||||
|
@@ -91,17 +91,16 @@ _mesa_ARBfp_parse_option(struct asm_parser_state *state, const char *option)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
} else if (strcmp(option, "draw_buffers") == 0) {
|
} else if (strcmp(option, "draw_buffers") == 0) {
|
||||||
/* FINISHME: This should validate that the driver support the
|
/* Don't need to check extension availability because all Mesa-based
|
||||||
* FINISHME: GL_ARB_draw_buffers extension.
|
* drivers support GL_ARB_draw_buffers.
|
||||||
*/
|
*/
|
||||||
state->option.DrawBuffers = 1;
|
state->option.DrawBuffers = 1;
|
||||||
return 1;
|
return 1;
|
||||||
} else if (strcmp(option, "fragment_program_shadow") == 0) {
|
} else if (strcmp(option, "fragment_program_shadow") == 0) {
|
||||||
/* FINISHME: This should validate that the driver support the
|
if (state->ctx->Extensions.ARB_fragment_program_shadow) {
|
||||||
* FINISHME: GL_ARB_fragment_program_shadow extension.
|
state->option.Shadow = 1;
|
||||||
*/
|
return 1;
|
||||||
state->option.Shadow = 1;
|
}
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user