Age | Commit message (Collapse) | Author |
|
So this do :
- Fixes COS.
- Does range reductions for SIN & COS.
- Adds SCS.
- removes the optimized version of SIN & COS.
- tweaked weight (should help on precision).
- fixed a copy paste typo in emit_arith().
|
|
Getting proper SIN and COS wasn't as easy as it appeared.
I had to make make some changes to the fragment program code.
general FP changes:
- support HHH swizzle for vector instructions.
- don't copy a source to a temp when it is not XYZW swizzled, but
combine the two and have the swizzle resolve any issues.
(saves temps/instructions with more elaborate shader code)
- fix overflow in cnstv[].
|
|
|
|
Thx for Tilman who spoted the bugs.
|
|
It seems that bitfield structure lead to some strange
problem on 64bits arch, don't want to waste time debugging
strange things like that so converted pfs_reg_t structure
to a GLuint and use good old masking and shifting spell.
(cherry picked from 2a7de9d095d8e60da12b11aaa1efe664b87b11d3 commit)
|
|
|
|
World position is calculated in the vertex shader and passed to the
fragment shader via an unused texcoord.
|
|
There is a bug somewhere in fragment program.
tri-cos and tri-sin show the bug. Also we
should not emit multiple time the same constant.
for sin,cos,lit have to fix that.
|
|
|
|
|
|
appears to have been reverted by mistake.
|
|
"gl_" to match other structs.
|
|
We need to call do_swizzle() when the scaler _or_ vector unit have a
swizzle other 000/ZERO/111/ONE.
This ensures that the gloss on banners in ut2004 is not angel-dependent
(since when was banners glossy?).
|
|
|
|
|
|
|
|
|
|
save one instruction in some case.
|
|
|
|
|
|
|
|
Lots of changes, and fixes for some badness on my behalf.
1. Disposable data used during fp compile is now per-context,
rather than per-program to save memory.
2. Track usage of INPUT/TEMP registers from Mesa program, free
them when no longer required so the hw temps can be re-used.
3. Changed LAST_NODE to OUTPUT_COLOR (see r300_reg.h)
4. Implemented remaining ARB_f_p instructions, with the exception
of the trig/LIT opcodes.
5. Treat ZERO/ONE swizzles the same way as other native swizzles.
6. emit_arith changes, basically a complete re-write. Should
produce cleaner instructions, but no real functional changes.
internal reg -> hw reg routines shared with emit_tex. A bit
messy still.
|
|
|
|
possible values: SATURATE_OFF, SATURATE_ZERO_ONE and SATURATE_PLUS_MINUS_ONE.
|
|
|
|
Instructions, InputsRead, OutputsWritten, and Parameters.
Also, added debug functions: _mesa_print_instruction(),
_mesa_print_program_parameters() and revamp _mesa_print_program().
|
|
|
|
Based on patch by Ian (#4967) but also unify instruction opcodes.
|
|
|
|
|
|
for others, and being cleaner with types in fragment/vertex program structures.
One warning in r300_shader.c is still concerning.
|
|
- Calculate tc_count in EmitArrays (enabled units != nr texcoords).
|
|
|
|
Use SRC0A instead of WZY/XXX combination for W in XYZ positions.
Remove dodgy hack from POW opcode, now works correctly without it
|
|
|
|
|
|
- Handle REPL_ALPHA in emit_arith (possibly incorrect for some things)
- Start on getting demos/arbfplight.c to look right. Won't be animated yet,
need to re-work const emit so we can update consts without re-translating
the entire program.
Assertion in r300_state.c::setup_rs_unit needs to be disabled for it to
work.
|
|
generation in Mesa. Requires most recent Mesa cvs to work correctly.
Swizzle code is possibly slow/buggy and will probably be replaced.
Old behaviour can be controlled by a #define in r300_context.h, if
no-one minds I'll remove the old code later on.
Also, disabled cube map extension. AFAIK We don't support it yet,
and it causes issues with UT2004.
|