summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2009-10-19 12:10:59 -0400
committerAlex Deucher <[email protected]>2009-10-19 12:10:59 -0400
commit620270c76e7241fe4c391e31e3706468d708fe69 (patch)
treeda8664d287043ab9db78500609f460d2c6d0b59d /src/mesa
parent35b98e2884bd7c76c43fa08d5bb0a8f1396d3298 (diff)
parent16e21191e26084848c7e6e3ffd9e15ef670855c5 (diff)
Merge branch 'mesa_7_6_branch' of git+ssh://[email protected]/git/mesa/mesa
regenerated lex.yy.c
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r300/r300_texstate.c20
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertprog.c12
-rw-r--r--src/mesa/drivers/dri/r600/r600_cmdbuf.c18
-rw-r--r--src/mesa/drivers/dri/r600/r600_texstate.c12
-rw-r--r--src/mesa/drivers/dri/r600/r700_assembler.c13
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_bo_legacy.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_fbo.c5
-rw-r--r--src/mesa/main/imports.c12
-rw-r--r--src/mesa/shader/lex.yy.c376
-rw-r--r--src/mesa/shader/program_lexer.l9
10 files changed, 250 insertions, 231 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c
index f030451b282..65cabccdc1e 100644
--- a/src/mesa/drivers/dri/r300/r300_texstate.c
+++ b/src/mesa/drivers/dri/r300/r300_texstate.c
@@ -225,10 +225,10 @@ static void setup_hardware_state(r300ContextPtr rmesa, radeonTexObj *t)
if (t->image_override && t->bo)
return;
- t->pp_txsize = (((firstImage->Width - 1) << R300_TX_WIDTHMASK_SHIFT)
- | ((firstImage->Height - 1) << R300_TX_HEIGHTMASK_SHIFT)
- | ((firstImage->DepthLog2) << R300_TX_DEPTHMASK_SHIFT)
- | ((t->mt->lastLevel - t->mt->firstLevel) << R300_TX_MAX_MIP_LEVEL_SHIFT));
+ t->pp_txsize = (((R300_TX_WIDTHMASK_MASK & ((firstImage->Width - 1) << R300_TX_WIDTHMASK_SHIFT)))
+ | ((R300_TX_HEIGHTMASK_MASK & ((firstImage->Height - 1) << R300_TX_HEIGHTMASK_SHIFT)))
+ | ((R300_TX_DEPTHMASK_MASK & ((firstImage->DepthLog2) << R300_TX_DEPTHMASK_SHIFT)))
+ | ((R300_TX_MAX_MIP_LEVEL_MASK & ((t->mt->lastLevel - t->mt->firstLevel) << R300_TX_MAX_MIP_LEVEL_SHIFT))));
t->tile_bits = 0;
@@ -248,8 +248,12 @@ static void setup_hardware_state(r300ContextPtr rmesa, radeonTexObj *t)
if (rmesa->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV515) {
if (firstImage->Width > 2048)
t->pp_txpitch |= R500_TXWIDTH_BIT11;
+ else
+ t->pp_txpitch &= ~R500_TXWIDTH_BIT11;
if (firstImage->Height > 2048)
t->pp_txpitch |= R500_TXHEIGHT_BIT11;
+ else
+ t->pp_txpitch &= ~R500_TXHEIGHT_BIT11;
}
}
@@ -479,16 +483,20 @@ void r300SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
break;
}
pitch_val--;
- t->pp_txsize = ((rb->base.Width - 1) << R300_TX_WIDTHMASK_SHIFT) |
- ((rb->base.Height - 1) << R300_TX_HEIGHTMASK_SHIFT);
+ t->pp_txsize = (((R300_TX_WIDTHMASK_MASK & ((rb->base.Width - 1) << R300_TX_WIDTHMASK_SHIFT)))
+ | ((R300_TX_HEIGHTMASK_MASK & ((rb->base.Height - 1) << R300_TX_HEIGHTMASK_SHIFT))));
t->pp_txsize |= R300_TX_SIZE_TXPITCH_EN;
t->pp_txpitch |= pitch_val;
if (rmesa->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV515) {
if (rb->base.Width > 2048)
t->pp_txpitch |= R500_TXWIDTH_BIT11;
+ else
+ t->pp_txpitch &= ~R500_TXWIDTH_BIT11;
if (rb->base.Height > 2048)
t->pp_txpitch |= R500_TXHEIGHT_BIT11;
+ else
+ t->pp_txpitch &= ~R500_TXHEIGHT_BIT11;
}
t->validated = GL_TRUE;
_mesa_unlock_texture(radeon->glCtx, texObj);
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index 43629d643bc..c2f96af2c12 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
@@ -62,12 +62,6 @@ static int r300VertexProgUpdateParams(GLcontext * ctx, struct r300_vertex_progra
}
}
- if (vp->code.constants.Count * 4 > VSF_MAX_FRAGMENT_LENGTH) {
- /* Should have checked this earlier... */
- fprintf(stderr, "%s:Params exhausted\n", __FUNCTION__);
- _mesa_exit(-1);
- }
-
for(i = 0; i < vp->code.constants.Count; ++i) {
const float * src = 0;
const struct rc_constant * constant = &vp->code.constants.Constants[i];
@@ -281,6 +275,11 @@ static struct r300_vertex_program *build_program(GLcontext *ctx,
}
r3xx_compile_vertex_program(&compiler);
+
+ if (vp->code.constants.Count > ctx->Const.VertexProgram.MaxParameters) {
+ rc_error(&compiler.Base, "Program exceeds constant buffer size limit\n");
+ }
+
vp->error = compiler.Base.Error;
vp->Base->Base.InputsRead = vp->code.InputsRead;
@@ -334,7 +333,6 @@ struct r300_vertex_program * r300SelectAndTranslateVertexShader(GLcontext *ctx)
#define bump_vpu_count(ptr, new_count) do { \
drm_r300_cmd_header_t* _p=((drm_r300_cmd_header_t*)(ptr)); \
int _nc=(new_count)/4; \
- assert(_nc < 256); \
if(_nc>_p->vpu.count)_p->vpu.count=_nc; \
} while(0)
diff --git a/src/mesa/drivers/dri/r600/r600_cmdbuf.c b/src/mesa/drivers/dri/r600/r600_cmdbuf.c
index 3cfe03a45f7..d27a3245a39 100644
--- a/src/mesa/drivers/dri/r600/r600_cmdbuf.c
+++ b/src/mesa/drivers/dri/r600/r600_cmdbuf.c
@@ -254,7 +254,7 @@ static int r600_cs_process_relocs(struct radeon_cs *cs,
relocs = (struct r600_cs_reloc_legacy *)cs->relocs;
restart:
for (i = 0; i < cs->crelocs; i++) {
- uint32_t soffset, eoffset, asicoffset;
+ uint32_t soffset, eoffset;
r = radeon_bo_legacy_validate(relocs[i].base.bo,
&soffset, &eoffset);
@@ -262,24 +262,12 @@ restart:
goto restart;
}
if (r) {
- fprintf(stderr, "validated %p [0x%08X, 0x%08X]\n",
+ fprintf(stderr, "invalid bo(%p) [0x%08X, 0x%08X]\n",
relocs[i].base.bo, soffset, eoffset);
return r;
}
- asicoffset = soffset;
for (j = 0; j < relocs[i].cindices; j++) {
- if (asicoffset >= eoffset) {
- /* radeon_bo_debug(relocs[i].base.bo, 12); */
- fprintf(stderr, "validated %p [0x%08X, 0x%08X]\n",
- relocs[i].base.bo, soffset, eoffset);
- fprintf(stderr, "above end: %p 0x%08X 0x%08X\n",
- relocs[i].base.bo,
- cs->packets[relocs[i].indices[j]],
- eoffset);
- exit(0);
- return -EINVAL;
- }
/* pkt3 nop header in ib chunk */
cs->packets[relocs[i].reloc_indices[j]] = 0xC0001000;
/* reloc index in ib chunk */
@@ -287,7 +275,7 @@ restart:
}
/* asic offset in reloc chunk */ /* see alex drm r600_nomm_relocate */
- reloc_chunk[offset_dw] = asicoffset;
+ reloc_chunk[offset_dw] = soffset;
reloc_chunk[offset_dw + 3] = 0;
offset_dw += 4;
diff --git a/src/mesa/drivers/dri/r600/r600_texstate.c b/src/mesa/drivers/dri/r600/r600_texstate.c
index 7d7e77d355b..ba1371bf95a 100644
--- a/src/mesa/drivers/dri/r600/r600_texstate.c
+++ b/src/mesa/drivers/dri/r600/r600_texstate.c
@@ -764,7 +764,9 @@ void r600SetTexOffset(__DRIcontext * pDRICtx, GLint texname,
struct gl_texture_object *tObj =
_mesa_lookup_texture(rmesa->radeon.glCtx, texname);
radeonTexObjPtr t = radeon_tex_obj(tObj);
- uint32_t pitch_val, size;
+ int firstlevel = t->mt ? t->mt->firstLevel : 0;
+ const struct gl_texture_image *firstImage;
+ uint32_t pitch_val, size, row_align, bpp;
if (!tObj)
return;
@@ -774,7 +776,13 @@ void r600SetTexOffset(__DRIcontext * pDRICtx, GLint texname,
if (!offset)
return;
- size = pitch;//h * w * (depth / 8);
+ bpp = depth / 8;
+ if (bpp == 3)
+ bpp = 4;
+
+ firstImage = t->base.Image[0][firstlevel];
+ row_align = rmesa->radeon.texture_row_align - 1;
+ size = ((firstImage->Width * bpp + row_align) & ~row_align) * firstImage->Height;
if (t->bo) {
radeon_bo_unref(t->bo);
t->bo = NULL;
diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c
index ed597c027b5..e07f9baa05b 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.c
+++ b/src/mesa/drivers/dri/r600/r700_assembler.c
@@ -1307,8 +1307,10 @@ GLboolean tex_src(r700_AssemblerBase *pAsm)
case PROGRAM_INPUT:
switch (pILInst->SrcReg[0].Index)
{
+ case FRAG_ATTRIB_WPOS:
case FRAG_ATTRIB_COL0:
case FRAG_ATTRIB_COL1:
+ case FRAG_ATTRIB_FOGC:
case FRAG_ATTRIB_TEX0:
case FRAG_ATTRIB_TEX1:
case FRAG_ATTRIB_TEX2:
@@ -1321,7 +1323,16 @@ GLboolean tex_src(r700_AssemblerBase *pAsm)
pAsm->S[0].src.reg =
pAsm->uiFP_AttributeMap[pILInst->SrcReg[0].Index];
pAsm->S[0].src.rtype = SRC_REG_INPUT;
- break;
+ break;
+ case FRAG_ATTRIB_FACE:
+ fprintf(stderr, "FRAG_ATTRIB_FACE unsupported\n");
+ break;
+ case FRAG_ATTRIB_PNTC:
+ fprintf(stderr, "FRAG_ATTRIB_PNTC unsupported\n");
+ break;
+ case FRAG_ATTRIB_VAR0:
+ fprintf(stderr, "FRAG_ATTRIB_VAR0 unsupported\n");
+ break;
}
break;
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
index 3e7547d2f9d..ce60a2f7eae 100644
--- a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
+++ b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
@@ -710,6 +710,10 @@ int radeon_bo_legacy_validate(struct radeon_bo *bo,
bo, bo->size, bo_legacy->map_count);
return -EINVAL;
}
+ if(bo->size == 0) {
+ fprintf(stderr, "bo(%p) has size 0.\n", bo);
+ return -EINVAL;
+ }
if (bo_legacy->static_bo || bo_legacy->validated) {
*soffset = bo_legacy->offset;
*eoffset = bo_legacy->offset + bo->size;
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c
index 7ac53ec0ca3..0ae906a6cea 100644
--- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
+++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
@@ -445,7 +445,6 @@ restart:
goto restart;
}
- rrb->pitch = texImage->Width * rrb->cpp;
rrb->base.InternalFormat = rrb->base._ActualFormat;
rrb->base.Width = texImage->Width;
rrb->base.Height = texImage->Height;
@@ -555,8 +554,10 @@ radeon_render_texture(GLcontext * ctx,
imageOffset += offsets[att->Zoffset];
}
- /* store that offset in the region */
+ /* store that offset in the region, along with the correct pitch for
+ * the image we are rendering to */
rrb->draw_offset = imageOffset;
+ rrb->pitch = radeon_image->mt->levels[att->TextureLevel].rowstride;
/* update drawing region, etc */
radeon_draw_buffer(ctx, fb);
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 6ffaddcde96..87cb5ce0fbc 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -48,6 +48,10 @@
#include "context.h"
#include "version.h"
+#ifdef _GNU_SOURCE
+#include <locale.h>
+#endif
+
#define MAXSTRING 4000 /* for vsnprintf() */
@@ -908,7 +912,15 @@ _mesa_atoi(const char *s)
double
_mesa_strtod( const char *s, char **end )
{
+#ifdef _GNU_SOURCE
+ static locale_t loc = NULL;
+ if (!loc) {
+ loc = newlocale(LC_CTYPE_MASK, "C", NULL);
+ }
+ return strtod_l(s, end, loc);
+#else
return strtod(s, end);
+#endif
}
/** Compute simple checksum/hash for a string */
diff --git a/src/mesa/shader/lex.yy.c b/src/mesa/shader/lex.yy.c
index 3c86913fdfc..17843c2121b 100644
--- a/src/mesa/shader/lex.yy.c
+++ b/src/mesa/shader/lex.yy.c
@@ -158,15 +158,7 @@ typedef void* yyscan_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -1042,6 +1034,7 @@ static yyconst flex_int16_t yy_chk[1368] =
* DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
+#include "main/imports.h"
#include "prog_instruction.h"
#include "prog_statevars.h"
@@ -1160,7 +1153,7 @@ handle_ident(struct asm_parser_state *state, const char *text, YYSTYPE *lval)
} while(0);
#define YY_EXTRA_TYPE struct asm_parser_state *
-#line 1164 "lex.yy.c"
+#line 1157 "lex.yy.c"
#define INITIAL 0
@@ -1297,12 +1290,7 @@ static int input (yyscan_t yyscanner );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -1406,10 +1394,10 @@ YY_DECL
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 156 "program_lexer.l"
+#line 157 "program_lexer.l"
-#line 1413 "lex.yy.c"
+#line 1401 "lex.yy.c"
yylval = yylval_param;
@@ -1498,17 +1486,17 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 158 "program_lexer.l"
+#line 159 "program_lexer.l"
{ return ARBvp_10; }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 159 "program_lexer.l"
+#line 160 "program_lexer.l"
{ return ARBfp_10; }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 160 "program_lexer.l"
+#line 161 "program_lexer.l"
{
yylval->integer = at_address;
return_token_or_IDENTIFIER(require_ARB_vp, ADDRESS);
@@ -1516,692 +1504,692 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 164 "program_lexer.l"
+#line 165 "program_lexer.l"
{ return ALIAS; }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 165 "program_lexer.l"
+#line 166 "program_lexer.l"
{ return ATTRIB; }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 166 "program_lexer.l"
+#line 167 "program_lexer.l"
{ return END; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 167 "program_lexer.l"
+#line 168 "program_lexer.l"
{ return OPTION; }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 168 "program_lexer.l"
+#line 169 "program_lexer.l"
{ return OUTPUT; }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 169 "program_lexer.l"
+#line 170 "program_lexer.l"
{ return PARAM; }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 170 "program_lexer.l"
+#line 171 "program_lexer.l"
{ yylval->integer = at_temp; return TEMP; }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 172 "program_lexer.l"
+#line 173 "program_lexer.l"
{ return_opcode( 1, VECTOR_OP, ABS, 3); }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 173 "program_lexer.l"
+#line 174 "program_lexer.l"
{ return_opcode( 1, BIN_OP, ADD, 3); }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 174 "program_lexer.l"
+#line 175 "program_lexer.l"
{ return_opcode(require_ARB_vp, ARL, ARL, 3); }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 176 "program_lexer.l"
+#line 177 "program_lexer.l"
{ return_opcode(require_ARB_fp, TRI_OP, CMP, 3); }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 177 "program_lexer.l"
+#line 178 "program_lexer.l"
{ return_opcode(require_ARB_fp, SCALAR_OP, COS, 3); }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 179 "program_lexer.l"
+#line 180 "program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, DDX, 3); }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 180 "program_lexer.l"
+#line 181 "program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, DDY, 3); }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 181 "program_lexer.l"
+#line 182 "program_lexer.l"
{ return_opcode( 1, BIN_OP, DP3, 3); }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 182 "program_lexer.l"
+#line 183 "program_lexer.l"
{ return_opcode( 1, BIN_OP, DP4, 3); }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 183 "program_lexer.l"
+#line 184 "program_lexer.l"
{ return_opcode( 1, BIN_OP, DPH, 3); }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 184 "program_lexer.l"
+#line 185 "program_lexer.l"
{ return_opcode( 1, BIN_OP, DST, 3); }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 186 "program_lexer.l"
+#line 187 "program_lexer.l"
{ return_opcode( 1, SCALAR_OP, EX2, 3); }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 187 "program_lexer.l"
+#line 188 "program_lexer.l"
{ return_opcode(require_ARB_vp, SCALAR_OP, EXP, 3); }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 189 "program_lexer.l"
+#line 190 "program_lexer.l"
{ return_opcode( 1, VECTOR_OP, FLR, 3); }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 190 "program_lexer.l"
+#line 191 "program_lexer.l"
{ return_opcode( 1, VECTOR_OP, FRC, 3); }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 192 "program_lexer.l"
+#line 193 "program_lexer.l"
{ return_opcode(require_ARB_fp, KIL, KIL, 3); }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 194 "program_lexer.l"
+#line 195 "program_lexer.l"
{ return_opcode( 1, VECTOR_OP, LIT, 3); }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 195 "program_lexer.l"
+#line 196 "program_lexer.l"
{ return_opcode( 1, SCALAR_OP, LG2, 3); }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 196 "program_lexer.l"
+#line 197 "program_lexer.l"
{ return_opcode(require_ARB_vp, SCALAR_OP, LOG, 3); }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 197 "program_lexer.l"
+#line 198 "program_lexer.l"
{ return_opcode(require_ARB_fp, TRI_OP, LRP, 3); }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 199 "program_lexer.l"
+#line 200 "program_lexer.l"
{ return_opcode( 1, TRI_OP, MAD, 3); }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 200 "program_lexer.l"
+#line 201 "program_lexer.l"
{ return_opcode( 1, BIN_OP, MAX, 3); }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 201 "program_lexer.l"
+#line 202 "program_lexer.l"
{ return_opcode( 1, BIN_OP, MIN, 3); }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 202 "program_lexer.l"
+#line 203 "program_lexer.l"
{ return_opcode( 1, VECTOR_OP, MOV, 3); }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 203 "program_lexer.l"
+#line 204 "program_lexer.l"
{ return_opcode( 1, BIN_OP, MUL, 3); }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 205 "program_lexer.l"
+#line 206 "program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, PK2H, 4); }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 206 "program_lexer.l"
+#line 207 "program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, PK2US, 5); }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 207 "program_lexer.l"
+#line 208 "program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, PK4B, 4); }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 208 "program_lexer.l"
+#line 209 "program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, PK4UB, 5); }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 209 "program_lexer.l"
+#line 210 "program_lexer.l"
{ return_opcode( 1, BINSC_OP, POW, 3); }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 211 "program_lexer.l"
+#line 212 "program_lexer.l"
{ return_opcode( 1, SCALAR_OP, RCP, 3); }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 212 "program_lexer.l"
+#line 213 "program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, RFL, 3); }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 213 "program_lexer.l"
+#line 214 "program_lexer.l"
{ return_opcode( 1, SCALAR_OP, RSQ, 3); }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 215 "program_lexer.l"
+#line 216 "program_lexer.l"
{ return_opcode(require_ARB_fp, SCALAR_OP, SCS, 3); }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 216 "program_lexer.l"
+#line 217 "program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, SEQ, 3); }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 217 "program_lexer.l"
+#line 218 "program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, SFL, 3); }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 218 "program_lexer.l"
+#line 219 "program_lexer.l"
{ return_opcode( 1, BIN_OP, SGE, 3); }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 219 "program_lexer.l"
+#line 220 "program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, SGT, 3); }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 220 "program_lexer.l"
+#line 221 "program_lexer.l"
{ return_opcode(require_ARB_fp, SCALAR_OP, SIN, 3); }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 221 "program_lexer.l"
+#line 222 "program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, SLE, 3); }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 222 "program_lexer.l"
+#line 223 "program_lexer.l"
{ return_opcode( 1, BIN_OP, SLT, 3); }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 223 "program_lexer.l"
+#line 224 "program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, SNE, 3); }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 224 "program_lexer.l"
+#line 225 "program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, STR, 3); }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 225 "program_lexer.l"
+#line 226 "program_lexer.l"
{ return_opcode( 1, BIN_OP, SUB, 3); }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 226 "program_lexer.l"
+#line 227 "program_lexer.l"
{ return_opcode( 1, SWZ, SWZ, 3); }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 228 "program_lexer.l"
+#line 229 "program_lexer.l"
{ return_opcode(require_ARB_fp, SAMPLE_OP, TEX, 3); }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 229 "program_lexer.l"
+#line 230 "program_lexer.l"
{ return_opcode(require_ARB_fp, SAMPLE_OP, TXB, 3); }
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 230 "program_lexer.l"
+#line 231 "program_lexer.l"
{ return_opcode(require_NV_fp, TXD_OP, TXD, 3); }
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 231 "program_lexer.l"
+#line 232 "program_lexer.l"
{ return_opcode(require_ARB_fp, SAMPLE_OP, TXP, 3); }
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 233 "program_lexer.l"
+#line 234 "program_lexer.l"
{ return_opcode(require_NV_fp, SCALAR_OP, UP2H, 4); }
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 234 "program_lexer.l"
+#line 235 "program_lexer.l"
{ return_opcode(require_NV_fp, SCALAR_OP, UP2US, 5); }
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 235 "program_lexer.l"
+#line 236 "program_lexer.l"
{ return_opcode(require_NV_fp, SCALAR_OP, UP4B, 4); }
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 236 "program_lexer.l"
+#line 237 "program_lexer.l"
{ return_opcode(require_NV_fp, SCALAR_OP, UP4UB, 5); }
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 238 "program_lexer.l"
+#line 239 "program_lexer.l"
{ return_opcode(require_NV_fp, TRI_OP, X2D, 3); }
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 239 "program_lexer.l"
+#line 240 "program_lexer.l"
{ return_opcode( 1, BIN_OP, XPD, 3); }
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 241 "program_lexer.l"
+#line 242 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); }
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 242 "program_lexer.l"
+#line 243 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); }
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 243 "program_lexer.l"
+#line 244 "program_lexer.l"
{ return PROGRAM; }
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 244 "program_lexer.l"
+#line 245 "program_lexer.l"
{ return STATE; }
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 245 "program_lexer.l"
+#line 246 "program_lexer.l"
{ return RESULT; }
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 247 "program_lexer.l"
+#line 248 "program_lexer.l"
{ return AMBIENT; }
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 248 "program_lexer.l"
+#line 249 "program_lexer.l"
{ return ATTENUATION; }
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 249 "program_lexer.l"
+#line 250 "program_lexer.l"
{ return BACK; }
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 250 "program_lexer.l"
+#line 251 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, CLIP); }
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 251 "program_lexer.l"
+#line 252 "program_lexer.l"
{ return COLOR; }
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 252 "program_lexer.l"
+#line 253 "program_lexer.l"
{ return_token_or_DOT(require_ARB_fp, DEPTH); }
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 253 "program_lexer.l"
+#line 254 "program_lexer.l"
{ return DIFFUSE; }
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 254 "program_lexer.l"
+#line 255 "program_lexer.l"
{ return DIRECTION; }
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 255 "program_lexer.l"
+#line 256 "program_lexer.l"
{ return EMISSION; }
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 256 "program_lexer.l"
+#line 257 "program_lexer.l"
{ return ENV; }
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 257 "program_lexer.l"
+#line 258 "program_lexer.l"
{ return EYE; }
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 258 "program_lexer.l"
+#line 259 "program_lexer.l"
{ return FOGCOORD; }
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 259 "program_lexer.l"
+#line 260 "program_lexer.l"
{ return FOG; }
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 260 "program_lexer.l"
+#line 261 "program_lexer.l"
{ return FRONT; }
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 261 "program_lexer.l"
+#line 262 "program_lexer.l"
{ return HALF; }
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 262 "program_lexer.l"
+#line 263 "program_lexer.l"
{ return INVERSE; }
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 263 "program_lexer.l"
+#line 264 "program_lexer.l"
{ return INVTRANS; }
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 264 "program_lexer.l"
+#line 265 "program_lexer.l"
{ return LIGHT; }
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 265 "program_lexer.l"
+#line 266 "program_lexer.l"
{ return LIGHTMODEL; }
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 266 "program_lexer.l"
+#line 267 "program_lexer.l"
{ return LIGHTPROD; }
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 267 "program_lexer.l"
+#line 268 "program_lexer.l"
{ return LOCAL; }
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 268 "program_lexer.l"
+#line 269 "program_lexer.l"
{ return MATERIAL; }
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 269 "program_lexer.l"
+#line 270 "program_lexer.l"
{ return MAT_PROGRAM; }
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 270 "program_lexer.l"
+#line 271 "program_lexer.l"
{ return MATRIX; }
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 271 "program_lexer.l"
+#line 272 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, MATRIXINDEX); }
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 272 "program_lexer.l"
+#line 273 "program_lexer.l"
{ return MODELVIEW; }
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 273 "program_lexer.l"
+#line 274 "program_lexer.l"
{ return MVP; }
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 274 "program_lexer.l"
+#line 275 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, NORMAL); }
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 275 "program_lexer.l"
+#line 276 "program_lexer.l"
{ return OBJECT; }
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 276 "program_lexer.l"
+#line 277 "program_lexer.l"
{ return PALETTE; }
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 277 "program_lexer.l"
+#line 278 "program_lexer.l"
{ return PARAMS; }
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 278 "program_lexer.l"
+#line 279 "program_lexer.l"
{ return PLANE; }
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 279 "program_lexer.l"
+#line 280 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, POINT_TOK); }
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 280 "program_lexer.l"
+#line 281 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, POINTSIZE); }
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 281 "program_lexer.l"
+#line 282 "program_lexer.l"
{ return POSITION; }
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 282 "program_lexer.l"
+#line 283 "program_lexer.l"
{ return PRIMARY; }
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 283 "program_lexer.l"
+#line 284 "program_lexer.l"
{ return PROJECTION; }
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 284 "program_lexer.l"
+#line 285 "program_lexer.l"
{ return_token_or_DOT(require_ARB_fp, RANGE); }
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 285 "program_lexer.l"
+#line 286 "program_lexer.l"
{ return ROW; }
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 286 "program_lexer.l"
+#line 287 "program_lexer.l"
{ return SCENECOLOR; }
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 287 "program_lexer.l"
+#line 288 "program_lexer.l"
{ return SECONDARY; }
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 288 "program_lexer.l"
+#line 289 "program_lexer.l"
{ return SHININESS; }
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 289 "program_lexer.l"
+#line 290 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, SIZE_TOK); }
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 290 "program_lexer.l"
+#line 291 "program_lexer.l"
{ return SPECULAR; }
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 291 "program_lexer.l"
+#line 292 "program_lexer.l"
{ return SPOT; }
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 292 "program_lexer.l"
+#line 293 "program_lexer.l"
{ return TEXCOORD; }
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 293 "program_lexer.l"
+#line 294 "program_lexer.l"
{ return_token_or_DOT(require_ARB_fp, TEXENV); }
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 294 "program_lexer.l"
+#line 295 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, TEXGEN); }
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 295 "program_lexer.l"
+#line 296 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, TEXGEN_Q); }
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 296 "program_lexer.l"
+#line 297 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, TEXGEN_S); }
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 297 "program_lexer.l"
+#line 298 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, TEXGEN_T); }
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 298 "program_lexer.l"
+#line 299 "program_lexer.l"
{ return TEXTURE; }
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 299 "program_lexer.l"
+#line 300 "program_lexer.l"
{ return TRANSPOSE; }
YY_BREAK
case 124:
YY_RULE_SETUP
-#line 300 "program_lexer.l"
+#line 301 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, VTXATTRIB); }
YY_BREAK
case 125:
YY_RULE_SETUP
-#line 301 "program_lexer.l"
+#line 302 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, WEIGHT); }
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 303 "program_lexer.l"
+#line 304 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); }
YY_BREAK
case 127:
YY_RULE_SETUP
-#line 304 "program_lexer.l"
+#line 305 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); }
YY_BREAK
case 128:
YY_RULE_SETUP
-#line 305 "program_lexer.l"
+#line 306 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); }
YY_BREAK
case 129:
YY_RULE_SETUP
-#line 306 "program_lexer.l"
+#line 307 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); }
YY_BREAK
case 130:
YY_RULE_SETUP
-#line 307 "program_lexer.l"
+#line 308 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); }
YY_BREAK
case 131:
YY_RULE_SETUP
-#line 308 "program_lexer.l"
+#line 309 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); }
YY_BREAK
case 132:
YY_RULE_SETUP
-#line 309 "program_lexer.l"
+#line 310 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW1D); }
YY_BREAK
case 133:
YY_RULE_SETUP
-#line 310 "program_lexer.l"
+#line 311 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW2D); }
YY_BREAK
case 134:
YY_RULE_SETUP
-#line 311 "program_lexer.l"
+#line 312 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_rect, TEX_SHADOWRECT); }
YY_BREAK
case 135:
YY_RULE_SETUP
-#line 312 "program_lexer.l"
+#line 313 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY1D); }
YY_BREAK
case 136:
YY_RULE_SETUP
-#line 313 "program_lexer.l"
+#line 314 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY2D); }
YY_BREAK
case 137:
YY_RULE_SETUP
-#line 314 "program_lexer.l"
+#line 315 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); }
YY_BREAK
case 138:
YY_RULE_SETUP
-#line 315 "program_lexer.l"
+#line 316 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); }
YY_BREAK
case 139:
YY_RULE_SETUP
-#line 317 "program_lexer.l"
+#line 318 "program_lexer.l"
{ return handle_ident(yyextra, yytext, yylval); }
YY_BREAK
case 140:
YY_RULE_SETUP
-#line 319 "program_lexer.l"
+#line 320 "program_lexer.l"
{ return DOT_DOT; }
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 321 "program_lexer.l"
+#line 322 "program_lexer.l"
{
yylval->integer = strtol(yytext, NULL, 10);
return INTEGER;
@@ -2209,9 +2197,9 @@ YY_RULE_SETUP
YY_BREAK
case 142:
YY_RULE_SETUP
-#line 325 "program_lexer.l"
+#line 326 "program_lexer.l"
{
- yylval->real = strtod(yytext, NULL);
+ yylval->real = _mesa_strtod(yytext, NULL);
return REAL;
}
YY_BREAK
@@ -2221,31 +2209,31 @@ case 143:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 329 "program_lexer.l"
+#line 330 "program_lexer.l"
{
- yylval->real = strtod(yytext, NULL);
+ yylval->real = _mesa_strtod(yytext, NULL);
return REAL;
}
YY_BREAK
case 144:
YY_RULE_SETUP
-#line 333 "program_lexer.l"
+#line 334 "program_lexer.l"
{
- yylval->real = strtod(yytext, NULL);
+ yylval->real = _mesa_strtod(yytext, NULL);
return REAL;
}
YY_BREAK
case 145:
YY_RULE_SETUP
-#line 337 "program_lexer.l"
+#line 338 "program_lexer.l"
{
- yylval->real = strtod(yytext, NULL);
+ yylval->real = _mesa_strtod(yytext, NULL);
return REAL;
}
YY_BREAK
case 146:
YY_RULE_SETUP
-#line 342 "program_lexer.l"
+#line 343 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_NOOP;
yylval->swiz_mask.mask = WRITEMASK_XYZW;
@@ -2254,7 +2242,7 @@ YY_RULE_SETUP
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 348 "program_lexer.l"
+#line 349 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_XY
@@ -2264,7 +2252,7 @@ YY_RULE_SETUP
YY_BREAK
case 148:
YY_RULE_SETUP
-#line 354 "program_lexer.l"
+#line 355 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_XZW;
@@ -2273,7 +2261,7 @@ YY_RULE_SETUP
YY_BREAK
case 149:
YY_RULE_SETUP
-#line 359 "program_lexer.l"
+#line 360 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_YZW;
@@ -2282,7 +2270,7 @@ YY_RULE_SETUP
YY_BREAK
case 150:
YY_RULE_SETUP
-#line 365 "program_lexer.l"
+#line 366 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_X
@@ -2292,7 +2280,7 @@ YY_RULE_SETUP
YY_BREAK
case 151:
YY_RULE_SETUP
-#line 371 "program_lexer.l"
+#line 372 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_Y
@@ -2302,7 +2290,7 @@ YY_RULE_SETUP
YY_BREAK
case 152:
YY_RULE_SETUP
-#line 377 "program_lexer.l"
+#line 378 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_ZW;
@@ -2311,7 +2299,7 @@ YY_RULE_SETUP
YY_BREAK
case 153:
YY_RULE_SETUP
-#line 383 "program_lexer.l"
+#line 384 "program_lexer.l"
{
const unsigned s = swiz_from_char(yytext[1]);
yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s);
@@ -2321,7 +2309,7 @@ YY_RULE_SETUP
YY_BREAK
case 154:
YY_RULE_SETUP
-#line 390 "program_lexer.l"
+#line 391 "program_lexer.l"
{
yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]),
swiz_from_char(yytext[2]),
@@ -2333,7 +2321,7 @@ YY_RULE_SETUP
YY_BREAK
case 155:
YY_RULE_SETUP
-#line 399 "program_lexer.l"
+#line 400 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_NOOP;
yylval->swiz_mask.mask = WRITEMASK_XYZW;
@@ -2342,7 +2330,7 @@ YY_RULE_SETUP
YY_BREAK
case 156:
YY_RULE_SETUP
-#line 405 "program_lexer.l"
+#line 406 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_XY
@@ -2352,7 +2340,7 @@ YY_RULE_SETUP
YY_BREAK
case 157:
YY_RULE_SETUP
-#line 411 "program_lexer.l"
+#line 412 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_XZW;
@@ -2361,7 +2349,7 @@ YY_RULE_SETUP
YY_BREAK
case 158:
YY_RULE_SETUP
-#line 416 "program_lexer.l"
+#line 417 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_YZW;
@@ -2370,7 +2358,7 @@ YY_RULE_SETUP
YY_BREAK
case 159:
YY_RULE_SETUP
-#line 422 "program_lexer.l"
+#line 423 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_X
@@ -2380,7 +2368,7 @@ YY_RULE_SETUP
YY_BREAK
case 160:
YY_RULE_SETUP
-#line 428 "program_lexer.l"
+#line 429 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_Y
@@ -2390,7 +2378,7 @@ YY_RULE_SETUP
YY_BREAK
case 161:
YY_RULE_SETUP
-#line 434 "program_lexer.l"
+#line 435 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_ZW;
@@ -2399,7 +2387,7 @@ YY_RULE_SETUP
YY_BREAK
case 162:
YY_RULE_SETUP
-#line 440 "program_lexer.l"
+#line 441 "program_lexer.l"
{
const unsigned s = swiz_from_char(yytext[1]);
yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s);
@@ -2409,7 +2397,7 @@ YY_RULE_SETUP
YY_BREAK
case 163:
YY_RULE_SETUP
-#line 448 "program_lexer.l"
+#line 449 "program_lexer.l"
{
if (require_ARB_vp) {
return TEXGEN_R;
@@ -2423,7 +2411,7 @@ YY_RULE_SETUP
YY_BREAK
case 164:
YY_RULE_SETUP
-#line 459 "program_lexer.l"
+#line 460 "program_lexer.l"
{
yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]),
swiz_from_char(yytext[2]),
@@ -2435,13 +2423,13 @@ YY_RULE_SETUP
YY_BREAK
case 165:
YY_RULE_SETUP
-#line 468 "program_lexer.l"
+#line 469 "program_lexer.l"
{ return DOT; }
YY_BREAK
case 166:
/* rule 166 can match eol */
YY_RULE_SETUP
-#line 470 "program_lexer.l"
+#line 471 "program_lexer.l"
{
yylloc->first_line++;
yylloc->first_column = 1;
@@ -2452,7 +2440,7 @@ YY_RULE_SETUP
YY_BREAK
case 167:
YY_RULE_SETUP
-#line 477 "program_lexer.l"
+#line 478 "program_lexer.l"
/* eat whitespace */ ;
YY_BREAK
case 168:
@@ -2460,20 +2448,20 @@ case 168:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 478 "program_lexer.l"
+#line 479 "program_lexer.l"
/* eat comments */ ;
YY_BREAK
case 169:
YY_RULE_SETUP
-#line 479 "program_lexer.l"
+#line 480 "program_lexer.l"
{ return yytext[0]; }
YY_BREAK
case 170:
YY_RULE_SETUP
-#line 480 "program_lexer.l"
+#line 481 "program_lexer.l"
ECHO;
YY_BREAK
-#line 2477 "lex.yy.c"
+#line 2465 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -3241,8 +3229,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
@@ -3648,7 +3636,7 @@ void yyfree (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 480 "program_lexer.l"
+#line 481 "program_lexer.l"
diff --git a/src/mesa/shader/program_lexer.l b/src/mesa/shader/program_lexer.l
index 8498c3d8fc0..e2acb3c0c96 100644
--- a/src/mesa/shader/program_lexer.l
+++ b/src/mesa/shader/program_lexer.l
@@ -22,6 +22,7 @@
* DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
+#include "main/imports.h"
#include "prog_instruction.h"
#include "prog_statevars.h"
@@ -323,19 +324,19 @@ ARRAYSHADOW2D { return_token_or_IDENTIFIER(require_ARB_fp && require
return INTEGER;
}
{num}?{frac}{exp}? {
- yylval->real = strtod(yytext, NULL);
+ yylval->real = _mesa_strtod(yytext, NULL);
return REAL;
}
{num}"."/[^.] {
- yylval->real = strtod(yytext, NULL);
+ yylval->real = _mesa_strtod(yytext, NULL);
return REAL;
}
{num}{exp} {
- yylval->real = strtod(yytext, NULL);
+ yylval->real = _mesa_strtod(yytext, NULL);
return REAL;
}
{num}"."{exp} {
- yylval->real = strtod(yytext, NULL);
+ yylval->real = _mesa_strtod(yytext, NULL);
return REAL;
}