Commit Graph

20711 Commits

Author SHA1 Message Date
Roland Scheidegger
402df41c1c radeon: make cubemap mipmap generation work
need to pass target parameter to radeon_teximage/radeon_subteximage functions
otherwise mipmap generation for cube maps can't work (assert/segfault in
_mesa_generate_mipmap)
2009-06-20 00:28:39 +02:00
Michel Dänzer
dd26899ca3 intel: Fixups for 'mesa: create/destroy buffer objects via driver functions'.
Initialize all driver function hooks before calling _mesa_initialize_context(),
and handle all buffer objects in intel_buffer_object().

Fixes assertion failure when running glxinfo.
2009-06-19 23:55:55 +02:00
Roland Scheidegger
4d2b392a0a radeon: fix cube maps for non-mm path
drm cmd checker would refuse cube emits
also fix an issue in the cs path which would calculate the register
offset off by one dword.
Only same testing done as original code (none except compile tested).
2009-06-19 22:56:32 +02:00
Brian Paul
fa5b81ea8b st/mesa: restore some parameter checking buffer object functions
These functions may be called from the VBO code (not just user GL calls)
so do some parameter sanity checking.
2009-06-19 14:43:55 -06:00
Roland Scheidegger
ffae82da4c r200: fix cube maps for non-mm path
drm cmd checker rightfully fell over any cube emit
2009-06-19 22:32:06 +02:00
Brian Paul
e90d6a3cbf i965: initial code for loops in vertex programs 2009-06-19 12:19:33 -06:00
Brian Paul
fd7d764514 i965: asst clean-ups, etc in brw_vs_emit() 2009-06-19 12:19:33 -06:00
Brian Paul
752204d362 i965: asst clean-ups, var renaming in brw_wm_emit_glsl() 2009-06-19 12:19:33 -06:00
Brian Paul
9d029e0e20 st/mesa: remove redundant st_buffer_object::size field and error checks
Just use the gl_buffer_object::Size field.  Remove unnecessary size/offset
error checks.  Core Mesa will have already done these checks before these
functions are called.
2009-06-19 12:19:15 -06:00
Brian Paul
1ffd074436 st/mesa: no longer special-case buffer object 0 in st_buffer_object() cast wrapper
Since commit 6629a35559 "mesa: create/destroy
buffer objects via driver functions" this is no longer needed, and actually
was causing a crash during context tear-down.
2009-06-19 12:13:15 -06:00
Roland Scheidegger
7ce814b25f radeons: use dp4 for position invariant vertex programs
Fixes #22181. R200 requires this since DP4 is used in hw tnl mode.
R300 prefers it (should be faster due to no instruction dependencies), but
both methods should be correct (when sw tcl is used though, MUL/MAD might
be faster). Probably doesn't make much difference for R100 since vertex progs
are executed in software anyway, but let's just keep it the same there too.
2009-06-19 20:01:14 +02:00
Brian Paul
a8da1feb23 mesa: make query-related driver fallback functions static
Plug them in via _mesa_init_query_object_functions().
2009-06-19 10:05:08 -06:00
Brian Paul
331eb58f68 mesa: make buffer object-related driver fallback functions static
Plug them in via _mesa_init_buffer_object_functions().
2009-06-19 10:00:03 -06:00
Brian Paul
6629a35559 mesa: create/destroy buffer objects via driver functions 2009-06-19 09:58:51 -06:00
Brian Paul
e164210f65 i965simple: use u_reduced_prim() function 2009-06-19 09:48:43 -06:00
Brian Paul
d2e4643767 draw: use u_reduced_prim() function 2009-06-19 09:45:23 -06:00
Brian Paul
09da78c235 softpipe: use u_reduced_prim() 2009-06-19 09:42:37 -06:00
Brian Paul
157d52143a gallium/util: s/boolean/unsigned/ 2009-06-19 09:39:56 -06:00
Brian Paul
b0b8832e6f softpipe: whitespace, reformatting 2009-06-19 09:38:12 -06:00
Brian Paul
9038b6c8bb Merge branch 'ext-provoking-vertex'
Conflicts:

	docs/relnotes-7.6.html
	progs/tests/Makefile
	src/gallium/drivers/softpipe/sp_prim_vbuf.c
	src/glx/x11/indirect.c
	src/mesa/glapi/Makefile
	src/mesa/glapi/dispatch.h
	src/mesa/glapi/glapioffsets.h
	src/mesa/glapi/glapitable.h
	src/mesa/glapi/glapitemp.h
	src/mesa/glapi/glprocs.h
	src/mesa/main/dlist.c
	src/mesa/main/enums.c
	src/mesa/sparc/glapi_sparc.S
	src/mesa/x86-64/glapi_x86-64.S
	src/mesa/x86/glapi_x86.S
2009-06-19 09:15:34 -06:00
Brian Paul
0ddc4dbe43 draw: use flatfirst variable 2009-06-18 23:00:37 -06:00
Brian Paul
9205a871e7 draw: remove debug code 2009-06-18 22:51:41 -06:00
Brian Paul
af5fff9c23 draw: fix first provoking vertex mode for quads, quad strips and polygons 2009-06-18 22:48:51 -06:00
Brian Paul
950171be3c draw: fix first provoking vertex mode for unfilled quads 2009-06-18 22:47:46 -06:00
Brian Paul
601065f153 mesa: fix first provoking vertex mode for unfilled tri strips 2009-06-18 22:45:57 -06:00
Brian Paul
c70a529d7c draw: clean up indentation 2009-06-18 18:33:29 -06:00
Thomas Hellstrom
0342229289 gallium dri st: Probe the driver for supported surface formats.
This is done when constructing the fbconfigs, and the result is saved
for window system framebuffer creation.

Note: For dri2 the server needs to have an identical format selection
logic. Otherwise the dri state-tracker and the xorg driver (state-tracker)
will disagree on which format to use for the attachments. Some more work
is needed in this area.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2009-06-17 03:07:01 +02:00
Thomas Hellstrom
c9f19571da mesa driconf: Add macro to specify an option with a quoted default value.
The default values true and false will expand to "1" and "0" when
gcc -std=c99, causing bool option defaults to generate runtime failures.

One solution is to specify bool option defaults quoted as "true" and "false".
Add a macro to assist this.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2009-06-17 03:07:00 +02:00
Eric Anholt
3addc4e307 i965: Add decode for the G4X x,y offset in surface state. 2009-06-17 21:01:48 -07:00
Eric Anholt
6c3f696891 i965: Fix up texture layout for small things with wide pitches (tiled)
We were packing according to the pitch, while the hardware appears to base
it on the base level width.

With this and the previous commit, fbo-cubemap now matches untiled behavior.
2009-06-17 21:01:48 -07:00
Eric Anholt
0f328c90db i965: Fall back or appropriately adjust offsets of drawing to tiled regions.
3D rendering to tiled textures was being done with non-tile-aligned offsets.
The G4X hardware has fields to let us support it easily and correctly, while
the pre-G4X hardware requires a path full of suffering, so we just fall back.
2009-06-17 21:01:48 -07:00
Dave Airlie
46000cecc3 r300: use vbo_split_prims to split up large vertex buffers.
This lets ut2004 avoid hitting the elt warning.
2009-06-18 13:25:38 +10:00
Eric Anholt
bd10f0e84f i965: Fix tiling for FBO depth attachments by making DEPTH_COMPONENT Y tiled.
This may hurt if miptree relayout occurs, since we can't blit Y tiled
objects.  But it corrects depth tests on FBOs using textures.
2009-06-17 20:19:19 -07:00
Dave Airlie
b165fa7d45 radeon: don't re-add BOs to validate list
if its on the list its on the list don't go readding it.

multitexturing from the same texture could cause this.
2009-06-18 13:16:06 +10:00
Brian Paul
3817a54912 glsl: call _mesa_postprocess_program(), disabled 2009-06-17 09:58:29 -06:00
Brian Paul
516d20fd26 mesa: silence warning 2009-06-17 09:58:29 -06:00
Brian Paul
ec6ad7ba3c mesa: added _mesa_postprocess_program() to aid shader debugging 2009-06-17 09:58:29 -06:00
Jerome Glisse
f806a03361 radeon: Flush command buffer on viewport change
We flush the command buffer so we don't emit mixed
state (with new and previous buffer size) command
buffer, this is especialy affecting zbuffer states.
2009-06-17 16:33:14 +02:00
Jerome Glisse
2506c4e8b1 r300: don't emit vap index offset on r5xx hw when using cs
vap index offset is programmed to 0 by the kernel, it
would add work to kernel checker to allow userspace
programming of this so it's now disallowed with CS
on KMS.
2009-06-17 13:54:09 +02:00
Dave Airlie
77506dac8e GLX: attempt to fix glean makeCurrent test cases.
Two parts to this:

One we don't keep pointers to possibly freed memory anymore once we unbind the
drawables from the context. Brian I need to figure out what the comment
you made there, can we get a glean/piglit test so we can fix it properly?

If the new gc is the same as the oldGC, we call the unbind even though
we just bound it in that function. doh.
2009-06-17 13:59:28 +10:00
Dave Airlie
856221d699 radeon: fix warnings in wrapper with libdrm 2009-06-17 11:12:57 +10:00
Brian Paul
8d48222791 Merge branch 'mesa_7_5_branch'
Conflicts:

	src/mesa/main/api_validate.c
2009-06-16 18:25:52 -06:00
Brian Paul
6b917d0b17 i965: fix bugs in projective texture coordinates
For the TXP instruction we check if the texcoord is really a 4-component
atttibute which requires the divide by W step.  This check involved the
projtex_mask field.  However, the projtex_mask field was being miscalculated
because of some confusion between vertex program outputs and fragment
program inputs.

1. Rework the size_masks calculation so we correctly set bits corresponding
to fragment program input attributes.

2. Rename projtex_mask to proj_attrib_mask since we're interested in more
than just texcoords (generic varying vars too).

3. Simply the indexing of the size_masks and proj_attrib_mask fields.

4. The tracker::active[] array was mis-dimensioned.  Use MAX_PROGRAM_TEMPS
instead of a magic number.

5. Update comments, add new assertions.

With these changes the Lightsmark demo/benchmark renders correctly, until
we eventually hit a GPU lockup...
2009-06-16 18:21:26 -06:00
Brian Paul
742ba08406 softpipe: fix out of bounds quad rasterization bug
For some triangles we can generate quads which lie just outside the
surface bounds.  Just check the quad's mask before trying to emit/process
the quad.

Fixes failed assertion in Lightsmark.
2009-06-16 15:41:49 -06:00
Roland Scheidegger
4ef1f8e3b5 i965: handle OPCODE_SWZ in the glsl path
glsl compiler will not generate OPCODE_SWZ, and as a first step it would
be translated away to a MOV anyway (why?), but later internally this opcode is
generated (for EXT_texture_swizzling).
2009-06-16 21:40:41 +02:00
Brian Paul
3e48dd0445 mesa: fix incorrect viewport clamping in _mesa_set_viewport()
A 0 by 0 viewport size is legal.  Don't clamp against lower bound of one.
The error checking earlier in the function prevents negative values.
2009-06-16 09:34:35 -06:00
Brian Paul
ed7f4b4230 mesa: fix REMAINDER() macro
The results were incorrect for some negative values of A.
See bug 21872.
2009-06-16 08:45:56 -06:00
José Fonseca
3463b1479d gallium: Avoid atomic ops / locking when src is dst. 2009-06-16 13:05:25 +01:00
Brian Paul
70d247c69b Merge branch 'arb_map_buffer_range'
Conflicts:

	docs/relnotes-7.6.html
	src/mesa/main/mtypes.h
2009-06-15 16:42:42 -06:00
Shuang He
d027e8feff intel: Release fb backing regions in intelDestroyBuffer()
Fixes memory leak when destroying framebuffers.
2009-06-15 16:19:30 -06:00