Age | Commit message (Collapse) | Author |
|
|
|
This is used by the Mesa IR backend to implement mod, fixing glsl-fs-mod.
|
|
|
|
Most backends will prefer seeing this to seeing (a - floor(a)), so
represent it explicitly.
|
|
|
|
Uses code and ideas from Brian Paul.
|
|
Allow for example to convert from 4 x float32 to 4 x unorm8 and vice versa.
Uses code and ideas from Brian Paul.
|
|
And rename to lp_build_swizzle_aos().
|
|
Modules are still free to setup their own optimization passes, but for the
normal case it should not be necessary.
|
|
Unnecessary special case.
|
|
Fixes glsl-fs-discard-01.
|
|
|
|
Fixes glsl-fs-sign, glsl-vs-sign.
|
|
The old compiler didn't use SSG, and instead emitted SGT/SGT/SUB. We
can do a little better for SSG than we do for the SGT series.
|
|
Fixes glsl-fs-step.
|
|
It's 0.0 if x < edge, not 1.0. Partial fix for glsl-fs-step.
|
|
|
|
There's no need to split each vector component out, just do vector ops.
|
|
|
|
Fixes glsl-fs-neg.
|
|
Fixes depth-tex-modes-glsl.
|
|
|
|
|
|
Fixes glsl-bug-22603.
|
|
I can't find any text justifying this check, and it caused a
reasonable-looking shader in glsl-bug-22603 (which writes only
gl_FragDepth) to fail.
|
|
glsl-derivs would add 40.0, 0.0, and 1.0 in order. When we went
looking for 0.0, we'd find it in the second slot of the param, and use
it, but param->Size would still be 1. When we went to add 1.0 and
didn't find it, we'd put allocate it to that second slot and the 0.0
would actualy end up being 1.0.
Fixes glsl-derivs, glsl-deriv-varyings.
|
|
This fixes GetAttribLocation returning VERT_ATTRIB_GENERIC1 instead of 1,
caught by glsl-dlist-getattriblocation.
|
|
decl->identifier is part of the AST, so it doesn't live very long.
Instead, add var->name which is owned by var.
|
|
|
|
|
|
_mesa_glsl_parse_state should be the parent for all temporary allocation
done while compiling a shader. glsl_shader should only be used as the
parent for the shader's final IR---the _result_ of compilation.
Since many IR instructions may be added or discarded during optimization
passes, IR should not ever be allocated to glsl_shader directly.
Done via sed -i s/talloc_parent(state)/state/g and s/talloc_parent(st)/st/g.
This also removes a ton of talloc_parent calls, which may help performance.
|
|
|
|
|
|
|
|
The can be at most one shader per stage. There are currently only two
stages. There is zero reason to dynamically size this array.
|
|
|
|
|
|
This avoids more allocation and shuffling of data around.
|
|
This avoids losing their memory when the parser state is freed.
|
|
This saves recompiling at link time. gl_shader->ir is made a pointer
so that we don't have to bring exec_list into mtypes.h.
|
|
Functions for using dummy tiles when we detect OOM conditions.
|
|
|
|
When compiled with the more aggressive compiler warnings such as
-Wshadow and -Wempty-body the libtess code gives a lot more
warnings. This fixes the following issues:
* The 'Swap' macro tries to combine multiple statements into one and
then consume the trailing semicolon by using if(1){/*...*/}else.
This gives warnings because the else part ends up with an empty
statement. It also seems a bit dangerous because if the semicolon
were missed then it would still be valid syntax but it would just
ignore the following statement. This patch replaces it with the more
common idiom do { /*...*/ } while(0).
* 'free' was being used as a local variable name but this shadows the
global function. This has been renamed to 'free_handle'
* TRUE and FALSE were being unconditionally defined. Although this
isn't currently a problem it seems better to guard them with #ifndef
because it's quite common for them to be defined in other headers.
https://bugs.freedesktop.org/show_bug.cgi?id=28845
Signed-off-by: Brian Paul <brianp@vmware.com>
|
|
|
|
Windows unloads DLLs before atexit. Make _eglUnloadDrivers no-op on
Windows for now.
|
|
The configs should be FREE()ed, not free()ed. We cannot rely on
_eglCleanupDisplay here.
|
|
|
|
|
|
Dynamic arrays will be used to store configs and screens of a display.
|
|
A vg_shader is destroyed with FREE.
|