aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_nvfragprog.c
Commit message (Collapse)AuthorAgeFilesLines
* change DEBUG_FRAG conditionsBrian Paul2006-11-011-79/+82
|
* We need to call _mesa_load_state_parameters() whenever a fragment programBrian Paul2006-10-311-5/+0
| | | | | | is enabled and we've changed any GL state that might be referenced by a fragment program (such as state.fog.params). Do this during swrast validation, not in _swrast_exec_fragment_program().
* In TEX instructions, use precomputed lambda only if using fragment.texcoord[k]Brian Paul2006-10-311-34/+33
| | | | | to sample texture[k]. Use zero otherwise. Not foolproof, but a good compromise.
* For TEX instructions use lambda=0. When sampling from texture unit K weBrian Paul2006-10-311-44/+71
| | | | | | | | | | were using the partial derivatives of texcoord[K] but the coordinate used for texture sampling may be something totally different (and texcoord[K] might not be a real texture coord at all). Net result was a bogus LOD is sometimes used, often resulting in using the smallest mipmap level (a constant color). Just use zero for now (undef LAMBDA_ZERO to override). Plus, some additional debug code.
* fix _mesa_problem() textBrian Paul2006-10-301-2/+2
|
* Added PROGRAM_CONSTANT to get_register_pointer().Brian Paul2006-10-281-0/+15
| | | | More DEBUG_FRAG code.
* assorted clean-upsBrian Paul2006-10-221-30/+24
|
* don't save color/z if fragment is killedBrian Paul2006-10-221-18/+20
|
* minor tweaks good for about 12% faster executionBrian Paul2006-10-221-66/+71
|
* Always convert colors to float before running a fragment shader/program.Brian Paul2006-10-171-61/+13
|
* Move struct atifs_machine into s_atifragshader.cBrian Paul2006-10-171-12/+55
| | | | Add support for runtime colorbuffer types.
* Move the fp_machine struct into s_nvfragmprog.c since (except for programBrian Paul2006-10-101-19/+85
| | | | debug) it's only used there.
* New SWspan and SWspanarrays typedefs.Brian Paul2006-10-011-5/+5
|
* clamp result.depth to [0,1] if written toBrian Paul2006-08-251-1/+6
|
* fix fragment.position initialization bugBrian Paul2006-08-241-4/+10
|
* Some structure renaming. Prefix vertex/fragment-related structs withBrian Paul2006-07-201-7/+7
| | | | "gl_" to match other structs.
* Make Saturate a 2-bit field again, renamed to SaturateMode with threeBrian Paul2005-11-201-1/+1
| | | | possible values: SATURATE_OFF, SATURATE_ZERO_ONE and SATURATE_PLUS_MINUS_ONE.
* update an assertionBrian Paul2005-11-121-1/+1
|
* Move stuff common to vertex/fragment_program into the base class, including:Brian Paul2005-11-121-12/+12
| | | | | | Instructions, InputsRead, OutputsWritten, and Parameters. Also, added debug functions: _mesa_print_instruction(), _mesa_print_program_parameters() and revamp _mesa_print_program().
* At keithw's request, remove all traces of the "fragment program to C" andIan Romanick2005-11-081-9/+0
| | | | TCC experiment.
* Unify vertex/fragment program instuctions.Brian Paul2005-11-051-67/+67
| | | | Based on patch by Ian (#4967) but also unify instruction opcodes.
* Rename FRAG_OUTPUT_* tokens to FRAG_RESULT_* to match vertex program conventionBrian Paul2005-11-021-4/+4
|
* need to use absolute value for RSQBrian Paul2005-10-301-1/+2
|
* fix LIT bugBrian Paul2005-10-291-1/+9
|
* fragment program writing to result.depth.z was brokenBrian Paul2005-10-241-2/+13
|
* fix broken SWZ instructionBrian Paul2005-10-211-4/+4
|
* fix broken KILBrian Paul2005-10-211-2/+4
|
* additional wrapper updates, bug 4468Brian Paul2005-09-191-1/+1
|
* use mesa import wrappers, bug 4468Brian Paul2005-09-161-2/+2
|
* Rework the texture filtering functions a bit.Brian Paul2005-09-161-2/+2
| | | | No need to pass the texture unit number as an argument.
* Update includes post-splitting of s_texture.cBrian Paul2005-09-151-2/+0
|
* Remove some debug outputJon Smirl2005-05-201-0/+2
| | | | Add #if DEBUG_FRAG in s_nvfragprog.c
* Previously in TXP and TEX instructions, lambda was passed toKeith Whitwell2005-05-111-3/+24
| | | | | | | | | | | | | | | | | | | | | fetch_texel as zero, but I believe this is incorrect. The spec uses a pseudocode function: vec4 TextureSample(float s, float t, float r, float lodBias, int texImageUnit, enum texTarget); to specify the behaviour of TEX, TXB and TXP instructions. For TEX and TXP, lodBias is passed as zero, TXB is passed with texcoord[4]. In our code we have static void fetch_texel( GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda, GLuint unit, GLfloat color[4] ) and were passing zero and a biased lambda value respectively. The difference is that TextureSample() would add in the lambda term itself, while in our code the caller is expected to do this. Thus in the TEX and TXP cases, it is necessary to pass an unbiased lambda value for things to work out correctly.
* Test for texcoord[3] == zero before dividing. Not so sure about thisKeith Whitwell2005-05-111-4/+15
| | | | | | test - if texcoord[3] is zero, we'd probably be fine except for an ASSERT in IROUND_POS() which gets triggered by the inf values created.
* Major check-in of changes for GL_EXT_framebuffer_object extension.Brian Paul2005-05-041-4/+6
| | | | | | | Main driver impacts: - new code for creating the Mesa GLframebuffer - new span/pixel read/write code Some drivers not yet updated/tested.
* Add a facility to route all rasterization through a fragment programKeith Whitwell2005-05-041-2/+2
| | | | | | | | | | | which is automatically generated to match the current texture environment state. Introduces a new value ctx->FragmentProgram._Active which is true when either _Enabled is true or there is such a fragment program ready to run. To test out on a driver running the software rasterizer, set MESA_TEX_PROG=t in the environment. It goes without saying that performance is lower for the software rasterizer in this mode.
* Reduce the size of mesa's internal fragment and vertex programKeith Whitwell2005-04-211-34/+39
| | | | | representations by switching to packed structures for registers and instructions.
* Added PRINT instruction for GL_NV_fragment_program.Brian Paul2004-12-181-5/+22
|
* tweaks to the LIT instructionsBrian Paul2004-12-151-5/+7
|
* added a few more debug printfs (disabled)Brian Paul2004-08-101-0/+14
|
* store's to RC/HC didn't work (bug 976287)Brian Paul2004-06-201-0/+4
|
* only init temp regs to zero if executing NV fragment programBrian Paul2004-04-211-6/+10
|
* Audit/fixes for NV/ARB TEX, TXP, TXB, TXD instructions.Brian Paul2004-04-181-10/+27
| | | | | | Some texture instructions were using wrong LOD. Fixed interpolate_texcoords() so it doesn't do texcoord projective division when using a fragment program. The TXP instruction does that.
* Use tcc and the emitted C code from s_fragprog_to_c.c to dynamically compileKeith Whitwell2004-04-141-0/+8
| | | | | | | | | and execute fragment programs. Very limited and experimental, but works well enough to run arbfplight.c. http://fabrice.bellard.free.fr/tcc/ Compile with 'make linux-tcc', being sure to make clean first.
* Implement ARB_f_p KIL correctly.Brian Paul2004-04-021-1/+10
|
* fix array indexing for UP4B and UP4UBBrian Paul2004-03-291-6/+6
|
* Accomodate ARB_fp XPD opcode separately from NV_fp's X2D.Keith Whitwell2004-03-291-0/+12
|
* s/_swrast_exec_nv_fragment_program/_swrast_exec_fragment_program/Brian Paul2004-03-031-1/+5
|
* move _mesa_load_state_parameters() to state validation stageBrian Paul2004-02-271-6/+1
|
* fix PK2H, UP2H, PK2US bugsBrian Paul2004-02-271-18/+21
|