Age | Commit message (Collapse) | Author |
|
|
|
GL_TRUE indicates that the driver accepts the program.
GL_FALSE indicates the program can't be compiled/translated by the
driver for some reason (too many resources used, etc).
Propogate this result up to the GL API: set GL_INVALID_OPERATION
error if glProgramString() was called. Set shader program link
status to GL_FALSE if glLinkProgram() was called.
At this point, drivers still don't do any program checking and
always return GL_TRUE.
|
|
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
|
|
Adding constants is used in a number of non-native instruction
rewrites, and it required us to keep copies of modified gl_programs
around. This is a first step towards ending this.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
|
|
De facto, vertex programs were translated immediately in all situations,
so let's just stop pretending that we do lazy translation.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
|
|
The copy is still needed because some program transforms add state variables
or constants.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
|
|
Rewrite vertex and fragment programs so that we don't have to do any hacks on lower level.
|
|
|
|
Keep the original vertex program untouched because it may be needed after some state change for generating new r300 specific vertex program.
|
|
|
|
|
|
|
|
|
|
Use proper fields for marking if fp is translated, and if is translated succesfully.
Now if fp gets translated (even unsuccesfully) fp->translated is true. If the translation failed (i.e. because we exceeded limit of
maximum texture indirections) the fp->error is set. With a little updated fallback function it prevents non native fragment programs
from beeing translated with every frame (the translation would fail anyway so there's no point to try again).
Also implement IsProgramNative function for GL_FRAGMENT_PROGRAM_ARB (it should give some performance boost in apps that checks if
program is native and falls back to simpler shader to meet hw limits if necessary) and cleanup indentation (remove whitespaces on empty
lines).
|
|
Refactor so that r300_pfs_compile_state "owns"/holds a pointer to
r300_fragment_program instead of the other way round. This is more natural from
an object orientation point of view.
Move the compiled hardware state into r300_fragment_program_code, in
anticipation of on-the-fly program recompilation based on external OpenGL
state.
|
|
|
|
eg: #include "shader/program.h" and remove -I$(TOP)/src/mesa/program
|
|
|
|
|
|
|
|
Note there might be some calls to the old function names in conditionally
disabled code, but I think I've got them all.
|
|
|
|
|
|
|
|
Makes the vertex program output from the fragment input.
It makes the driver capable of catching output-input mismatches safely. Primarily
based on some of Aapo Tahkola's code.
|
|
"gl_" to match other structs.
|
|
|
|
|
|
|
|
|
|
|
|
program->Id and program->RefCount fields were used and ATI fragment shaders
didn't have too much in common with ARB/NV vertex/fragment programs anyway.
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
current Mesa.
|
|
|