summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r--src/mesa/drivers/dri/i915/i830_metaops.c2
-rw-r--r--src/mesa/drivers/dri/i915/i830_state.c2
-rw-r--r--src/mesa/drivers/dri/i915/i915_fragprog.c13
-rw-r--r--src/mesa/drivers/dri/i915/i915_program.c5
-rw-r--r--src/mesa/drivers/dri/i915/i915_state.c2
-rw-r--r--src/mesa/drivers/dri/i915/intel_context.c1
6 files changed, 15 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_metaops.c b/src/mesa/drivers/dri/i915/i830_metaops.c
index dbf5f043498..c1d7fe349c0 100644
--- a/src/mesa/drivers/dri/i915/i830_metaops.c
+++ b/src/mesa/drivers/dri/i915/i830_metaops.c
@@ -50,7 +50,6 @@
#define SET_STATE( i830, STATE ) \
do { \
- assert(!i830->intel.prim.flush); \
i830->current->emitted = 0; \
i830->current = &i830->STATE; \
i830->current->emitted = 0; \
@@ -907,7 +906,6 @@ i830RotateWindow(intelContextPtr intel, __DRIdrawablePrivate *dPriv,
} /* cliprect loop */
- assert(!intel->prim.flush);
intelFlushBatchLocked( intel, GL_FALSE, GL_FALSE, GL_FALSE );
done:
diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c
index ec9dca6231e..95125190108 100644
--- a/src/mesa/drivers/dri/i915/i830_state.c
+++ b/src/mesa/drivers/dri/i915/i830_state.c
@@ -225,7 +225,7 @@ static void i830EvalLogicOpBlendState(GLcontext *ctx)
I830_STATECHANGE(i830, I830_UPLOAD_CTX);
- if (ctx->Color._LogicOpEnabled) {
+ if (RGBA_LOGICOP_ENABLED(ctx)) {
i830->state.Ctx[I830_CTXREG_ENABLES_1] &= ~(ENABLE_COLOR_BLEND |
ENABLE_LOGIC_OP_MASK);
i830->state.Ctx[I830_CTXREG_ENABLES_1] |= (DISABLE_COLOR_BLEND |
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c
index 7160234bced..ef14f3eef7c 100644
--- a/src/mesa/drivers/dri/i915/i915_fragprog.c
+++ b/src/mesa/drivers/dri/i915/i915_fragprog.c
@@ -39,6 +39,7 @@
#include "program_instruction.h"
#include "program.h"
+#include "programopt.h"
@@ -123,6 +124,7 @@ static GLuint src_vector( struct i915_fragment_program *p,
p, p->ctx->FragmentProgram.Parameters[source->Index]);
break;
+ case PROGRAM_CONSTANT:
case PROGRAM_STATE_VAR:
case PROGRAM_NAMED_PARAM:
src = i915_emit_param4fv(
@@ -937,6 +939,12 @@ static void i915ProgramStringNotify( GLcontext *ctx,
*/
ctx->Driver.Enable( ctx, GL_FRAGMENT_PROGRAM_ARB,
ctx->FragmentProgram.Enabled );
+
+ if (p->FragProg.FogOption) {
+ /* add extra instructions to do fog, then turn off FogOption field */
+ _mesa_append_fog_code(ctx, &p->FragProg);
+ p->FragProg.FogOption = GL_NONE;
+ }
}
_tnl_program_string(ctx, target, prog);
@@ -1010,7 +1018,10 @@ void i915ValidateFragmentProgram( i915ContextPtr i915 )
EMIT_PAD( 1 );
}
-#if 0
+ /* XXX this was disabled, but enabling this code helped fix the Glean
+ * tfragprog1 fog tests.
+ */
+#if 1
if ((inputsRead & FRAG_BIT_FOGC) || i915->vertex_fog != I915_FOG_NONE) {
EMIT_ATTR( _TNL_ATTRIB_FOG, EMIT_1F, S4_VFMT_FOG_PARAM, 4 );
}
diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c
index 0faadb4f1a7..9c13290d118 100644
--- a/src/mesa/drivers/dri/i915/i915_program.c
+++ b/src/mesa/drivers/dri/i915/i915_program.c
@@ -369,10 +369,7 @@ GLuint i915_emit_param4fv( struct i915_fragment_program *p,
void i915_program_error( struct i915_fragment_program *p, const char *msg )
{
- /* XXX we shouldn't print anything to stdout, record GL error or
- * call _mesa_problem()
- */
- fprintf(stderr, "%s\n", msg);
+ _mesa_problem(NULL, "i915_program_error: %s", msg);
p->error = 1;
}
diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c
index db5bb9ddc78..3cec6a2ddfc 100644
--- a/src/mesa/drivers/dri/i915/i915_state.c
+++ b/src/mesa/drivers/dri/i915/i915_state.c
@@ -141,7 +141,7 @@ static void i915EvalLogicOpBlendState(GLcontext *ctx)
I915_STATECHANGE(i915, I915_UPLOAD_CTX);
- if (ctx->Color._LogicOpEnabled) {
+ if (RGBA_LOGICOP_ENABLED(ctx)) {
i915->state.Ctx[I915_CTXREG_LIS5] |= S5_LOGICOP_ENABLE;
i915->state.Ctx[I915_CTXREG_LIS6] &= ~S6_CBUF_BLEND_ENABLE;
} else {
diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c
index 3d543b2485f..7bb00d98339 100644
--- a/src/mesa/drivers/dri/i915/intel_context.c
+++ b/src/mesa/drivers/dri/i915/intel_context.c
@@ -242,7 +242,6 @@ void intelInitDriverFunctions( struct dd_function_table *functions )
functions->Clear = intelClear;
functions->Flush = intelglFlush;
functions->Finish = intelFinish;
- functions->GetBufferSize = NULL; /* OBSOLETE */
functions->GetString = intelGetString;
functions->UpdateState = intelInvalidateState;