summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_fragprog.c
AgeCommit message (Collapse)Author
2009-06-11r300: hw doesn't support saturation for tex instructionsMaciej Cencora
2009-04-22Merge remote branch 'origin/master' into radeon-rewriteDave Airlie
2009-04-19r300: cleanup includesMaciej Cencora
2009-04-19r300: move common fp functions to seperate fileMaciej Cencora
2009-04-19r300: more r300/r500 unificationMaciej Cencora
reuse insert_WPOS_trailer function
2009-04-19r300: more prepare for mergeMaciej Cencora
2009-04-19r300: further r300/r500 merge preparationMaciej Cencora
2009-04-19r300: merge r300/r500 fragment program compiler structureMaciej Cencora
2009-04-19r300: merge r300/r500 fragment program structuresMaciej Cencora
2009-04-19r300: r300/r500 fp shader merge WIPMaciej Cencora
2009-04-17r300: cleanup frag prog setup a littleMaciej Cencora
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).
2009-04-14mesa: merge the prog_src_register::NegateBase and NegateAbs fieldsBrian Paul
There's really no need for two negation fields. This came from the GL_NV_fragment_program extension. The new, unified Negate bitfield applies after the absolute value step.
2009-02-28mesa: rename, reorder FRAG_RESULT_x tokensBrian Paul
s/FRAG_RESULT_DEPR/FRAG_RESULT_DEPTH/ s/FRAG_RESULT_COLR/FRAG_RESULT/COLOR/ Remove FRAG_RESULT_COLH (NV half-precision) output since we never used it. Next, we might merge the COLOR and DATA outputs (COLOR0, COLOR1, etc).
2009-02-14r300: Redirect constant TEX coordinatesNicolai Haehnle
R3xx/R5xx fragment program texture constants must come from a hardware register instead of the constant file, so we redirect if necessary during the native rewrite phase. The symptoms of this bug started appearing when the Mesa fixed function texenvprogram code started using STATE_CURRENT_ATTRIB constants for texture coordinates when the corresponding attributes were constant across all vertices. Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com>
2008-09-18mesa: added "main/" prefix to includes, remove some -I paths from ↵Brian Paul
Makefile.template
2008-07-27r300: Implement ARB_shadow_ambient; add STATE_SHADOW_AMBIENTNicolai Haehnle
2008-07-12r300_fragprog: Use nqssa+dce and program_pair for emitNicolai Haehnle
Share almost all code with r500_fragprog now. This also fixes Piglit's texrect-many test, which means that the compiz bicubic plugin should work with hardware acceleration now.
2008-07-06r300_fragprog: Emulate trigonometric functions in radeon_program_aluNicolai Haehnle
2008-07-06r300: Allow adding parameters during fragprog transform, share LIT codeNicolai Haehnle
2008-07-05r300: Correctly scan for used temporary registersNicolai Haehnle
This fixes a regression introduced by dea8719f0...
2008-07-05r300: Remove clause stuff for now in favour of a cloned generic gl_programNicolai Haehnle
2008-07-04r300: Fix depth texture in compare modeNicolai Haehnle
Missed the homogenous divide of R by Q before...
2008-06-14r300: Add radeonTransformALU and fix a bug in r300_fragprog DPHNicolai Haehnle
This new generic transform replaces "special" instructions by more generic variants. Hopefully, we will be able to share this code between r300 and r500.
2008-06-14r300_fragprog: Use less complex instructionsNicolai Haehnle
MOV, ADD and MUL do not fit the hardware as well as MAD, but they are less complex and thus leave more room for future optimizations.
2008-06-14r300: Implement GL_ARB_shadow and GL_EXT_shadow_funcsNicolai Haehnle
2008-06-14r300: Add radeonCompilerDump for debuggingNicolai Haehnle
2008-06-14r300_fragprog: Refactor TEX transformationNicolai Haehnle
Streamlining source and destination registers, as well as texcoord scaling for RECT textures is now done in a radeon_program based transformation. The idea is that this will allow us to optimize away unnecessary indirections more easily.
2008-06-14r300: Add radeon_program and trivial refactoring of r300_fragprog to use itNicolai Haehnle
The idea/hope is that radeon_program will serve as an intermediate representation for r3xx up to r6xx fragment and vertex programs. Right now, it is nothing more than a simplistic wrapper around Mesa's prog_instruction, together with the notion of clauses, taken from r6xx docs. The clauses will eventually be used to represent the nodes that are used in r300 family fragment programs.
2008-06-14r300: Do not include r300_fragprog.h from r300_context.h and other cleanupsNicolai Haehnle
2008-06-14r300_fragprog: Remove dead declarations, move NOP declarations into sourceNicolai Haehnle
2008-06-14r300_fragprog: Refactoring and cleanupNicolai Haehnle
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.
2008-06-14r300_fragprog: Remove dead codeNicolai Haehnle
2008-06-13r300/r500: Separate fragprog compiler structuresNicolai Haehnle
r500 code still used r300_pfs_compile_state, which contains some fields that really only make sense on r3xx type hardware. In order to allow both fragprog implementations to go forward without disturbing each other, I've pushed this structure down into the respective r[3|5]00_fragprog.c
2008-06-01r300: Writing to result.depth in fragment programs (R3xx; only stub for R5xx)Nicolai Haehnle
Setup fg_depth_src for depth writing programs and change early Z (ztop) semantics. Piglit's version of glean/fragprog test passes now (unlike Glean, its dependency on EXT_fog_coord, which we don't support, is optional). R3xx only at the moment, but should be straightforward to adapt to R5xx (I don't own an R5xx, and I don't want to break anything.)
2008-06-01[r300] Fix KIL instruction and swizzling of texture coordinatesNicolai Haehnle
The KIL instruction only works if at least one texture unit is enabled in hardware. Texture instructions do not support swizzles, negations etc. natively, so we now emit an explicit swizzling etc. operation when the texture coordinate requires it. This fixes the Piglit fp-kil test.
2008-05-13R300: cleanup FS code and fill in missing detailsAlex Deucher
2008-05-02Initial r5xx fragment program compiler support.Corbin Simpson
Includes fallback shader and a handful of working opcodes.
2008-03-30r300: Take PROGRAM_CONSTANT into account.Markus Amsler
This bug was introduced by commit 978145a075255ae153ee05c2a037400e61558079.
2007-10-07r300: fragprog tex instruction now take writemask into acount.Jerome Glisse
2007-05-11r300: Use __FUNCTION__ not __func__.Oliver McFadden
Just for consistency; most of the code already uses __FUNCTION__.
2007-05-09r300: Added some more Doxygen documentation and made some functions static.Oliver McFadden
2007-05-09r300: Added a few more Doxygen comments.Christoph Bill
2007-05-09r300: Converted "rp" variables (r300_fragment_program) to "fp".Oliver McFadden
2007-05-09r300: Fixed indenting from previous commitOliver McFadden
d28f6d91760374e2eb71b541b0f259f81dd73c69.
2007-05-09r300: Fixed some more function names.Oliver McFadden
Note there might be some calls to the old function names in conditionally disabled code, but I think I've got them all.
2007-05-09r300: Last of the indent changes. :)Oliver McFadden
2007-05-09r300: Indented r300_fragprog.[ch].Oliver McFadden
2007-03-26r300: Fix warnings that were introduced by the glsl mergeNicolai Haehnle
2007-03-26merge of glsl-compiler-1 branchBrian
2007-03-25r300: Fix regression: unnecessary node indirectionNicolai Haehnle
The texture_rectangle fix introduced a bug where every texture instruction caused a new indirection.