summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNian Wu <[email protected]>2007-03-22 17:00:33 +0800
committerNian Wu <[email protected]>2007-03-22 17:00:33 +0800
commit2eb656ef4f4c7a365501e615a43ae72cfdc12cda (patch)
treea93ebd8b49eb559bc1eca41ec03739cd41aef113 /src
parent8ba06464ac8de726390899e790e15b40df08001e (diff)
parent01b7f2ab2e7a9291bf54475e816e88804ee7cd53 (diff)
Merge git://proxy01.pd.intel.com:9419/git/mesa/mesa into crestline
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_tnl.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_fp.c2
-rw-r--r--src/mesa/swrast/s_copypix.c7
-rw-r--r--src/mesa/swrast/s_drawpix.c5
-rw-r--r--src/mesa/swrast/s_readpix.c4
6 files changed, 20 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 1ae065b10dd..5d98176dced 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -117,7 +117,7 @@ static void brwProgramStringNotify( GLcontext *ctx,
if (p == fp)
brw->state.dirty.brw |= BRW_NEW_FRAGMENT_PROGRAM;
p->id = brw->program_id++;
- p->param_state = brw_parameter_list_state_flags(p->program.Base.Parameters);
+ p->param_state = p->program.Base.Parameters->StateFlags;
}
else if (target == GL_VERTEX_PROGRAM_ARB) {
struct brw_context *brw = brw_context(ctx);
@@ -126,7 +126,7 @@ static void brwProgramStringNotify( GLcontext *ctx,
if (p == vp)
brw->state.dirty.brw |= BRW_NEW_VERTEX_PROGRAM;
p->id = brw->program_id++;
- p->param_state = brw_parameter_list_state_flags(p->program.Base.Parameters);
+ p->param_state = p->program.Base.Parameters->StateFlags;
/* Also tell tnl about it:
*/
diff --git a/src/mesa/drivers/dri/i965/brw_vs_tnl.c b/src/mesa/drivers/dri/i965/brw_vs_tnl.c
index e22a26b2917..dd1664bf33a 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_tnl.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_tnl.c
@@ -1174,8 +1174,8 @@ static void build_fog( struct tnl_program *p )
switch (p->state->fog_option) {
case FOG_LINEAR: {
- emit_op3(p, OPCODE_MAD, tmp, 0, input, swizzle1(params,X), swizzle1(params,Y));
- emit_op2(p, OPCODE_MUL, tmp, 0, tmp, swizzle1(params,W));
+ emit_op1(p, OPCODE_ABS, tmp, 0, input);
+ emit_op3(p, OPCODE_MAD, tmp, 0, tmp, swizzle1(params,X), swizzle1(params,Y));
emit_op2(p, OPCODE_MAX, tmp, 0, tmp, swizzle1(id,X)); /* saturate */
emit_op2(p, OPCODE_MIN, fog, WRITEMASK_X, tmp, swizzle1(id,W));
break;
diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c
index bb0aa356150..ba2dbeccde2 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_fp.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c
@@ -398,7 +398,7 @@ static struct prog_src_register search_or_add_param6( struct brw_wm_compile *c,
/* Recalculate state dependency:
*/
- c->fp->param_state = brw_parameter_list_state_flags( paramList );
+ c->fp->param_state = paramList->StateFlags;
return src_reg(PROGRAM_STATE_VAR, idx);
}
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index 7e8ebb4477c..b318777072a 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -199,7 +199,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
GLint sy, dy, stepy, row;
const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F;
GLint overlapping;
- const GLuint transferOps = ctx->_ImageTransferState;
+ GLuint transferOps = ctx->_ImageTransferState;
SWspan span;
if (!ctx->ReadBuffer->_ColorReadBuffer) {
@@ -211,6 +211,11 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
copy_conv_rgba_pixels(ctx, srcx, srcy, width, height, destx, desty);
return;
}
+ else if (ctx->Pixel.Convolution1DEnabled) {
+ /* make sure we don't apply 1D convolution */
+ transferOps &= ~(IMAGE_CONVOLUTION_BIT |
+ IMAGE_POST_CONVOLUTION_SCALE_BIAS);
+ }
/* Determine if copy should be done bottom-to-top or top-to-bottom */
if (srcy < desty) {
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index d97d53e83b4..99ad71143e0 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -619,6 +619,11 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
type = GL_FLOAT;
transferOps &= IMAGE_POST_CONVOLUTION_BITS;
}
+ else if (ctx->Pixel.Convolution1DEnabled) {
+ /* we only want to apply 1D convolution to glTexImage1D */
+ transferOps &= ~(IMAGE_CONVOLUTION_BIT |
+ IMAGE_POST_CONVOLUTION_SCALE_BIAS);
+ }
if (ctx->DrawBuffer->_NumColorDrawBuffers[0] > 0 &&
ctx->DrawBuffer->_ColorDrawBuffers[0][0]->DataType != GL_FLOAT &&
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index c5524c06306..7dc48aec681 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -410,6 +410,10 @@ read_rgba_pixels( GLcontext *ctx,
= (GLubyte *) _mesa_image_address2d(packing, pixels, width, height,
format, type, 0, 0);
+ /* make sure we don't apply 1D convolution */
+ transferOps &= ~(IMAGE_CONVOLUTION_BIT |
+ IMAGE_POST_CONVOLUTION_SCALE_BIAS);
+
for (row = 0; row < height; row++, y++) {
/* Get float rgba pixels */