summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vs.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/brw_vs.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/brw_vs.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index 0e9470f..be260ae 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -156,7 +156,7 @@ brw_compute_vue_map(struct brw_context *brw, struct brw_vue_map *vue_map,
*/
gl_clip_plane *brw_select_clip_planes(struct gl_context *ctx)
{
- if (ctx->Shader.CurrentVertexProgram) {
+ if (ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]) {
/* There is currently a GLSL vertex shader, so clip according to GLSL
* rules, which means compare gl_ClipVertex (or gl_Position, if
* gl_ClipVertex wasn't assigned) against the eye-coordinate clip planes
@@ -482,7 +482,7 @@ static void brw_upload_vs_prog(struct brw_context *brw)
if (!brw_search_cache(&brw->cache, BRW_VS_PROG,
&key, sizeof(key),
&brw->vs.base.prog_offset, &brw->vs.prog_data)) {
- bool success = do_vs_prog(brw, ctx->Shader.CurrentVertexProgram,
+ bool success = do_vs_prog(brw, ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX],
vp, &key);
(void) success;
assert(success);