Mesa (master): i915g: Fix fallout from 8e4540ec2a82e72be491bc8fe23c10551d29a96c
Stephane Marchesin
marcheu at kemper.freedesktop.org
Fri Feb 24 23:18:36 UTC 2012
Module: Mesa
Branch: master
Commit: 6512bc4e67f0f2b53805d050e11f6a336b505f40
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6512bc4e67f0f2b53805d050e11f6a336b505f40
Author: Stéphane Marchesin <marcheu at chromium.org>
Date: Fri Feb 24 15:17:27 2012 -0800
i915g: Fix fallout from 8e4540ec2a82e72be491bc8fe23c10551d29a96c
Fixes piglit regressions from that change.
---
src/gallium/drivers/i915/i915_fpc_translate.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/i915/i915_fpc_translate.c b/src/gallium/drivers/i915/i915_fpc_translate.c
index 1adbbe5..94c0c69 100644
--- a/src/gallium/drivers/i915/i915_fpc_translate.c
+++ b/src/gallium/drivers/i915/i915_fpc_translate.c
@@ -49,7 +49,7 @@
* Simple pass-through fragment shader to use when we don't have
* a real shader (or it fails to compile for some reason).
*/
-static unsigned passthrough[] =
+static unsigned passthrough_decl[] =
{
_3DSTATE_PIXEL_SHADER_PROGRAM | ((2*3)-1),
@@ -61,7 +61,10 @@ static unsigned passthrough[] =
D0_CHANNEL_ALL),
0,
0,
+};
+static unsigned passthrough_program[] =
+{
/* move to output color:
*/
(A0_MOV |
@@ -125,10 +128,13 @@ negate(int reg, int x, int y, int z, int w)
static void
i915_use_passthrough_shader(struct i915_fragment_shader *fs)
{
- fs->program = (uint *) MALLOC(sizeof(passthrough));
+ fs->program = (uint *) MALLOC(sizeof(passthrough_program));
+ fs->decl = (uint *) MALLOC(sizeof(passthrough_decl));
if (fs->program) {
- memcpy(fs->program, passthrough, sizeof(passthrough));
- fs->program_len = Elements(passthrough);
+ memcpy(fs->program, passthrough_program, sizeof(passthrough_program));
+ memcpy(fs->decl, passthrough_decl, sizeof(passthrough_decl));
+ fs->program_len = Elements(passthrough_program);
+ fs->decl_len = Elements(passthrough_decl);
}
fs->num_constants = 0;
}
More information about the mesa-commit
mailing list