Commit graph

32704 commits

Author SHA1 Message Date
RALOVICH, Kristóf
4e328774d4 demos: import GLSL raytracing demos 2010-03-24 09:04:14 -06:00
Brian Paul
e71c1589d8 st/mesa: fix typo in prev commit 2010-03-24 09:04:10 -06:00
Brian Paul
2d6befd9d1 st/mesa: fix sampler_view destruction bug when texture is shared
Since texture's can be shared by many contexts, the texture's sampler
view's context pointer might be invalid by time we delete the texture.

Prevent crashes/etc by setting the sampler view's context to be the
calling context before deleting it.  This should be safe as long as
all contexts which share the texture are using the same gallium driver.
That's a reasonable assumption since pipe_texture objects aren't
compatible between different drivers anyway.
2010-03-24 08:34:37 -06:00
Brian Paul
ab93f8d067 st/mesa: code clean-ups, formatting fixes, comments, etc 2010-03-24 08:25:24 -06:00
Brian Paul
3374b26f52 st/mesa: rename st_clear() to st_Clear()
To be consistent with other Mesa driver functions.
2010-03-24 08:18:21 -06:00
Brian Paul
f66d70b930 st/mesa: return GL_TRUE/GL_FALSE if return type is GLboolean
Just to be consistent.
2010-03-24 08:16:27 -06:00
Chia-I Wu
99386921e7 progs/egl: Link xeglthreads to libpthread.
This should hopefully fix a build failure reported by Chris Ball when
binutils-gold is used.
2010-03-24 08:46:10 +08:00
Brian Paul
2b5de09b3e swrast: improve depth texture mipmap selection
We still don't do proper min/mag filtering but this is better than just
sampling the base mipmap level all the time.

Fixes piglit depth-level-clamp test.  Fixes fd.o bug 27256.
2010-03-23 17:55:43 -06:00
Brian Paul
8ba47561dd st/glx: add support for multiple displays
This is a quick & dirty solution, but it works.  See comments in
the code for other ideas.

Fixes regressions/breakage seen in progs/xdemos/glxheads, etc. from commit
6632915e95.
2010-03-23 17:24:54 -06:00
Brian Paul
2d84d58975 glslcompiler: added option to do linking of vert/frag shaders 2010-03-23 16:20:02 -06:00
Luca Barbieri
3790199e04 dri: fix dri_test.c for non-TLS build
_glapi_Context and _glapi_Dispatch have different constness between
TLS and non-TLS builds.
2010-03-23 22:59:44 +01:00
Luca Barbieri
5f229547a5 dri: add _glthread_GetID to dri_test.c dummy glapi 2010-03-23 22:57:25 +01:00
Luca Barbieri
7e246e6aa6 dri: make unresolved symbol test link work even without a libGL.so
Currently the test link uses -lGL to define the glapi symbols.

This makes it impossible to build DRI drivers on systems without
Mesa installed and without building the libGL from the Mesa tree
first.

Some automated build systems trigger this problem.

This commit removes -lGL and instead adds a dummy implementation of
glapi to dri_test.c

This, along with Kristian's commit, should fix all known regressions
due to the addition of unresolved symbol checking.
2010-03-23 21:32:09 +01:00
Dan Nicholson
e725ef171b Change libX11 variables to not conflict with AC_PATH_XTRA
The variable X_LIBS from AC_PATH_XTRA contains only the -L searchdir
parameter and not the -lX11 to link to Xlib. Use X11 prefixed build vars
for linking with Xlib to avoid the conflict.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2010-03-23 13:26:50 -07:00
Kristian Høgsberg
ba5a53edd1 dri: Add $(DRI_LIB_DEPS) when linking the test binary
This will make sure we pick up libdrm_$(chipset).so from the right place.
2010-03-23 15:50:23 -04:00
Eric Anholt
3d99e990c0 i965: Stop abusing ctx->NewState flags for storing driver internal changes.
We're still abusing the flags by putting them where our driver stores
ctx->NewState changes.  Making them into more restricted state change
flags would be a project for later.

Fixes a failure where calling intel_draw_buffer() too often would trip
up Mesa assertions about when Mesa state could get changed, when it hadn't.

Bug #27034.
2010-03-23 15:29:54 -04:00
Kristian Høgsberg
57edf6b1fc mesa: Also print _NEW_STENCIL in _mesa_print_state() 2010-03-23 15:29:05 -04:00
Luca Barbieri
3428a30515 nvfx: add NOUVEAU_VTXIDX_IN_VRAM variable to put vertex/index buffers in VRAM
On some systems, putting vertex and index buffers in VRAM instead of GART
memory eliminates massive graphics corruption which is otherwise present,
due to unclear causes.

This patch adds an environment variable that does that, along with helpful
messages.

It turns it on by default on G7x, as it is what I am seeing corruption
on and some other reports also seemed to pinpoint these cards.
2010-03-23 18:11:25 +01:00
Luca Barbieri
208f5bf3cd nvfx: delay allocation of buffers in GART/VRAM to validation time
Currently we allocate buffers in GART or VRAM at creation time.

However, when using swtnl, this results in reads from uncached
memory, which drastically impair performance.

So, for now, cause nouveau_screen.c to not pass any placement flags
to buffer creation, so that the buffers are moved later.

Previously libdrm itself did this, but was changed to not to do it.

This may introduce an extra copy in normal usage, but this currently
does not seem to introduce significant performance degradation.

This will be revisited when pipebuffer is integrated.

Note that for AGP systems, properly solving this may be complex
since currently there is no fast way of reading from GART/VRAM.

We will probably need to try mapping AGP as writethrough and, in
addition, make buffer creation more aware of future buffer usage.
2010-03-23 18:10:59 +01:00
Luca Barbieri
9f0e302cc7 st/mesa: make st_manager.c set have[Stencil|Depth]Buffer only if bits > 0
Fixes a segfault when clearing a non-existent stencil buffer.
2010-03-23 18:02:51 +01:00
Luca Barbieri
fff86eb0aa dri: use mv -f instead of mv to ensure no prompting occurs
Using just mv may cause prompts on some systems/configurations.
2010-03-23 17:57:59 +01:00
Brian Paul
2689dd304c Merge branch '7.8'
Conflicts:

	Makefile
	src/gallium/state_trackers/glx/xlib/xm_api.c
	src/mesa/drivers/dri/intel/intel_blit.c
	src/mesa/drivers/dri/intel/intel_pixel_copy.c
	src/mesa/main/version.h
2010-03-23 09:14:17 -06:00
Brian Paul
ff54af530b softpipe: comments, re-formatting, etc 2010-03-23 09:08:35 -06:00
Brian Paul
fc1ba0423a softpipe: add special cases for all Z compare modes for 16-bit Z buffer
We had fast paths for PIPE_FUNC_LESS and LEQUAL before.  To satisfy
OpenGL invariance rules, all depth compare modes should produce the
same fragment Z values.

Fixes progs/demos/singlebuffer.c
2010-03-23 09:00:19 -06:00
Brian Paul
4ceeb1307a st/glx: better format selection in xmesa_choose_z_stencil_format()
This is a back-port of commit ef2664da6c
from master.
2010-03-23 08:58:12 -06:00
Luca Barbieri
83f4c444f4 nvfx: don't crash on empty fragment program 2010-03-23 15:41:10 +01:00
Luca Barbieri
e14d812e15 nvfx: fix coding style in nvfx_transfer.c 2010-03-23 15:41:04 +01:00
Luca Barbieri
a6cc9cf38d nvfx: stop incessantly spewing debug messages on the terminal
Currently we are continuously spewing messages about these variables
since we call debug_get_bool_option everytime we want to check their value.

This is annoying, slows things down due to terminal rerendering
and obscures useful messages.

This patch only calls debug_get_bool_option once and caches the result in a
static variable.
2010-03-23 15:40:41 +01:00
Luca Barbieri
c652ad907f nvfx: fix/workaround nv3x hwtnl issues
This patch re-emits the viewport state on framebuffer or rasterizer
change.

This seems to be necessary on nv3x, but the reason is not fully
understood.

It is quite likely that this isn't really the correct fix, but seems
to work, and makes nv3x much better.
2010-03-23 15:40:34 +01:00
Luca Barbieri
3e17a5b047 dri: test whether the built drivers have unresolved symbols
This is a different approach to solving this problem that the patch
I previously posted, and unlike that, should not cause any problems.

Right now undefined symbols in DRI drivers will still allow the
build to succeed.

As a result, people modifying drivers they cannot test risk creating
unloadable drivers with no easy way of automatically avoiding it.

For instance, the modifications to nv50 for context transfers caused
such an issue recently.

Unfortunately, just adding -Wl,--no-undefined doesn't work, because
the DRI drivers depend on glapi symbols, but do not depend on
libGL.so.1

Adding -lGL is not the correct solution since DRI drivers are not loaded
just by libGL, but also by X and possibly by other clients.

So, this patch simply tries to build an executable linked to the DRI
driver and to libGL.
If the DRI driver contains any undefined symbols not satisfied by its
dependencies or by libGL, this will fail.

This solution does not alter the built drivers, and does not significantly
slow down the build process.

All classic DRI drivers as well as all the Gallium drivers with configure
options compiled successfully with this change.

Thanks to Xavier Chantry <chantry.xavier@gmail.com> and
Michel Daenzer <michel@daenzer.net> for helping with this.

Signed-off-by: Luca Barbieri <luca@luca-barbieri.com>
Acked-by: Brian Paul <brian.e.paul@gmail.com>
2010-03-23 15:28:59 +01:00
Marek Olšák
1f25eca311 radeong: fix build issue with libdrm < 2.4.19 2010-03-23 13:34:31 +01:00
Dave Airlie
2a3accbc00 r300g: fix glean occlusion query test 2010-03-23 19:12:33 +10:00
Chia-I Wu
2ded27b2f0 Add missing EGL files to the tarballs.
Add the Makefile of Gallium EGL drivers and demos using EGL to the
tarballs.
2010-03-23 14:46:03 +08:00
Kristian Høgsberg
094c6fbc45 glx: Suppress BadDrawable from DRI2CopyRegion
This can happen when an X window is destroyed behind our back.  We use
DRI2CopyRegion behind the scenes in many places (like flushing the fake
front to the real front) so we have to ignore X errors triggered in that
case.

The glean test cases trigger this consistently as they don't destroy the
GLX drawable nicely, they just destroy the X window.
2010-03-22 22:04:23 -04:00
Kristian Høgsberg
7a0bcba9f9 glx: Suppress BadDrawable from DRI2CopyRegion
This can happen when an X window is destroyed behind our back.  We use
DRI2CopyRegion behind the scenes in many places (like flushing the fake
front to the real front) so we have to ignore X errors triggered in that
case.

The glean test cases trigger this consistently as they don't destroy the
GLX drawable nicely, they just destroy the X window.
2010-03-22 22:03:38 -04:00
Corbin Simpson
d5b2cecb03 gallium/docs: Cleanup and clarify point ras info.
...This state's interdependent? Really? Needs moar cleanup.
2010-03-22 18:42:42 -07:00
Corbin Simpson
ed61faec7e radeong: Always initialize this variable.
May or may not be responsible for slight increases in ipers FPS.
2010-03-22 18:42:42 -07:00
Corbin Simpson
ca49a72a55 r300g: Cleanup a few old warnings.
Those paths aren't important anymore, and a debugging warning won't stop
a hardlock anyway.
2010-03-22 18:42:42 -07:00
Ian Romanick
4eead42550 mesa: set version string to 7.8-rc2 2010-03-22 18:09:15 -07:00
Jesse Barnes
8f4f2a0c36 GLX/OML: honor OML semantics even if target, divisor and remainder are 0
This change passes a remainder of 1 to the server with the
DRI2SwapBuffers request, causing it to honor the OML semantics for the
swap rather than falling through to glXSwapBuffers behavior.  The
remainder actually ends up ignored since the divisor is 0, but we need
to differentiate the OML and standard behavior somehow.

Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-22 16:41:17 -07:00
Eric Anholt
d9ea1af82c i965: Add disasm for SNB MATH opcode. 2010-03-22 15:04:47 -07:00
Eric Anholt
10069916c7 i965: Enable normal clipping on SNB.
Rejecting all doesn't seem to be helping get the pipeline lit up.
2010-03-22 15:04:47 -07:00
Eric Anholt
7319b19fc9 i965: Force single program flow in SNB GS, to match gen4 GS. 2010-03-22 15:04:46 -07:00
Eric Anholt
073f8d1c00 i965: Correct copy and wasted field shifts for SNB GS URB. 2010-03-22 15:04:46 -07:00
Eric Anholt
edc8a99d1d i965: Enable VS on SNB.
It appears that the thing that was killing VS threads was the
gratuitous NOP that replaced the gratuitous jump from OPCODE_END to
the nearby OPCODE_END implementation.  With that gone, we can move on
to the rest of the pipeline.
2010-03-22 15:04:46 -07:00
Eric Anholt
d163d5fac0 i965: Remove gratuitous jump or nop from OPCODE_END to vertex emit.
Just emit the URB write at END time.  Subroutine code that sits after
OPCODE_END won't be executed since we've ended the thread at the point
that the URB write is done.
2010-03-22 15:04:46 -07:00
Eric Anholt
a9acde6a72 i965: Ignore execution mask for the mov(m0, g0) of VS URB write header on SNB.
Otherwise, we may not get the FFTID set up which would break freeing
of resources.
2010-03-22 15:04:46 -07:00
Eric Anholt
4fc5732225 i965: Allow FS constants to be used as immediates instead of push/pull.
The hope is to later take advantage of the reduced constant usage to
free up regs.  This only covers the GLSL path at the moment, because
the brw_wm_emit path doesn't get the information as to whether a float
value is a constant or a uniform.
2010-03-22 15:04:46 -07:00
Eric Anholt
864f2bd61d i965: Add INTEL_DEBUG=glsl_force to force brw_wm_glsl.c.
I keep finding the desire to force this path to debug it instead of
cooking up goofy-looking testcases to do so.
2010-03-22 15:04:46 -07:00
Eric Anholt
8a998342c6 i965: Optimize OPCODE_CMP by using BRW_SEL to choose results.
Tested with piglit glsl-fs-sqrt-branch, fp-cmp.vpfp.
2010-03-22 15:04:46 -07:00