summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/postprocess
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2015-10-17 13:34:24 -0400
committerRob Clark <robclark@freedesktop.org>2016-05-11 12:20:11 -0400
commit425dc4c4b3663c619634de9f9f00c7765e7d0320 (patch)
tree3053cbc43904815fe895d625e554bcf48235aac8 /src/gallium/auxiliary/postprocess
parent4500d17245d0c4bd0b52bf444cf1d90bab932794 (diff)
downloadexternal_mesa3d-425dc4c4b3663c619634de9f9f00c7765e7d0320.zip
external_mesa3d-425dc4c4b3663c619634de9f9f00c7765e7d0320.tar.gz
external_mesa3d-425dc4c4b3663c619634de9f9f00c7765e7d0320.tar.bz2
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>
Diffstat (limited to 'src/gallium/auxiliary/postprocess')
-rw-r--r--src/gallium/auxiliary/postprocess/pp_run.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/postprocess/pp_run.c b/src/gallium/auxiliary/postprocess/pp_run.c
index bc79c5a..41fa7ed 100644
--- a/src/gallium/auxiliary/postprocess/pp_run.c
+++ b/src/gallium/auxiliary/postprocess/pp_run.c
@@ -255,8 +255,7 @@ pp_tgsi_to_state(struct pipe_context *pipe, const char *text, bool isvs,
return NULL;
}
- state.tokens = tokens;
- memset(&state.stream_output, 0, sizeof(state.stream_output));
+ pipe_shader_state_from_tgsi(&state, tokens);
if (isvs) {
ret_state = pipe->create_vs_state(pipe, &state);