diff options
author | Marek Olšák <[email protected]> | 2015-10-17 22:50:11 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-10-20 12:58:25 +0200 |
commit | 67f489ded3a4c575e203dc82368ebe645e72079a (patch) | |
tree | 579f430c3b2a5ad57a3fe3d73380b251a25a213f /src/mesa | |
parent | 8339585b1206232c1df165108ef6adadb0829ab0 (diff) |
mesa: replace UsesClipDistance with ClipDistanceArraySize
This is more practical and needed by gallium.
Reviewed-by: Ilia Mirkin <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs.c | 2 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 5 | ||||
-rw-r--r-- | src/mesa/main/shaderapi.c | 6 |
3 files changed, 5 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index ba680a98f7e..5db4b3a86af 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -312,7 +312,7 @@ brw_vs_populate_key(struct brw_context *brw, if (ctx->Transform.ClipPlanesEnabled != 0 && ctx->API == API_OPENGL_COMPAT && - !vp->program.Base.UsesClipDistanceOut) { + vp->program.Base.ClipDistanceArraySize == 0) { key->nr_userclip_plane_consts = _mesa_logbase2(ctx->Transform.ClipPlanesEnabled) + 1; } diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 9ca6deaabb6..20dd70ef734 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1891,7 +1891,7 @@ struct gl_program * For vertex and geometry shaders, true if the program uses the * gl_ClipDistance output. Ignored for fragment shaders. */ - GLboolean UsesClipDistanceOut; + unsigned ClipDistanceArraySize; /** Named parameters, constants, etc. from program text */ @@ -2614,7 +2614,6 @@ struct gl_shader_program * True if gl_ClipDistance is written to. Copied into * gl_tess_eval_program by _mesa_copy_linked_program_data(). */ - GLboolean UsesClipDistance; GLuint ClipDistanceArraySize; /**< Size of the gl_ClipDistance array, or 0 if not present. */ } TessEval; @@ -2637,7 +2636,6 @@ struct gl_shader_program * True if gl_ClipDistance is written to. Copied into * gl_geometry_program by _mesa_copy_linked_program_data(). */ - GLboolean UsesClipDistance; GLuint ClipDistanceArraySize; /**< Size of the gl_ClipDistance array, or 0 if not present. */ bool UsesEndPrimitive; @@ -2650,7 +2648,6 @@ struct gl_shader_program * True if gl_ClipDistance is written to. Copied into gl_vertex_program * by _mesa_copy_linked_program_data(). */ - GLboolean UsesClipDistance; GLuint ClipDistanceArraySize; /**< Size of the gl_ClipDistance array, or 0 if not present. */ } Vert; diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 18e463d4ccc..765602e50db 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -2068,7 +2068,7 @@ _mesa_copy_linked_program_data(gl_shader_stage type, { switch (type) { case MESA_SHADER_VERTEX: - dst->UsesClipDistanceOut = src->Vert.UsesClipDistance; + dst->ClipDistanceArraySize = src->Vert.ClipDistanceArraySize; break; case MESA_SHADER_TESS_CTRL: { struct gl_tess_ctrl_program *dst_tcp = @@ -2083,7 +2083,7 @@ _mesa_copy_linked_program_data(gl_shader_stage type, dst_tep->Spacing = src->TessEval.Spacing; dst_tep->VertexOrder = src->TessEval.VertexOrder; dst_tep->PointMode = src->TessEval.PointMode; - dst->UsesClipDistanceOut = src->TessEval.UsesClipDistance; + dst->ClipDistanceArraySize = src->TessEval.ClipDistanceArraySize; break; } case MESA_SHADER_GEOMETRY: { @@ -2093,7 +2093,7 @@ _mesa_copy_linked_program_data(gl_shader_stage type, dst_gp->Invocations = src->Geom.Invocations; dst_gp->InputType = src->Geom.InputType; dst_gp->OutputType = src->Geom.OutputType; - dst->UsesClipDistanceOut = src->Geom.UsesClipDistance; + dst->ClipDistanceArraySize = src->Geom.ClipDistanceArraySize; dst_gp->UsesEndPrimitive = src->Geom.UsesEndPrimitive; dst_gp->UsesStreams = src->Geom.UsesStreams; break; |