OSDN Git Service

gallium: refactor pipe_shader_state to support multiple IR's
authorRob Clark <robdclark@gmail.com>
Sat, 17 Oct 2015 17:34:24 +0000 (13:34 -0400)
committerRob Clark <robclark@freedesktop.org>
Wed, 11 May 2016 16:20:11 +0000 (12:20 -0400)
commit425dc4c4b3663c619634de9f9f00c7765e7d0320
tree3053cbc43904815fe895d625e554bcf48235aac8
parent4500d17245d0c4bd0b52bf444cf1d90bab932794
gallium: refactor pipe_shader_state to support multiple IR's

The goal is to allow the pipe driver to request something other than
TGSI, but detect whether what is getting is TGSI vs what it requested.
The pipe drivers will always have to support TGSI (and convert that into
whatever it is that they prefer), but in some cases we should be able to
skip the TGSI intermediate step (such as glsl->nir vs glsl->tgsi->nir).

I think pipe_compute_state should get similar treatment.  Currently,
afaict, it has one user and one consumer, which has allowed it to be
sloppy wrt. supporting alternative IR's.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/hud/hud_context.c
src/gallium/auxiliary/postprocess/pp_run.c
src/gallium/auxiliary/tgsi/tgsi_ureg.c
src/gallium/auxiliary/util/u_simple_shaders.c
src/gallium/auxiliary/util/u_tests.c
src/gallium/include/pipe/p_defines.h
src/gallium/include/pipe/p_state.h