Age | Commit message (Collapse) | Author |
|
Fixes loop-01.vert, loop-02.vert.
|
|
Constant-index dereferences of arrays should work now. One test is
regressed, but it should have been failing before this commit, too.
|
|
Fixes CorrectParse1 and the glsl2 loop tests that don't use arrays.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Looking at a vec2 / float codegen, the writemasks on the RCPs were wrong and
the swizzle on the multiply by the RCP results was wrong.
|
|
Multiply left by 1/right, please.
|
|
This should help prevent Mesa from having to be smart to give
channel-wise drivers better information.
|
|
|
|
Fixes the code emitted in a test shader for vec2 texcoord / vec2 tex_size.
|
|
The alloced_vec4/vec4 distinction was an experiment to expose the cost
of temps to the codegen. But the problem is that the temporary
production rule gets called after the emit rule that was using the
temp. We could have the args to emit_op be pointers to where the temp
would get allocated later, but that seems overly hard while just
trying to bring this thing up. Besides, the temps used in expressions
bear only the vaguest relation to how many temps will be used after
register allocation.
|
|
Regs aren't allocated at the right times yet, so we see TEMP[0] a lot.
|
|
The destination of assign is in left, not in the node itself.
|
|
|
|
Ideally this would be hooked up by ir_print_visitor dumping into a
string that we could include as prog_instruction->Comment when in
debug mode, and not try keeping ir_instruction trees around after
conversion to Mesa. The ir_print_visitor isn't set up to do that for
us today.
|
|
|
|
|
|
|
|
|
|
|
|
Later we'll throw them in revision control.
|
|
There are major missing pieces here. Most operations aren't
supported. Matrices need to be broken down to vector ops before we
get here. Scalar operations (RSQ, RCP) are handled incorrectly.
Arrays and structures are not even considered.
|
|
|
|
The assembly parser is already checking this, but we're relying on the
symbol table handling it in glsl2.
|
|
Since variable names are not unique, and we like to make lots of
__retvals and assignment_tmps and a,b,c,d this helps in debugging.
|
|
|
|
|
|
Otherwise, dead code elimination gets confused since it relies on
seeing decls.
|
|
I ripped it out with the cloning changes yesterday, and should have
tested and noticed that there were now returns all over.
|
|
It's (ht, data, key) not (ht, key, data).
|
|
This closes 1 leak in the glsl-orangebook-ch06-bump.frag test leaving
4 to go, (all of which are inside hash_table.c).
|
|
And hook it up at the two sites it's called.
Note that with this change we still don't use glsl_type* objects as
talloc contexts, (see things like get_array_instance that accept both
a talloc 'ctx' as well as a glsl_type*). The reason for this is that
the code is still using many instance of glsl_type objects not created
with new.
This closes 3 leaks in the glsl-orangebook-ch06-bump.frag test:
total heap usage: 55,623 allocs, 55,618
Leaving only 5 leaks to go.
|
|
Add a talloc ctx to both get_array_instance and the glsl_type
constructor in order to be able to call talloc_size instead of
malloc.
This fix now makes glsl-orangebook-ch06-bump.frag 99.99% leak free:
total heap usage: 55,623 allocs, 55,615
Only 8 missing frees now.
|
|
Simply call talloc_strdup rather than strdup, (using the talloc_parent
of our 'state' object, (known here as yyextra).
This fix now makes glsl-orangebook-ch06-bump.frag 99.97% leak free:
total heap usage: 55,623 allocs, 55,609 frees
Only 14 missing frees now.
|
|
Could have just added a call to free() to main, but since we're using
talloc everywhere else, we might as well just use it here too. So pass
a new 'ctx' argument to load_text_file.
This removes a single memory leak from all invocations of the
standalone glsl compiler.
|
|
Easily done now that s_expression is allocated with talloc. Simply
switch from new to talloc_strdup and the job is done.
This closes the great majority (11263) of the remaining leaks in the
glsl-orangebook-ch06-bump.frag test:
total heap usage: 55,623 allocs, 55,546 frees
(was 44,283 frees)
This test is now 99.86% leak-free.
|
|
By propagating a 'ctx' parameter through these calls.
This fix happens to have no impact on glsl-orangebook-ch06-bump.frag,
(since it doesn't trigger any errors).
|