summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2011-10-31 18:32:59 +0100
committerMathias Fröhlich <[email protected]>2011-11-29 06:35:44 +0100
commitdca6a28a14f22d77273d79d44f57b0d853c0242d (patch)
treec917c9372e56b864262991cf82f48b62b9625bc2 /src/mesa/state_tracker
parentf364ac1da10ff67eba5196c1074aff579864f741 (diff)
mesa: Make gl_program::InputsRead 64 bits.
Make gl_program::InputsRead a 64 bits bitfield. Adapt the intel and radeon driver to handle a 64 bits InputsRead value. Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_pixeltransfer.c2
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp8
-rw-r--r--src/mesa/state_tracker/st_program.c10
3 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_atom_pixeltransfer.c b/src/mesa/state_tracker/st_atom_pixeltransfer.c
index 12b5bc5ba79..afca609769f 100644
--- a/src/mesa/state_tracker/st_atom_pixeltransfer.c
+++ b/src/mesa/state_tracker/st_atom_pixeltransfer.c
@@ -166,7 +166,7 @@ get_pixel_transfer_program(struct gl_context *ctx, const struct state_key *key)
inst[ic].TexSrcUnit = 0;
inst[ic].TexSrcTarget = TEXTURE_2D_INDEX;
ic++;
- fp->Base.InputsRead = (1 << FRAG_ATTRIB_TEX0);
+ fp->Base.InputsRead = BITFIELD64_BIT(FRAG_ATTRIB_TEX0);
fp->Base.OutputsWritten = BITFIELD64_BIT(FRAG_RESULT_COLOR);
fp->Base.SamplersUsed = 0x1; /* sampler 0 (bit 0) is used */
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 74b8fa7c7fd..59b5ffd4c32 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -3731,7 +3731,7 @@ get_pixel_transfer_visitor(struct st_fragment_program *fp,
inst->sampler = 0;
inst->tex_target = TEXTURE_2D_INDEX;
- prog->InputsRead |= (1 << FRAG_ATTRIB_TEX0);
+ prog->InputsRead |= FRAG_BIT_TEX0;
prog->SamplersUsed |= (1 << 0); /* mark sampler 0 as used */
v->samplers_used |= (1 << 0);
@@ -3802,7 +3802,7 @@ get_pixel_transfer_visitor(struct st_fragment_program *fp,
src_regs[i].index = src0.index;
}
else if (src_regs[i].file == PROGRAM_INPUT)
- prog->InputsRead |= (1 << src_regs[i].index);
+ prog->InputsRead |= BITFIELD64_BIT(src_regs[i].index);
}
v->emit(NULL, inst->op, inst->dst, src_regs[0], src_regs[1], src_regs[2]);
@@ -3855,7 +3855,7 @@ get_bitmap_visitor(struct st_fragment_program *fp,
inst->sampler = samplerIndex;
inst->tex_target = TEXTURE_2D_INDEX;
- prog->InputsRead |= (1 << FRAG_ATTRIB_TEX0);
+ prog->InputsRead |= FRAG_BIT_TEX0;
prog->SamplersUsed |= (1 << samplerIndex); /* mark sampler as used */
v->samplers_used |= (1 << samplerIndex);
@@ -3877,7 +3877,7 @@ get_bitmap_visitor(struct st_fragment_program *fp,
for (int i=0; i<3; i++) {
src_regs[i] = inst->src[i];
if (src_regs[i].file == PROGRAM_INPUT)
- prog->InputsRead |= (1 << src_regs[i].index);
+ prog->InputsRead |= BITFIELD64_BIT(src_regs[i].index);
}
v->emit(NULL, inst->op, inst->dst, src_regs[0], src_regs[1], src_regs[2]);
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index e03157940b1..768da5114e6 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -194,7 +194,7 @@ st_prepare_vertex_program(struct gl_context *ctx,
* and TGSI generic input indexes, plus input attrib semantic info.
*/
for (attr = 0; attr < VERT_ATTRIB_MAX; attr++) {
- if (stvp->Base.Base.InputsRead & (1 << attr)) {
+ if ((stvp->Base.Base.InputsRead & BITFIELD64_BIT(attr)) != 0) {
stvp->input_to_index[attr] = stvp->num_inputs;
stvp->index_to_input[stvp->num_inputs] = attr;
stvp->num_inputs++;
@@ -490,7 +490,7 @@ st_translate_fragment_program(struct st_context *st,
GLuint inputMapping[FRAG_ATTRIB_MAX];
GLuint interpMode[PIPE_MAX_SHADER_INPUTS]; /* XXX size? */
GLuint attr;
- const GLbitfield inputsRead = stfp->Base.Base.InputsRead;
+ const GLbitfield64 inputsRead = stfp->Base.Base.InputsRead;
struct ureg_program *ureg;
GLboolean write_all = GL_FALSE;
@@ -510,7 +510,7 @@ st_translate_fragment_program(struct st_context *st,
* Convert Mesa program inputs to TGSI input register semantics.
*/
for (attr = 0; attr < FRAG_ATTRIB_MAX; attr++) {
- if (inputsRead & (1 << attr)) {
+ if ((inputsRead & BITFIELD64_BIT(attr)) != 0) {
const GLuint slot = fs_num_inputs++;
inputMapping[attr] = slot;
@@ -749,7 +749,7 @@ st_translate_geometry_program(struct st_context *st,
GLuint outputMapping[GEOM_RESULT_MAX];
struct pipe_context *pipe = st->pipe;
GLuint attr;
- const GLbitfield inputsRead = stgp->Base.Base.InputsRead;
+ const GLbitfield64 inputsRead = stgp->Base.Base.InputsRead;
GLuint vslot = 0;
GLuint num_generic = 0;
@@ -790,7 +790,7 @@ st_translate_geometry_program(struct st_context *st,
* Convert Mesa program inputs to TGSI input register semantics.
*/
for (attr = 0; attr < GEOM_ATTRIB_MAX; attr++) {
- if (inputsRead & (1 << attr)) {
+ if ((inputsRead & BITFIELD64_BIT(attr)) != 0) {
const GLuint slot = gs_num_inputs;
gs_num_inputs++;