diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-10-07 16:14:27 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-10-07 16:16:27 -0600 |
commit | 800c350d71132bbb5126bd89310df540332978f4 (patch) | |
tree | 3213fa1ca0a64cb9913eac9c76105dabee5bdfaf /src/gallium/drivers/cell/ppu/cell_gen_fp.c | |
parent | ce416566bc71d2463785a834ffbe14fb5e9eae03 (diff) |
cell: add support for fragment shader constant buffers
Diffstat (limited to 'src/gallium/drivers/cell/ppu/cell_gen_fp.c')
-rw-r--r-- | src/gallium/drivers/cell/ppu/cell_gen_fp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_gen_fp.c b/src/gallium/drivers/cell/ppu/cell_gen_fp.c index 131a2356fe..3065869d04 100644 --- a/src/gallium/drivers/cell/ppu/cell_gen_fp.c +++ b/src/gallium/drivers/cell/ppu/cell_gen_fp.c @@ -215,7 +215,15 @@ get_src_reg(struct codegen *gen, reg = gen->imm_regs[src->SrcRegister.Index][swizzle]; break; case TGSI_FILE_CONSTANT: - /* xxx fall-through for now / fix */ + { + /* offset is measured in quadwords, not bytes */ + int offset = src->SrcRegister.Index * 4 + swizzle; + reg = get_itemp(gen); + reg_is_itemp = TRUE; + /* Load: reg = memory[(machine_reg) + offset] */ + spe_lqd(gen->f, reg, gen->constants_reg, offset); + } + break; default: assert(0); } |