On 6 October 2015 at 11:26, Marek Olšák <mar...@gmail.com> wrote:
> Hi,
>
> This is a start of reworking how st/mesa translates and creates shaders. The 
> result of this patch series is this:
>
> In LinkShader or ProgramStringNotify, the shader is translated to TGSI as-is. 
> There are no shader code modifications for shader variants. The glsl-to-tgsi 
> visitor is released.
>
> We can't release the GLSL IR at this point yet, because core Mesa needs it 
> for program resource queries at least.
>
> That's the only place st/mesa interacts with Mesa IR and GLSL IR. After that, 
> it only works with the TGSI representation.
>
> When we get to a draw call, tgsi_transform_shader is used to modify shaders 
> to produce shader variants. It does:
> - feature emulation (color clamping, per-sample shading, edgeflags)
> - adding glDrawPixels shader code
> - adding glBitmap shader code
>
> All the shader transformations are rewritten completely. There is no patching 
> with Mesa IR or glsl-to-tgsi anymore.
>
> It shouldn't be so difficult to add support for some new IR or phase out Mesa 
> IR and GLSL IR support at some point.
>
> The main motivations for this series are:
> - translate to TGSI as soon as possible
> - possibility to create gallium shaders after that if drivers don't need many 
> variants
> - if variants are needed, the path to get them is much simpler
>

I'm happy where this stuff is going, I've looked over it for anything
really obviously wrong, but it seems sane enough for me
to at least be willing to debug in the future :-)

Reviewed-by: Dave Airlie <airl...@redhat.com>
for the series.

Dave.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to