aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom_constbuf.c
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2014-01-09 11:16:27 -0800
committerPaul Berry <[email protected]>2014-01-21 20:25:02 -0800
commit3b22146dc714b6090f7423abbc4df53d7d1fdaa9 (patch)
treeb59bef08624870671092f9906585869f6f9aeac9 /src/mesa/state_tracker/st_atom_constbuf.c
parentcd18ba1c7aba66f2dd7cdbe2cf3b4a803c241d10 (diff)
mesa: Replace ctx->Shader.Current{Vertex,Fragment,Geometry}Program with an array.
These are replaced with ctx->Shader.CurrentProgram[MESA_SHADER_{VERTEX,FRAGMENT,GEOMETRY}]. In patches to follow, this will allow us to replace a lot of ad-hoc logic with a variable index into the array. With the exception of the changes to mtypes.h, this patch was generated entirely by the command: find src -type f '(' -iname '*.c' -o -iname '*.cpp' ')' \ -print0 | xargs -0 sed -i \ -e 's/\.CurrentVertexProgram/.CurrentProgram[MESA_SHADER_VERTEX]/g' \ -e 's/\.CurrentGeometryProgram/.CurrentProgram[MESA_SHADER_GEOMETRY]/g' \ -e 's/\.CurrentFragmentProgram/.CurrentProgram[MESA_SHADER_FRAGMENT]/g' Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_atom_constbuf.c')
-rw-r--r--src/mesa/state_tracker/st_atom_constbuf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c
index 14cdfc6f95d..c710b746550 100644
--- a/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/src/mesa/state_tracker/st_atom_constbuf.c
@@ -218,7 +218,7 @@ static void st_bind_ubos(struct st_context *st,
static void bind_vs_ubos(struct st_context *st)
{
- struct gl_shader_program *prog = st->ctx->Shader.CurrentVertexProgram;
+ struct gl_shader_program *prog = st->ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX];
if (!prog)
return;
@@ -237,7 +237,7 @@ const struct st_tracked_state st_bind_vs_ubos = {
static void bind_fs_ubos(struct st_context *st)
{
- struct gl_shader_program *prog = st->ctx->Shader.CurrentFragmentProgram;
+ struct gl_shader_program *prog = st->ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT];
if (!prog)
return;
@@ -256,7 +256,7 @@ const struct st_tracked_state st_bind_fs_ubos = {
static void bind_gs_ubos(struct st_context *st)
{
- struct gl_shader_program *prog = st->ctx->Shader.CurrentGeometryProgram;
+ struct gl_shader_program *prog = st->ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY];
if (!prog)
return;