summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_fs_exec.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-03-10 13:09:00 -0700
committerBrian Paul <brianp@vmware.com>2010-03-10 13:09:03 -0700
commit7069dff80f25d0ac532c9f76634d1cd382d4fac1 (patch)
tree5eef771967e3cd842ad9259d8b1868a5ec30517b /src/gallium/drivers/softpipe/sp_fs_exec.c
parent3c48f40f61d8122009175273b3c15e108927b146 (diff)
softpipe: fix memcpy params to avoid static analysis warnings
See fd.o bug 26970. Also added sanity check assertions.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_fs_exec.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_fs_exec.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/softpipe/sp_fs_exec.c b/src/gallium/drivers/softpipe/sp_fs_exec.c
index 27fa126b7c..67e2c8f8bc 100644
--- a/src/gallium/drivers/softpipe/sp_fs_exec.c
+++ b/src/gallium/drivers/softpipe/sp_fs_exec.c
@@ -145,8 +145,13 @@ exec_run( const struct sp_fragment_shader *base,
case TGSI_SEMANTIC_COLOR:
{
uint cbuf = sem_index[i];
+
+ assert(sizeof(quad->output.color[cbuf]) ==
+ sizeof(machine->Outputs[i]));
+
+ /* copy float[4][4] result */
memcpy(quad->output.color[cbuf],
- &machine->Outputs[i].xyzw[0].f[0],
+ &machine->Outputs[i],
sizeof(quad->output.color[0]) );
}
break;