Commit graph

25103 commits

Author SHA1 Message Date
Eric Anholt
be64e66e5a intel: Fix flipped Y for glDrawPixels(GL_STENCIL_INDEX) to window system.
Even after fixing bugs in this code, it doesn't make me feel any cleaner.
Fixes piglit stencil-drawpixels.
2009-07-07 15:43:44 -07:00
Eric Anholt
bdd7506f10 intel: Fall back on glCopyPixels(GL_DEPTH) or GL_STENCIL. 2009-07-07 15:36:10 -07:00
Eric Anholt
510c3bd7a1 i965: Remove BRW_NEW_INPUT_VARYING
This state flag has been unused since the ffvertex_prog move to core.
2009-07-07 15:16:29 -07:00
Eric Anholt
058e96916b Cap array elements at 0 when passed an invalid pointer for an array object.
Otherwise, a pointer greater than the size would underflow and give a large
maximum element.

Reviewed-by: Brian Paul <brianp@vmware.com> (previous version)
2009-07-07 15:16:28 -07:00
Roland Scheidegger
fc6e02ce62 i965: fix fetching constants from constant buffer in glsl path
the driver used to overwrite grf0 then use implicit move by send instruction
to move contents of grf0 to mrf1. However, we must not overwrite grf0 since
it's still used later for fb write.
Instead, do the move directly do mrf1 (we could use implicit move from another
grf reg to mrf1 but since we need a mov to encode the data anyway it doesn't
seem to make sense).
I think the dp_READ/WRITE_16 functions may suffer from the same issue.
While here also remove unnecessary msg_reg_nr parameter from the dataport
functions since always message register 1 is used.
2009-07-04 15:35:07 +02:00
Eric Anholt
c30f23c123 i965: Remove bad constant buffer constant-reg-already-loaded optimization.
Thanks to branching, the state of c->current_const[i].index at the point
of emitting constant loads for this instruction may not match the actual
constant currently loaded in the reg at runtime.  Fixes a regression in my
GLSL program for idr's class since b58b3a786a.
2009-07-04 15:32:56 +02:00
Jakob Bornecrantz
28471cfa97 Merge branch 'mesa_7_5_branch' 2009-07-04 07:43:01 +02:00
Jakob Bornecrantz
9982821cda progs/tests: Tests more views in mipmap_comp_tests 2009-07-04 07:41:40 +02:00
Zack Rusin
edb0267170 Merge commit 'origin/openvg-1.0' 2009-07-06 21:43:26 -04:00
Zack Rusin
124a6b1958 gallium: rearrange some members to avoid memory holes/padding
plus it saves us a cacheline in the cso
2009-07-06 17:21:37 -04:00
Zack Rusin
5920b6b679 pipebuffer: handle possible null pointer dereference
reported by clang static analyzer
2009-07-06 17:21:37 -04:00
Zack Rusin
f311893bf4 cso: possible null pointer dereference
reported by clang static analyzer
2009-07-06 17:21:37 -04:00
Zack Rusin
4873031e29 util: fix possible null pointer usage
found by the clang static analyzer
2009-07-06 17:21:37 -04:00
Zack Rusin
21cce6afb0 exa: some infrastucture work for accelerating composite 2009-07-06 17:21:36 -04:00
Dave Airlie
d66de6c341 radeon: ensure cmdbuf space for state + AOS is available
The problem is if we find out later we don't have any cmdbuf space but
we've already written the arrays to the DMA buffer object, we end up
emitting the current cmdbuf which has references to the current DMA object
we then send that to the hw and we can't reference the arrays we just emitted
to the old DMA buffer. things go bad, crash boom.

This can probably be tuned further + swtcl probably needs some fixes
2009-07-06 20:39:49 +10:00
Dave Airlie
7266e33abd r200: fix makefile 2009-07-06 17:46:36 +10:00
Dave Airlie
f110c5fd6e radeon: fixup FBO depth 24 allocations to avoid assert 2009-07-06 15:50:24 +10:00
Dave Airlie
c27f21f92d radeon/r200/r300: port to new space checking code in libdrm
This moves a big chunk of the space checking code into libdrm so
it can be shared by the DDX.
2009-07-06 15:12:17 +10:00
Corbin Simpson
645bfa32c9 radeon-gallium: Compile warning fix.
Fixes flush during validation, in case a buffer is double-validated.
2009-07-05 11:56:40 -07:00
Corbin Simpson
c8e0d55ac6 radeon-gallium: Use FLINK to do proper global buffers. 2009-07-05 11:55:47 -07:00
Corbin Simpson
df04e72d25 radeon-gallium: Wait for BOs before mapping them. 2009-07-05 11:29:13 -07:00
Maciej Cencora
6fff62ee3f r300: fix vertex limits
- don't limit vertex count if we are using indices
- max indices count is 65535 not 65536
- remove some comments that don't apply anymore
- remove unreachable code
2009-07-05 15:22:37 +02:00
Jakob Bornecrantz
862488075c Merge branch 'mesa_7_5_branch'
Conflicts:
	src/mesa/main/dlist.c
	src/mesa/vbo/vbo_save_api.c
2009-07-03 18:53:58 +02:00
Michel Dänzer
94e1117c9b intel: Also update stencil bits in intel_update_wrapper().
Fixes assertion failure when binding depth/stencil texture to FBO stencil
attachment.
2009-07-03 17:54:34 +02:00
Keith Whitwell
f580494bef progs: revert damage to progs/SConscript from recent compressed texture commit 2009-07-03 16:40:03 +01:00
Keith Whitwell
b928d18398 mesa/shaders: fix gl_NormalMatrix state parameters
gl_NormalMatrix is the inverse transpose of the modelview matrix, but
as every matrix here needs to be transposed, we end up with
{MODELVIEW_MATRIX, INVERSE}.
2009-07-03 14:31:07 +01:00
Keith Whitwell
aa98575ebb st/wgl: don't advertise WGL_EXT_swap_interval string
This is a tweak to a previous fix -- it's not necessary to actually
advertise this extension to prevent these games from crashing -- they
ignore the extension string anyway. It's sufficient to just have
GetProcAddress return some dummy function addresses for SwapInterval.

Given we don't really implement this funcitonality, this is a better
fix.
2009-07-03 14:31:06 +01:00
José Fonseca
cffe7c8bd0 wgl: Lookup framebuffers by HWND whenever possible.
Some applications create several HDCs for the same window, so spite the WGL
API is geared towards HDCs it is not reliable searching by HDC.
2009-07-03 14:21:55 +01:00
Michel Dänzer
060c7f2321 radeon: Wait for BO idle if necessary before mapping it.
Fixes fighting between GPU and software rendering with TTM.
2009-07-03 12:44:19 +02:00
Michel Dänzer
6b2461fec9 r300: Guard debugging output. 2009-07-03 12:44:02 +02:00
Eric Anholt
8ae02a3919 intel: Fall back on glBitmap with fog enabled.
We would have to build the program with the appropriate fog mode, and
also supply the fog coordinate if appropriate.

Bug #19413.
2009-07-02 19:31:51 -07:00
Eric Anholt
ae1bfb6427 intel: Flush when mapping buffer objects so writes don't get reordered.
While GEM covers this for execution it knows about, it doesn't know about
the batchbuffer we're preparing.  Fixes piglit vbo-map-remap.c testcase.
2009-07-02 18:53:56 -07:00
Corbin Simpson
9a0b570ab6 vbo: If MapBufferRange fails, try MapBuffer instead.
Fixes segfaults with radeon winsys.
(Probably libdrm_radeon doing something that it shouldn't.)
2009-07-02 16:32:59 -07:00
Corbin Simpson
aa5b9c050f Nuke old trace-drm integration.
AFAICT nobody will miss it.
2009-07-02 16:32:59 -07:00
Eric Anholt
6d66f23c50 intel: Fix leak of DRI option info due to using the wrong free routine. 2009-07-02 14:07:10 -07:00
Eric Anholt
ddef7dc87b intel: Clean up leak of driver context structure on context destroy. 2009-07-02 14:07:10 -07:00
Eric Anholt
cb4ef34214 intel: Init num_fences to clean up valgrind warning.
Valgrind doesn't know that a successful getparam sets the target of the
pointer, so just set the value beforehand.
2009-07-02 14:07:09 -07:00
José Fonseca
2a2236606f mesa: Assume depth textures have a single level unless told otherwise. 2009-07-02 17:24:50 +01:00
Richard Li
bb429803e0 r6xx/r7xx: Better fix for fragment temps
This doesn't waste as many in generic cases.
2009-07-02 12:08:57 -04:00
Keith Whitwell
588c862571 mesa: s/TRUE/GL_TRUE
Fix compile breakage on Linux.
2009-07-02 14:44:06 +01:00
Jakob Bornecrantz
d1c8a0a308 r300g: Readd trace driver support 2009-07-02 15:07:53 +02:00
Jakob Bornecrantz
59abfa8e42 i915g: Readd trace driver support 2009-07-02 15:05:17 +02:00
Jakob Bornecrantz
c0d7502a2c trace: Add drm api integration
This is okay since drm_api.h doesn't have any external
	dependancies, one could make it only compile on platforms
	that support drm.
2009-07-02 14:57:55 +02:00
Keith Whitwell
798cd2a98d glapi: ensure _mesa_lookup_prim_by_nr() is not clobbered on regeneration
Propogate changes to enums.c back up to the python source.
2009-07-02 13:33:20 +01:00
Keith Whitwell
1668a679c4 Merge commit 'origin/dlist-statechange-shortcircuit' into mesa_7_5_branch
Conflicts:
	progs/trivial/Makefile

Pull in a minimal version of statechange shortcircuiting in display
list compilation.  This affects only glMaterial and glShadeModel state,
and includes quite a few tests to exercise various tricky cases.

If this goes well, will consider extending to all state in the future.
2009-07-02 13:29:46 +01:00
Dave Airlie
54ee188a00 radeon/r200/r300: drop radeon renderbuffer private width/height
half stealing the code without taking the intel regions
2009-07-02 20:57:45 +10:00
Dave Airlie
2ed3eddf9a radeon/r300: use base width/height.
I suspect this might break TFP in some way but it makes firecube run here
2009-07-02 20:45:19 +10:00
Keith Whitwell
b3e8e1cd4c mesa: ensure UsesFogFragCoord value is set for non-glsl shaders
With recent changes to support frontfacing in glsl, it is necessary
to ensure that the UsesFogFragCoord value is accurate in all shaders.
We were previously not setting it for fixed-function and ARB_fs shaders.
2009-07-02 11:28:56 +01:00
Cooper Yuan
c571395e5d R6xx/r7xx: Fix line width issue, ROUND_MODE and QUANT_MODE aren't bits of LINE_CNTL 2009-07-02 16:52:11 +08:00
Cooper Yuan
da88333671 R6xx/r7xx: Correct the indeices of DRAW_INDEX_IMMD 2009-07-02 16:49:19 +08:00