OSDN Git Service

llvmpipe: Simplify and fix system variables fetch.
authorOlivier Galibert <galibert@pobox.com>
Tue, 19 Jun 2012 18:51:20 +0000 (20:51 +0200)
committerBrian Paul <brianp@vmware.com>
Tue, 19 Jun 2012 20:40:44 +0000 (14:40 -0600)
commit46931ecf480e1d231bb6c2236d91b5390f2465ac
tree981e1903926b2b79f2c696d8a2a80470229dc2aa
parent4625a9b1adf7a30c56e2bbeb41573fbba4465851
llvmpipe: Simplify and fix system variables fetch.

The system array values concept doesn't really because it expects the
system values to be fixed per call, which is wrong for gl_VertexID and
iffy for gl_SampleID.  So this patch does two things:

- kill the array, have emit_fetch_system_value directly pick the
  values it needs (only gl_InstanceID for now, as the previous code)

- correctly handle the expected type in emit_fetch_system_value

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/draw/draw_llvm.c
src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
src/gallium/drivers/llvmpipe/lp_state_fs.c