summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary
AgeCommit message (Collapse)Author
2009-08-19tgsi: add missing functionality to support instructions with labelsKeith Whitwell
Could previously emit opcodes with label arguments, but was no way to patch them with the actual destinations of those labels. Adds two functions: ureg_get_instruction_number - to get the id of the next instruction to be emitted ureg_fixup_label - to patch an emitted label to point to a given instruction number. Need some more complex examples than u_simple_shader, so far this has only been compile-tested.
2009-08-18Merge branch 'mesa_7_5_branch'Brian Paul
2009-08-18tgsi/ppc: we don't implement saturation modes yetBrian Paul
2009-08-18tgsi/sse: we don't implement saturation modes yetBrian Paul
Fixes piglit fp-generic tests/shaders/generic/lrp_sat.fp, bug 23316.
2009-08-17gallium: memset() tgsi_exec_machine to all zeros in tgsi_exec_machine_create()Brian Paul
This fixes invalid values for CondStackTop, LoopStackTop, etc.
2009-08-13tgsi: add simple facility for releasing and reusing temporariesKeith Whitwell
2009-08-13tgsi: rename ureg src/dest convertersKeith Whitwell
Also fix a typo in ureg_src().
2009-08-13draw: Remove unused variable.José Fonseca
2009-08-13Merge branch 'mesa_7_5_branch'Keith Whitwell
2009-08-13draw: cope with more primitives in draw_pipeline_runKeith Whitwell
This previously was used only for decomposed (POINT/LINE/TRI) primitives, but for some time a full range of primitives could end up in here. Fixes trivial/lineloop-clip on softpipe, among others. (cherry picked from commit 87cd8a3b8a2407b30916be418ff2f95dfea5d2ad)
2009-08-13tgsi: turn off debuggingKeith Whitwell
2009-08-13tgsi: use REALLOC for growing token poolKeith Whitwell
2009-08-13util: silence warnings for third REALLOC argumentKeith Whitwell
Our fallback realloc path requires an old_size argument, but the posix varient doesn't need this. Add some code to avoid gcc unused variable warnings for this extra argument.
2009-08-13util: remove unneeded includesKeith Whitwell
2009-08-13util: convert u_simple_shaders to use tgsi_uregKeith Whitwell
Much nicer now.
2009-08-13tgsi: add tgsi_ureg, a simplified tgsi shader builderKeith Whitwell
This is modelled on the nice & easy-to-use facilities we had for building shaders in mesa, eg. in texenvprogram.c and friends. Key points include pass-by-value register structs that can be manipulated in a functional style, eg: negate(swizzle(reg, X,X,X,X)) and per-opcode instruction functions, eg: emit_MOV( p, writemask(dst, 0x1), negate(src)); and similar. Additionally, the interface allows mixed emit of instructions and decls, which are sorted out internally to obey TGSI ordering. Immediates may be emitted at any time and are scanned against existing immediates to try and reduce redundancy. Not all TGSI functionality is accessible through this interface, but most or all of what mesa uses should be.
2009-08-12Merge branch 'new-frag-attribs'Brian Paul
This branch introduces new FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC fragment program inputs for GLSL gl_FrontFacing and gl_PointCoord. Before, these attributes were packed with the FOG attribute. That made things complicated elsewhere.
2009-08-11gallium: Add texture usage information to surface_buffer_createJakob Bornecrantz
We need aditional meta data about the usage of the surface in softpipe because we need to be able tell the diffrence between PRIMARY and DISPLAY_TARGET surfaces.
2009-08-11gallium: fix debug_printf() format stringBrian Paul
2009-08-07gallium: Move minify() to u_math.Corbin Simpson
minify() is usually used in mipmap size calculation. Strangely enough, we all defined it as MAX2(1, d >> 1); imagine that. :3
2009-08-07util: fix incorrect assertionBrian Paul
Check that the dest surface/format is renderable.
2009-08-07util: include u_surface.h, added commentBrian Paul
2009-08-07util: use util_same_surface() to compare surface pointersBrian Paul
2009-08-07util: added util_same_surface() helper functionBrian Paul
2009-08-06util: fix incorrect assertionBrian Paul
Check that the dest surface/format is renderable.
2009-08-06util: include u_surface.h, added commentBrian Paul
2009-08-06util: use util_same_surface() to compare surface pointersBrian Paul
2009-08-06util: added util_same_surface() helper functionBrian Paul
2009-08-05Merge branch 'mesa_7_5_branch'Brian Paul
Conflicts: src/mesa/main/state.c
2009-08-05util: added comment/question about blit clippingBrian Paul
2009-08-05util: added util_blit_pixels() overlap testBrian Paul
A comment alluded to this. Now it's checked.
2009-08-05util: fix util_blit_pixels() test for surface_copy() pathBrian Paul
For the surface_copy() path require same format, no flipping and no stretching. Fixes progs/tests/copypixrate -blit
2009-08-05util: reformatting and commentsBrian Paul
2009-08-03tgsi: report opcode name in addition to the number when translation failsBrian Paul
2009-08-03tgsi: added tgsi_get_opcode_name()Brian Paul
2009-08-03gallium: comments, reformattingBrian Paul
2009-08-01mesa st: Move logbase2 function to util/u_math.hPatrice Mandin
2009-07-31draw: fix-ups for point coord attributeBrian Paul
progs/glsl/pointcoord.c works again
2009-07-31Rename TGSI LOOP instruction to better match theri usage.Michal Krol
The LOOP/ENDLOOP pair is renamed to BGNFOR/ENDFOR as its behaviour is similar to a C language for-loop. The BGNLOOP2/ENDLOOP2 pair is renamed to BGNLOOP/ENDLOOP as now there is no name collision.
2009-07-30Merge branch 'mesa_7_5_branch'Brian Paul
2009-07-30tgsi: Add proper constraints to sanity.Michal Krol
2009-07-30tgsi: Declare a LOOP register.Michal Krol
The only valid usage for LOOP/ENDLOOP instructions is LOOP[0] as a destination register. The only valid usage for the remaining instructions is LOOP[0].x as an indirect register.
2009-07-30tgsi: Fix number operands for LOOP/ENDLOOP.Michal Krol
2009-07-30tgsi: Document LOOP/ENDLOOP instruction operation.Michal Krol
2009-07-29gallium: fix SSE shadow texture instructionsBrian Paul
When sampling a 2D shadow map we need 3 texcoord components, not 2. The third component (distance from light source) is compared against the texture sample to return the result (visible vs. occluded). Also, enable proper handling of TGSI_TEXTURE_SHADOW targets in Mesa->TGSI translation. There's a possibility for breakage in gallium drivers if they fail to handle the TGSI_TEXTURE_SHADOW1D / TGSI_TEXTURE_SHADOW2D / TGSI_TEXTURE_SHADOWRECT texture targets for TGSI_OPCODE_TEX/TXP instructions, but that should be easy to fix. With these changes, progs/demos/shadowtex.c renders properly again with softpipe.
2009-07-29util: _debug_printf should print even when DEBUG is not definedKeith Whitwell
The leading underscore is meaningful... This function is used by _warning and _error functions as well as the more common debug_printf(). debug_printf (without underscore) gets turned off when DEBUG is disabled, but warning/error messages still use this function to get their message out. (cherry picked from commit 0ac879dca797360570543d5bd0fd64f8fb8e566e)
2009-07-28Merge branch 'mesa_7_5_branch'Brian Paul
Conflicts: Makefile configs/default docs/relnotes.html src/mesa/main/version.h
2009-07-28gallium: minor code/comments clean-upBrian Paul
2009-07-26util: fix typo.José Fonseca
2009-07-23draw: correct address for machine struct in llvm pathKeith Whitwell
This changed after a recent commit.