diff options
author | Michal Krol <[email protected]> | 2006-03-21 10:37:40 +0000 |
---|---|---|
committer | Michal Krol <[email protected]> | 2006-03-21 10:37:40 +0000 |
commit | 071357096e682e9af59ad45ea5abc444ab431837 (patch) | |
tree | 99fba2183fe97981f7c309d99b206b39e43f5bec /src/mesa/tnl | |
parent | 519b23b21f9cd6945fd17cdb26e7a6f531cdeec0 (diff) |
GLSL fixes:
- generate error on NULL pointers in glShaderSourceARB;
- reinstall program object, if current, in glLinkProgramARB;
- vertex and fragment shaders are optional in program object;
- floor asm was wrongly computed for x86 back-end;
- allow for (void) idiom in function prototypes;
- all fixed-state uniforms are updated;
- local variable initializers are working;
- implement texture* and shadow* functions for vertex processor;
- generate error if too many arguments in general constructor;
- trim unused data in general constructor;
- struct r-value field select was badly relocated;
Changes:
- add derived state gl_fog_attrib::_Scale;
- add derived state gl_light::_CosCutoffNeg;
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r-- | src/mesa/tnl/t_vb_arbprogram.c | 4 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_arbshader.c | 4 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_cull.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_fog.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_light.c | 4 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_normals.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_points.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_program.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_texgen.c | 4 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_texmat.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_vertex.c | 2 |
11 files changed, 15 insertions, 15 deletions
diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index 7472b51d701..11a5b654fc9 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -1264,7 +1264,7 @@ run_arb_vertex_program(GLcontext *ctx, struct tnl_pipeline_stage *stage) GLuint i, j; GLbitfield outputs; - if (ctx->ShaderObjects.CurrentProgram != NULL) + if (ctx->ShaderObjects._VertexShaderPresent) return GL_TRUE; program = (ctx->VertexProgram._Enabled ? ctx->VertexProgram.Current : ctx->_TnlProgram); @@ -1427,7 +1427,7 @@ validate_vertex_program( GLcontext *ctx, struct tnl_pipeline_stage *stage ) struct arb_vp_machine *m = ARB_VP_MACHINE(stage); struct vertex_program *program; - if (ctx->ShaderObjects.CurrentProgram != NULL) + if (ctx->ShaderObjects._VertexShaderPresent) return; program = (ctx->VertexProgram._Enabled ? ctx->VertexProgram.Current : 0); diff --git a/src/mesa/tnl/t_vb_arbshader.c b/src/mesa/tnl/t_vb_arbshader.c index 65304372ddf..a2e6b37cd30 100644 --- a/src/mesa/tnl/t_vb_arbshader.c +++ b/src/mesa/tnl/t_vb_arbshader.c @@ -172,10 +172,10 @@ static GLboolean run_arb_vertex_shader (GLcontext *ctx, struct tnl_pipeline_stag struct gl2_program_intf **pro;
GLsizei i, j;
- pro = ctx->ShaderObjects.CurrentProgram;
- if (pro == NULL)
+ if (!ctx->ShaderObjects._VertexShaderPresent)
return GL_TRUE;
+ pro = ctx->ShaderObjects.CurrentProgram;
(**pro).UpdateFixedUniforms (pro);
for (i = 0; i < vb->Count; i++)
diff --git a/src/mesa/tnl/t_vb_cull.c b/src/mesa/tnl/t_vb_cull.c index 3a022e84c46..b5ba68dc86d 100644 --- a/src/mesa/tnl/t_vb_cull.c +++ b/src/mesa/tnl/t_vb_cull.c @@ -57,7 +57,7 @@ static GLboolean run_cull_stage( GLcontext *ctx, GLuint count = VB->Count; GLuint i; - if (ctx->ShaderObjects.CurrentProgram != NULL) + if (ctx->ShaderObjects._VertexShaderPresent) return GL_TRUE; if (ctx->VertexProgram._Enabled || diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c index 2bd9824dc0f..bbee44ebea0 100644 --- a/src/mesa/tnl/t_vb_fog.c +++ b/src/mesa/tnl/t_vb_fog.c @@ -148,7 +148,7 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) struct fog_stage_data *store = FOG_STAGE_DATA(stage); GLvector4f *input; - if (ctx->ShaderObjects.CurrentProgram != NULL) + if (ctx->ShaderObjects._VertexShaderPresent) return GL_TRUE; if (!ctx->Fog.Enabled || ctx->VertexProgram._Enabled) diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c index d4c83189c24..4d360007a46 100644 --- a/src/mesa/tnl/t_vb_light.c +++ b/src/mesa/tnl/t_vb_light.c @@ -203,7 +203,7 @@ static GLboolean run_lighting( GLcontext *ctx, GLvector4f *input = ctx->_NeedEyeCoords ? VB->EyePtr : VB->ObjPtr; GLuint idx; - if (ctx->ShaderObjects.CurrentProgram != NULL) + if (ctx->ShaderObjects._VertexShaderPresent) return GL_TRUE; if (!ctx->Light.Enabled || ctx->VertexProgram._Enabled) @@ -264,7 +264,7 @@ static void validate_lighting( GLcontext *ctx, { light_func *tab; - if (ctx->ShaderObjects.CurrentProgram != NULL) + if (ctx->ShaderObjects._VertexShaderPresent) return; if (!ctx->Light.Enabled || ctx->VertexProgram._Enabled) diff --git a/src/mesa/tnl/t_vb_normals.c b/src/mesa/tnl/t_vb_normals.c index e87a67981e2..edcb4de6e94 100644 --- a/src/mesa/tnl/t_vb_normals.c +++ b/src/mesa/tnl/t_vb_normals.c @@ -95,7 +95,7 @@ validate_normal_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) { struct normal_stage_data *store = NORMAL_STAGE_DATA(stage); - if (ctx->ShaderObjects.CurrentProgram != NULL) { + if (ctx->ShaderObjects._VertexShaderPresent) { store->NormalTransform = NULL; return; } diff --git a/src/mesa/tnl/t_vb_points.c b/src/mesa/tnl/t_vb_points.c index d7f9ad687e8..0ad36079170 100644 --- a/src/mesa/tnl/t_vb_points.c +++ b/src/mesa/tnl/t_vb_points.c @@ -47,7 +47,7 @@ struct point_stage_data { static GLboolean run_point_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) { - if (ctx->ShaderObjects.CurrentProgram != NULL) + if (ctx->ShaderObjects._VertexShaderPresent) return GL_TRUE; if (ctx->Point._Attenuated && !ctx->VertexProgram._Enabled) { diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index 3908997d71c..06789b97baf 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -80,7 +80,7 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) struct vertex_program *program = ctx->VertexProgram.Current; GLuint i; - if (ctx->ShaderObjects.CurrentProgram != NULL) + if (ctx->ShaderObjects._VertexShaderPresent) return GL_TRUE; if (!ctx->VertexProgram._Enabled || diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c index 058e7b10b26..bfb7a503691 100644 --- a/src/mesa/tnl/t_vb_texgen.c +++ b/src/mesa/tnl/t_vb_texgen.c @@ -488,7 +488,7 @@ static GLboolean run_texgen_stage( GLcontext *ctx, struct texgen_stage_data *store = TEXGEN_STAGE_DATA(stage); GLuint i; - if (ctx->ShaderObjects.CurrentProgram != NULL) + if (ctx->ShaderObjects._VertexShaderPresent) return GL_TRUE; if (!ctx->Texture._TexGenEnabled || ctx->VertexProgram._Enabled) @@ -516,7 +516,7 @@ static void validate_texgen_stage( GLcontext *ctx, struct texgen_stage_data *store = TEXGEN_STAGE_DATA(stage); GLuint i; - if (ctx->ShaderObjects.CurrentProgram != NULL) + if (ctx->ShaderObjects._VertexShaderPresent) return; if (!ctx->Texture._TexGenEnabled || ctx->VertexProgram._Enabled) diff --git a/src/mesa/tnl/t_vb_texmat.c b/src/mesa/tnl/t_vb_texmat.c index 701f27bd8a5..1feb0b750ef 100644 --- a/src/mesa/tnl/t_vb_texmat.c +++ b/src/mesa/tnl/t_vb_texmat.c @@ -61,7 +61,7 @@ static GLboolean run_texmat_stage( GLcontext *ctx, struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; GLuint i; - if (ctx->ShaderObjects.CurrentProgram != NULL) + if (ctx->ShaderObjects._VertexShaderPresent) return GL_TRUE; if (!ctx->Texture._TexMatEnabled || ctx->VertexProgram._Enabled) diff --git a/src/mesa/tnl/t_vb_vertex.c b/src/mesa/tnl/t_vb_vertex.c index f0694f9a69f..e0a58aaaf3e 100644 --- a/src/mesa/tnl/t_vb_vertex.c +++ b/src/mesa/tnl/t_vb_vertex.c @@ -126,7 +126,7 @@ static GLboolean run_vertex_stage( GLcontext *ctx, TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *VB = &tnl->vb; - if (ctx->ShaderObjects.CurrentProgram != NULL) + if (ctx->ShaderObjects._VertexShaderPresent) return GL_TRUE; if (ctx->VertexProgram._Enabled) |