summaryrefslogtreecommitdiff
path: root/src/mesa/shader/programopt.c
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-11-17 16:10:24 -0800
committerIan Romanick <ian.d.romanick@intel.com>2009-11-17 16:25:38 -0800
commit5606dfb572bf4b89b4882265924705bacc8c182b (patch)
treef168c4f81f99fbe5741e6b10b958e0939f444397 /src/mesa/shader/programopt.c
parentb43887cf7e64cc44cf1409f910d1324549b265d2 (diff)
Merge branch 'outputswritten64'
Add a GLbitfield64 type and several macros to operate on 64-bit fields. The OutputsWritten field of gl_program is changed to use that type. This results in a fair amount of fallout in drivers that use programs. No changes are strictly necessary at this point as all bits used are below the 32-bit boundary. Fairly soon several bits will be added for clip distances written by a vertex shader. This will cause several bits used for varyings to be pushed above the 32-bit boundary. This will affect any drivers that support GLSL. At this point, only the i965 driver has been modified to support this eventuality. I did this as a "squash" merge. There were several places through the outputswritten64 branch where things were broken. I foresee this causing difficulties later for bisecting. The history is still available in the branch. Conflicts: src/mesa/drivers/dri/i965/brw_wm.h
Diffstat (limited to 'src/mesa/shader/programopt.c')
-rw-r--r--src/mesa/shader/programopt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c
index 3b8529592d..a0daac1b80 100644
--- a/src/mesa/shader/programopt.c
+++ b/src/mesa/shader/programopt.c
@@ -109,7 +109,7 @@ _mesa_insert_mvp_dp4_code(GLcontext *ctx, struct gl_vertex_program *vprog)
vprog->Base.Instructions = newInst;
vprog->Base.NumInstructions = newLen;
vprog->Base.InputsRead |= VERT_BIT_POS;
- vprog->Base.OutputsWritten |= (1 << VERT_RESULT_HPOS);
+ vprog->Base.OutputsWritten |= BITFIELD64_BIT(VERT_RESULT_HPOS);
}
@@ -211,7 +211,7 @@ _mesa_insert_mvp_mad_code(GLcontext *ctx, struct gl_vertex_program *vprog)
vprog->Base.Instructions = newInst;
vprog->Base.NumInstructions = newLen;
vprog->Base.InputsRead |= VERT_BIT_POS;
- vprog->Base.OutputsWritten |= (1 << VERT_RESULT_HPOS);
+ vprog->Base.OutputsWritten |= BITFIELD64_BIT(VERT_RESULT_HPOS);
}
@@ -613,7 +613,7 @@ _mesa_nop_fragment_program(GLcontext *ctx, struct gl_fragment_program *prog)
prog->Base.Instructions = inst;
prog->Base.NumInstructions = 2;
prog->Base.InputsRead = 1 << inputAttr;
- prog->Base.OutputsWritten = 1 << FRAG_RESULT_COLOR;
+ prog->Base.OutputsWritten = BITFIELD64_BIT(FRAG_RESULT_COLOR);
}
@@ -657,7 +657,7 @@ _mesa_nop_vertex_program(GLcontext *ctx, struct gl_vertex_program *prog)
prog->Base.Instructions = inst;
prog->Base.NumInstructions = 2;
prog->Base.InputsRead = 1 << inputAttr;
- prog->Base.OutputsWritten = 1 << VERT_RESULT_COL0;
+ prog->Base.OutputsWritten = BITFIELD64_BIT(VERT_RESULT_COL0);
/*
* Now insert code to do standard modelview/projection transformation.