summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen6_vs_state.c
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2014-01-09 11:16:27 -0800
committerPaul Berry <stereotype441@gmail.com>2014-01-21 20:25:02 -0800
commit3b22146dc714b6090f7423abbc4df53d7d1fdaa9 (patch)
treeb59bef08624870671092f9906585869f6f9aeac9 /src/mesa/drivers/dri/i965/gen6_vs_state.c
parentcd18ba1c7aba66f2dd7cdbe2cf3b4a803c241d10 (diff)
downloadexternal_mesa3d-3b22146dc714b6090f7423abbc4df53d7d1fdaa9.zip
external_mesa3d-3b22146dc714b6090f7423abbc4df53d7d1fdaa9.tar.gz
external_mesa3d-3b22146dc714b6090f7423abbc4df53d7d1fdaa9.tar.bz2
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 <chrisf@ijw.co.nz> Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen6_vs_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_vs_state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_vs_state.c b/src/mesa/drivers/dri/i965/gen6_vs_state.c
index ac58e97..6c6f739 100644
--- a/src/mesa/drivers/dri/i965/gen6_vs_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_vs_state.c
@@ -158,7 +158,7 @@ upload_vs_state(struct brw_context *brw)
/* Use ALT floating point mode for ARB vertex programs, because they
* require 0^0 == 1.
*/
- if (ctx->Shader.CurrentVertexProgram == NULL)
+ if (ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] == NULL)
floating_point_mode = GEN6_VS_FLOATING_POINT_MODE_ALT;
BEGIN_BATCH(6);