gallium: simplify tgsi_full_immediate struct
authorKeith Whitwell <keithw@vmware.com>
Tue, 21 Jul 2009 23:39:00 +0000 (00:39 +0100)
committerKeith Whitwell <keithw@vmware.com>
Wed, 22 Jul 2009 11:42:09 +0000 (12:42 +0100)
commitfd31f92cea0ce8613a22d8f4b3c75b340bcc5689
tree719c361c346d88cf89ce82754dddf7473f8e2b95
parent5e3c62b550407111cf5f7a700abb18f947bd6903
gallium: simplify tgsi_full_immediate struct

Remove the need to have a pointer in this struct by just including
the immediate data inline.  Having a pointer in the struct introduces
complications like needing to alloc/free the data pointed to, uncertainty
about who owns the data, etc.  There doesn't seem to be a need for it,
and it is unlikely to make much difference plus or minus to performance.

Added some asserts as we now will trip up on immediates with more
than four elements.  There were actually already quite a few such asserts,
but the >4 case could be used in the future to specify indexable immediate
ranges, such as lookup tables.
26 files changed:
src/gallium/auxiliary/draw/draw_pipe_pstipple.c
src/gallium/auxiliary/draw/draw_vs_aos.c
src/gallium/auxiliary/gallivm/tgsitollvm.cpp
src/gallium/auxiliary/tgsi/tgsi_build.c
src/gallium/auxiliary/tgsi/tgsi_build.h
src/gallium/auxiliary/tgsi/tgsi_dump.c
src/gallium/auxiliary/tgsi/tgsi_dump_c.c
src/gallium/auxiliary/tgsi/tgsi_exec.c
src/gallium/auxiliary/tgsi/tgsi_parse.c
src/gallium/auxiliary/tgsi/tgsi_parse.h
src/gallium/auxiliary/tgsi/tgsi_ppc.c
src/gallium/auxiliary/tgsi/tgsi_sse2.c
src/gallium/auxiliary/tgsi/tgsi_text.c
src/gallium/drivers/cell/ppu/cell_gen_fp.c
src/gallium/drivers/i915simple/i915_fpc_translate.c
src/gallium/drivers/i965simple/brw_vs_emit.c
src/gallium/drivers/nv20/nv20_vertprog.c
src/gallium/drivers/nv30/nv30_fragprog.c
src/gallium/drivers/nv30/nv30_vertprog.c
src/gallium/drivers/nv40/nv40_fragprog.c
src/gallium/drivers/nv40/nv40_vertprog.c
src/gallium/drivers/nv50/nv50_program.c
src/gallium/drivers/r300/r300_fs.c
src/gallium/drivers/r300/r300_vs.c
src/gallium/include/pipe/p_shader_tokens.h
src/mesa/state_tracker/st_mesa_to_tgsi.c