Commit Graph

24976 Commits

Author SHA1 Message Date
José Fonseca 7b39194e2d scons: Handle Circular dependencies in the libraries. 2009-08-13 16:32:51 +01:00
Keith Whitwell bf57eda0ec Merge branch 'mesa_7_5_branch' 2009-08-13 15:57:23 +01:00
Keith Whitwell 1ce3f5a806 draw: cope with more primitives in draw_pipeline_run
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-13 15:56:17 +01:00
Keith Whitwell 78918c8760 tgsi: turn off debugging 2009-08-13 14:28:01 +01:00
Keith Whitwell 749e52049d tgsi: use REALLOC for growing token pool 2009-08-13 14:27:42 +01:00
Keith Whitwell 120e76866b util: silence warnings for third REALLOC argument
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-13 14:26:50 +01:00
Keith Whitwell b1d82f1f19 util: remove unneeded includes 2009-08-13 13:43:25 +01:00
Keith Whitwell 002c76cfef util: convert u_simple_shaders to use tgsi_ureg
Much nicer now.
2009-08-13 13:02:59 +01:00
Keith Whitwell 8a7d1e7b76 tgsi: add tgsi_ureg, a simplified tgsi shader builder
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-13 13:02:47 +01:00
Xiang, Haihao 1f40ffca63 i965: fix cube map on IGDNG 2009-08-13 18:42:52 +08:00
Brian Paul 4ce73ad92c glsl: remove duplicate frag input entry 2009-08-12 20:37:34 -06:00
Brian Paul f3b215cba2 Merge branch 'new-frag-attribs'
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-12 20:32:41 -06:00
Brian Paul fdfb0d4b0e progs/glsl: change uniform_info::type field to use GLSL vector types 2009-08-12 17:28:45 -06:00
Brian Paul af3d7f6889 demos: call SetUniformValues() 2009-08-12 17:28:45 -06:00
Brian Paul f95b82b486 mesa: const qualifiers 2009-08-12 17:28:45 -06:00
Brian Paul bd4c6a2e50 vbo: use _mesa_is_bufferobj() 2009-08-12 17:28:45 -06:00
Brian Paul 684049d97d demos: rename InitUniforms() to SetUniformValues()
And call new PrintUniforms() in demos.
2009-08-12 17:28:45 -06:00
Brian Paul 378bff0edd progs/util: added more shader utility functions 2009-08-12 17:28:45 -06:00
Brian Paul 434ec3ada8 mesa: use _mesa_is_bufferobj() 2009-08-12 17:28:45 -06:00
Brian Paul 604031563c mesa: use _mesa_is_bufferobj() 2009-08-12 17:28:45 -06:00
Brian Paul abbf83551f mesa: new _mesa_is_bufferobj() function
Tests if the given buffer object is a user-created, non-default buffer object.
Use this instead of testing bufferobj->Name != 0.
2009-08-12 17:28:45 -06:00
Eric Anholt d64649a316 i965: Make the cube mapping RCP use a writemask.
Fixes cube mapping since the scalar changes.
2009-08-12 13:50:09 -07:00
Eric Anholt 5faa0dc591 i965: Allocate destination registers for GLSL TEX instructions contiguously.
This matches brw_wm_pass*.c behavior, and fixes the norsetto shadow demo.

Bug #19489
2009-08-12 13:18:47 -07:00
Eric Anholt 63fa5fd319 i965: drop dead scalar handling in GLSL. 2009-08-12 13:05:59 -07:00
Eric Anholt 08687c8b40 i965: Correct brw_wm_nr_args for WM_DELTAXY and WM_PIXELXY. 2009-08-12 12:54:43 -07:00
Eric Anholt 863ae3a527 i965: Drop GLSL ABS code, which is translated away in brw_wm_fp. 2009-08-12 12:43:43 -07:00
Eric Anholt 4de8b8902f i965: Drop code for emitting OPCODE_SUB, since brw_wm_fp.c makes it an ADD. 2009-08-12 12:43:43 -07:00
Eric Anholt 0eb819a2d1 i965: Store the dispatch width in the WM compile struct.
I'll be using this in merging brw_wm_emit.c and brw_wm_glsl.c
2009-08-12 12:43:43 -07:00
Eric Anholt 536476f243 i965: Handle scalar result swizzling in shared GLSL/non-GLSL code.
This is preparation for merging of brw_wm_glsl.c and
brw_wm_emit.c, and glsl.c doesn't swizzle channel results around.
2009-08-12 12:43:43 -07:00
Eric Anholt 792c49968e i965: Flag ARL-using programs as requiring brw_wm_glsl.c
This doesn't fix the glean testcase, but I guess it provides hope.
2009-08-12 12:43:42 -07:00
Eric Anholt 4e477aa1ba i965: Remove some unused WM opcode args. 2009-08-12 12:43:42 -07:00
Eric Anholt 255e5be265 i965: Avoid re-uploading the index buffer when we don't need to.
No performance difference proven at 95% confidence with my GLSL demo (n=10).
2009-08-12 12:43:42 -07:00
Alex Deucher a245c05dd3 r600: fix warning 2009-08-12 15:40:15 -04:00
Alex Deucher b0c191acaf r600: state cleanups 2009-08-12 15:40:15 -04:00
Alex Deucher 2f6675b816 r600: clean up Create/DestroyContext 2009-08-12 15:40:15 -04:00
Pauli Nieminen b6a4f5f1d3 r200: Prevent TexGenMatrix from leaking when destroying r200 context.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-12 15:40:14 -04:00
Brian Paul 855374a76a vbo: fix incorrect pointer 2009-08-12 13:16:41 -06:00
Brian Paul 8f9ee06925 glsl: add gl_Vertex, gl_Normal, etc to list of active attributes
If a vertex shader uses gl_Vertex, gl_Normal, etc, we need to include them
when the user queries the list of active attributes.  Before this we were
just including the user-defined attributes.
2009-08-12 12:35:13 -06:00
Brian Paul fd5eda1423 glsl: move predefined shader input/output info/code to slang_builtin.c
This is a more logical place for this code.
Also add some functions for querying vertex shader input names, types, etc.
2009-08-12 12:35:12 -06:00
Eric Anholt 2708ddfb06 vbo: Avoid extra validation of DrawElements.
This saves mapping the index buffer to get a bounds on the indices that
drivers just drop on the floor in the VBO case (cache win), saves a bonus
walk of the indices in the CheckArrayBounds case, and other miscellaneous
validation.  On intel it's a particularly a large win (50-100% in my app)
because even though we let the indices stay in both CPU and GPU caches, we
still end up waiting for the GPU to be done with the buffer before reading
from it.

Drivers that want the min/max_index fields must now check index_bounds_valid
and use vbo_get_minmax_index before using them.
2009-08-12 11:28:34 -07:00
Eric Anholt ef3ad412c7 radeon: Minor warnings cleanup. 2009-08-12 11:28:34 -07:00
Eric Anholt e643bc5fc7 i965: Use _MaxElement instead of index-calculated min/max for VBO bounds. 2009-08-12 11:28:33 -07:00
Pauli Nieminen 29173d3d5c radeon: Add protection against recursive DRM locking.
Reference counting protects DRM lock call from recursive locking that would
cause hang. Code also adds optional debugging output for recursive call that
is compiled only if NDEBUG is not defined.

This code is not 100% thread safe because mesa doesn't include increment and
test atomic operation. There is built-in gcc functions but they are only
available from gcc 4.2.
2009-08-12 14:14:29 -04:00
Michel Dänzer 5eeb44f398 st/xorg: Acquire/drop DRM master in order to work with multiple servers. 2009-08-12 19:11:11 +02:00
Brian Paul f21b0e9a04 gallium/glx/xlib: main/ prefix on Mesa includes, remove -I$(TOP)/src/mesa/main/ 2009-08-12 10:32:22 -06:00
Brian Paul 10eb2ca954 gallium/glx/xlib: updated comments 2009-08-12 10:32:22 -06:00
Brian Paul 80b8fbcaba gallium/glx/xlib: delete fakeglx.h 2009-08-12 10:32:22 -06:00
Brian Paul 275d0e7e92 gallium/glx/xlib: rename fakeglx.c to glx_api.c 2009-08-12 10:32:22 -06:00
Brian Paul 622d531296 gallium/glx/xlib: delete glxapi.h 2009-08-12 10:32:22 -06:00
Brian Paul f5dd1cff94 gallium/glx/xlib: rename fakeglx_fonts.c to glx_usefont.c 2009-08-12 10:32:22 -06:00