Commit graph

23942 commits

Author SHA1 Message Date
Jakob Bornecrantz
d60b2c6855 identity: Add new identity driver
This driver does no transformation of the gallium calls
	going to the real driver, like the identity matrix. It is
	intended to be the basis for transforming and/or debug
	drivers like trace and rbug.

	Authors of this patch are:
		Michal Krol, orignal heavy lifting.
		José Fonesca, object wrapping code stolen from trace.
		Jakob Bornecrantz, put it all toghether and renamed a stuff.
2009-06-24 13:04:56 +02:00
Eric Anholt
b8e638d489 i965: Disable texture tiling by default.
I haven't fixed all the regressions yet, and it'll be easy to re-enable when
the known problems are fixed.
2009-06-23 19:31:43 -07:00
Eric Anholt
b72dea5441 i965: Set the max index buffer address correctly according to the docs.
It's the last addressable byte, not the byte after the end of the buffer.
2009-06-23 19:31:13 -07:00
Eric Anholt
d43599afef i965: Don't set a reserved bit in MI_FLUSH.
I noticed this when this MI_FLUSH showed up in IPEHR for the ut2004 hang.
Not setting the reserved bit didn't help, though.
2009-06-23 19:31:13 -07:00
Eric Anholt
5ca800e100 dri2: Refresh the fake front contents after glXSwapBuffers().
Bug #19177.

Reviewed by: Ian Romanick <ian.d.romanick@intel.com>
2009-06-23 19:31:12 -07:00
Eric Anholt
9c0ba017c8 i965: Fix depth-texture Y-tiling detection for sized internal formats.
Fixes assertion failure on norsetto shadow mapping demo.
2009-06-23 19:31:12 -07:00
Eric Anholt
e0a4e25f93 i965: Fix packed depth/stencil textures to be Y-tiled as well.
Fixes shadowtex.c.  And an assert is added to catch this sooner next time.
2009-06-23 19:31:12 -07:00
Eric Anholt
1593a1bb34 intel: Bail on blits with non-tile-aligned offsets. 2009-06-23 19:31:12 -07:00
Eric Anholt
8f81a6468f intel: Avoid trying to do blits to Y tiled regions.
This is somewhat nasty, but we need to do Y-tiled depth for FBO support.
May help with corruption and hangs since enabling texture tiling, and
since switching depth textures to Y tiled.

Fixes piglit depthtex.c on 965.
2009-06-23 19:31:11 -07:00
Eric Anholt
246d59c29e intel: Fix some potential writes to zero-copy PBOs when used as regions.
I was in the midst of fixing some blitting-with-Y-tiled issues when I
noticed this.  Hopefully PBO usage will be a little more robust, as a
result.
2009-06-23 19:31:11 -07:00
Eric Anholt
6a49473ab5 intel: Remove long-unused intel_region_fill and intelEmitFillBlit. 2009-06-23 19:31:10 -07:00
Eric Anholt
a9b03aaebf intel: Refuse to do texture tiling if we don't have the kernel support. 2009-06-23 19:31:10 -07:00
Pauli Nieminen
4f1e141c11 Fix crash when debug output is enabled and sarea is notset in r200Clear 2009-06-23 16:43:00 +02:00
Ian Romanick
70e72070fc mesa: From float type modifier from values to large for singles
The values 2147483648.0 and 4294967294.0 are too larget to be stored in single
precision floats.  Forcing these to be singles causes bits to be lost, which
results in errors in some pixel transfer tests.

This fixes bug #22344.
2009-06-22 18:22:51 -07:00
Brian Paul
a31118c25a st/mesa: fix setup_edgeflags() regression
stobj is now non-null for the default/null buffer object.  Update the
test to check the buffer ID to see if it's a real buffer object.
2009-06-22 17:49:22 -06:00
Jakob Bornecrantz
7a879500ac gallium-intel: Improve Xorg Makefile a bit
The real solution is to create a Makefile.template for xorg
	drivers and use that here.
2009-06-22 23:45:02 +02:00
Jakob Bornecrantz
23170ab236 st/xorg: Convert to template makefile 2009-06-22 23:34:18 +02:00
Jakob Bornecrantz
5d0a1d4241 st/dri: Fix typo when checking for depth formats 2009-06-22 23:34:18 +02:00
Eric Anholt
c80ce5ac90 i965: Fix warnings in intel_pixel_read.c. 2009-06-22 08:52:52 -07:00
Michel Dänzer
2c36ed9067 intel: Fix glReadPixels regression since changing context init order.
Fixes regression in dd26899ca3 that also
affected some PBO operations.
2009-06-22 08:45:45 -07:00
Eric Anholt
df70d3049a intel: Also get the DRI2 front buffer when doing front buffer reading. 2009-06-19 22:18:16 -07:00
Eric Anholt
afc981ee46 intel: Update Mesa state before span setup in glReadPixels.
We could have mapped the wrong set of draw buffers.  Noticed while looking
into a DRI2 glean ReadPixels issue.
2009-06-19 22:17:46 -07:00
Eric Anholt
dcfe0d66bf intel: Move intel_pixel_read.c to shared for use with i965. 2009-06-19 22:16:16 -07:00
Eric Anholt
3b08a43f32 intel: Don't map regions with drm_intel_gem_bo_map_gtt() unless they're tiled.
This fixes a regression in region read performance that came in with the
texture tiling changes.  Ideally we'd have an access flag coming in so we
could also use bo_map_gtt for writing, like we do for buffer objects.

Bug #22190
2009-06-19 17:25:20 -07:00
Eric Anholt
405300bb19 intel: Fix other metaops versus GL_COMPILE_AND_EXECUTE dlists.
Fixes oglconform zbfunc.c and pxtrans-cidraw.c, at least.
2009-06-19 16:43:45 -07:00
Eric Anholt
64edde1004 intel: Fix glClear behavior versus display lists.
The CALL_DrawArrays was leaking the clear's primitives into the display
list with GL_COMPILE_AND_EXECUTE.  Use _mesa_DrawArrays instead, which
doesn't appear to leak.  Fixes piglit dlist-clear test.
2009-06-19 16:43:45 -07:00
Eric Anholt
396b4043f0 mesa: Make VBO dlist printing use the same path as other dlist printing.
I was rather confused when mesa_print_display_list didn't show any of
my glBegin()..glEnd().  Nothing but print_list appears to call
this function, so matching its behavior seems like a good idea.
2009-06-19 16:43:45 -07:00
Chia-I Wu
cca30245bd intel: Do not access pbo's buffer directly when attaching.
pbo might be system buffer based or attached to another region.  Call
intel_bufferobj_buffer to make sure pbo has a buffer of its own.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-06-19 16:43:45 -07:00
Chia-I Wu
ed91389618 intel: Data are copied in the wrong direction when breaking COW tie.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-06-19 16:43:45 -07:00
Chia-I Wu
1a7ec317ef intel: Fix migration from sys_buffer in intel_bufferobj_buffer.
intel_bufferobj_subdata is called to migrate data from sys_buffer, and
it expects only one of buffer or sys_buffer is non-NULL.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-06-19 16:43:45 -07:00
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
Roland Scheidegger
7a5c5b9af3 demos: make cubemap work without EXT_fbo support
use SGIS_generate_mipmap if EXT_fbo support (for manual mipmap generation)
is not available.
2009-06-20 00:28:38 +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