aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-12-05 07:42:31 +0100
committermarha <marha@users.sourceforge.net>2011-12-05 07:42:31 +0100
commit528f5bd58a139174170c4130c67dca30193c9057 (patch)
tree550c818095dbc607deaddf166c77116ccd91ef54 /mesalib/src/mesa/program
parent2cfebffb491807a465a8e5f7daca582d8aefb829 (diff)
downloadvcxsrv-528f5bd58a139174170c4130c67dca30193c9057.tar.gz
vcxsrv-528f5bd58a139174170c4130c67dca30193c9057.tar.bz2
vcxsrv-528f5bd58a139174170c4130c67dca30193c9057.zip
xserver xkeyboard-config mesa git update 5 dec 2011
Diffstat (limited to 'mesalib/src/mesa/program')
-rw-r--r--mesalib/src/mesa/program/prog_print.c12
-rw-r--r--mesalib/src/mesa/program/program_parse.y6
-rw-r--r--mesalib/src/mesa/program/program_parser.h2
3 files changed, 10 insertions, 10 deletions
diff --git a/mesalib/src/mesa/program/prog_print.c b/mesalib/src/mesa/program/prog_print.c
index dfccc60f6..e9bf3aadf 100644
--- a/mesalib/src/mesa/program/prog_print.c
+++ b/mesalib/src/mesa/program/prog_print.c
@@ -157,11 +157,11 @@ arb_input_attrib_string(GLint index, GLenum progType)
assert(strcmp(vertAttribs[VERT_ATTRIB_GENERIC15], "vertex.attrib[15]") == 0);
if (progType == GL_VERTEX_PROGRAM_ARB) {
- assert(index < sizeof(vertAttribs) / sizeof(vertAttribs[0]));
+ assert(index < Elements(vertAttribs));
return vertAttribs[index];
}
else {
- assert(index < sizeof(fragAttribs) / sizeof(fragAttribs[0]));
+ assert(index < Elements(fragAttribs));
return fragAttribs[index];
}
}
@@ -246,11 +246,11 @@ arb_output_attrib_string(GLint index, GLenum progType)
};
if (progType == GL_VERTEX_PROGRAM_ARB) {
- assert(index < sizeof(vertResults) / sizeof(vertResults[0]));
+ assert(index < Elements(vertResults));
return vertResults[index];
}
else {
- assert(index < sizeof(fragResults) / sizeof(fragResults[0]));
+ assert(index < Elements(fragResults));
return fragResults[index];
}
}
@@ -925,8 +925,8 @@ _mesa_fprint_program_parameters(FILE *f,
{
GLuint i;
- fprintf(f, "InputsRead: 0x%x (0b%s)\n",
- prog->InputsRead, binary(prog->InputsRead));
+ fprintf(f, "InputsRead: 0x%llx (0b%s)\n",
+ (unsigned long long) prog->InputsRead, binary(prog->InputsRead));
fprintf(f, "OutputsWritten: 0x%llx (0b%s)\n",
(unsigned long long)prog->OutputsWritten,
binary(prog->OutputsWritten));
diff --git a/mesalib/src/mesa/program/program_parse.y b/mesalib/src/mesa/program/program_parse.y
index 9fdb99db3..4f958a993 100644
--- a/mesalib/src/mesa/program/program_parse.y
+++ b/mesalib/src/mesa/program/program_parse.y
@@ -1110,7 +1110,7 @@ ATTRIB_statement: ATTRIB IDENTIFIER '=' attribBinding
YYERROR;
} else {
s->attrib_binding = $4;
- state->InputsBound |= (1U << s->attrib_binding);
+ state->InputsBound |= BITFIELD64_BIT(s->attrib_binding);
if (!validate_inputs(& @4, state)) {
YYERROR;
@@ -2403,9 +2403,9 @@ set_src_reg_swz(struct asm_src_register *r, gl_register_file file, GLint index,
int
validate_inputs(struct YYLTYPE *locp, struct asm_parser_state *state)
{
- const int inputs = state->prog->InputsRead | state->InputsBound;
+ const GLbitfield64 inputs = state->prog->InputsRead | state->InputsBound;
- if (((inputs & 0x0ffff) & (inputs >> 16)) != 0) {
+ if (((inputs & VERT_BIT_FF_ALL) & (inputs >> VERT_ATTRIB_GENERIC0)) != 0) {
yyerror(locp, state, "illegal use of generic attribute and name attribute");
return 0;
}
diff --git a/mesalib/src/mesa/program/program_parser.h b/mesalib/src/mesa/program/program_parser.h
index 5637598f3..bc756148a 100644
--- a/mesalib/src/mesa/program/program_parser.h
+++ b/mesalib/src/mesa/program/program_parser.h
@@ -191,7 +191,7 @@ struct asm_parser_state {
* multiple ATTRIB statements bind illegal combinations of vertex
* attributes.
*/
- unsigned InputsBound;
+ GLbitfield64 InputsBound;
enum {
invalid_mode = 0,