[Mesa-dev] [PATCH] mesa: add ff fragment shader support for geom and tess shaders
Gustaw Smolarczyk
wielkiegie at gmail.com
Mon Jun 18 07:43:23 UTC 2018
2018-06-18 4:39 GMT+02:00 Timothy Arceri <tarceri at itsqueeze.com>:
> This is required for compatibility profile support.
---
> src/mesa/main/ff_fragment_shader.cpp | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/ff_fragment_shader.cpp
> b/src/mesa/main/ff_fragment_shader.cpp
> index a698931d99e..935a21624af 100644
> --- a/src/mesa/main/ff_fragment_shader.cpp
> +++ b/src/mesa/main/ff_fragment_shader.cpp
> @@ -229,7 +229,11 @@ static GLbitfield filter_fp_input_mask( GLbitfield
> fp_inputs,
> * since vertex shader state validation comes after fragment state
> * validation (see additional comments in state.c).
> */
> - if (vertexShader)
> + if (ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY] != NULL)
> + vprog = ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY];
> + else if (ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_EVAL] != NULL)
> + vprog = ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_EVAL];
> + else if (vertexShader)
>
Shouldn't you also update the if condition on line 178? Otherwise, you
won't reach the if tree you change when the vertex shader is missing
(unless that was intended - I am not really familiar with how fixed
function shaders work alongside new features).
You could also move or update the comment that is just above your change.
Regards,
Gustaw Smolarczyk
> vprog = ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX];
> else
> vprog = ctx->VertexProgram.Current;
> --
> 2.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180618/fba441d1/attachment.html>
More information about the mesa-dev
mailing list