Commit graph

25754 commits

Author SHA1 Message Date
Alex Deucher
7a05a4c65c r600: use persistent bos for shaders 2009-08-23 13:41:43 -04:00
Alex Deucher
41934be254 r600: always emit CB base
Not doing so seems to cause lock-ups or rendering problems
on some chips.  I think there is an logic issue related to
CB and VGT on some chips.  We ran into similar issues in
r600_demo IIRC.
2009-08-23 13:05:52 -04:00
Pauli Nieminen
b34695375e radeon: Fix compilation with legacy memory manager. 2009-08-23 14:02:46 +03:00
Pauli Nieminen
66bbafb6f9 radeon: Check from kernel if dma buffer is idle.
This makes sure that objects are leaving wait list only when they are processed by gpu.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-23 13:39:32 +03:00
Alex Deucher
bf6d0ae598 r600: make state emit more fine grained
Gives a nice speed boost in most apps since
we only emit what state we need.
2009-08-22 18:03:26 -04:00
Renato Caldas
08e91e0315 shader: fix compilation warnings
This patch fixes some "implicit declaration of function" compilation
errors/warnings on the new shader code.

Signed-off-by: Renato Caldas <seventhguardian@gmail.com>
2009-08-22 14:00:23 -07:00
Luo Jinghua
523cb80d0f ARB prog parser: include imports.h to kill some compiler warnings 2009-08-22 13:59:48 -07:00
Alex Deucher
180c304943 r600: move full state to radeon state atoms 2009-08-22 15:03:41 -04:00
Alex Deucher
17813931db r600: add support for RS880 2009-08-22 11:45:40 -04:00
Ian Romanick
c87ef0870a i965: Implement frag prog DPH like DP4
DPH can output to any component, not just to X.  This allows fpalu.c
to run without hitting the assertion in emit_dph.
2009-08-22 01:35:12 -07:00
Pauli Nieminen
effda2e2a7 r300: Fix debug output. 2009-08-22 04:37:24 +03:00
Jakob Bornecrantz
54fb71b863 st/dri: Remove some debug prints 2009-08-22 02:16:02 +01:00
Jakob Bornecrantz
a3e59b9d06 st/dri: Find out if the drawable is a pixmap
Part of this code is disabled since no performance gains
	where detected with it enabled.

	This code only detects if it is a pixmap that it is
	rendering to on the st/xorg DDX since it sets the fake
	front to the same handle as front.
2009-08-22 02:16:02 +01:00
Jakob Bornecrantz
6237ac2412 st/dri: Fix frontbuffer rendering with DRI2 2009-08-22 02:16:01 +01:00
Jakob Bornecrantz
29165a2fcc st/xorg: Handle fake fronts correctly for pixmaps 2009-08-22 02:10:18 +01:00
Jakob Bornecrantz
a469b4c459 i915g: Remove bad assert on fence 2009-08-22 02:09:59 +01:00
Pauli Nieminen
6c5c46f842 r300: Fix dri1 not to emit state that is not supported in old drm. 2009-08-22 02:54:34 +03:00
Pauli Nieminen
c0f4063703 radeon/r300: Code clean up and logic fix. 2009-08-22 02:43:00 +03:00
Michel Dänzer
029e643b24 glx/dri2: Always use X drawable ID for DRI2 protocol.
Fixes protocol errors in cases where the GLX ID is different.
2009-08-22 01:33:37 +02:00
Michel Dänzer
6b1f144d9b Fix r300 VBO support build on big endian. 2009-08-22 01:24:39 +02:00
Alex Deucher
bf5d6cf455 r600: better default state size.
Hopefully suokko's emit size impovements will
land soon.
2009-08-21 17:46:32 -04:00
Pauli Nieminen
bb43c5d1cb r300: Remove calls to rcommonEnsureCmdBufSpace.
All rendering is checked in r300PredictTryDrawPrimsSize which mamde these calls useless.
2009-08-21 23:48:39 +03:00
Pauli Nieminen
90647ff558 radeon: protect against buffer overflow in state atom debug code. 2009-08-21 22:37:13 +03:00
Ian Romanick
4cfb1b880b Merge branch 'asm-shader-rework-1' 2009-08-21 11:34:30 -07:00
Pauli Nieminen
b7ec2ebe33 radeon: Improve state emit code.
Trying to make understanding code easier with small refactoring and renaming.
2009-08-21 20:47:35 +03:00
Pauli Nieminen
0bf4308580 r300: Add debug output to show how much was emited in TryDrawPrims. 2009-08-21 20:26:41 +03:00
Brian Paul
ef98eed0a9 radeon: fix incorrect loop limit (warned by -O3) 2009-08-21 11:04:37 -06:00
Brian Paul
49c0825655 glx: initialize some local vars to silence warnings with -O3 2009-08-21 11:04:37 -06:00
Brian Paul
1aba1baa62 st/mesa: flush bitmap cache if Z value changes
When adding a new bitmap to the cache we have to check if the Z value is
changing and flush first if it is.

This is a modified version of a patch from Justin Dou <justin.dou@intel.com>
2009-08-21 10:24:50 -06:00
Pauli Nieminen
d6b5464aaa r300: Predict emit size for next rendering operation.
We do flush for cmd buffer in case there isn't enough space left for whole
rendering operation. This protects dma regions from getting released in middle
of state emit.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:31 +03:00
Pauli Nieminen
12fe319c53 r300: Handle possible fall back if space check fails. 2009-08-21 19:12:30 +03:00
Pauli Nieminen
11d3ec1f93 r300: Delay allocation of dma regions in TryDrawprims.
This makes it easier to predict size of next rendering operation so we
can do early flush.
2009-08-21 19:12:30 +03:00
Pauli Nieminen
66513ba884 r300: Clean emit code.
This fixes some state atom check functions from returing wrong emit size.

There is emit code cleanup so that emit function selection is done in init
time instead of runtime.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:30 +03:00
Pauli Nieminen
d1a0ece907 radeon: Port flush preventation code from r200 to r100.
- emit prediction
- fixes to emit_sizes for data
- clean up of excesive use of radeonEnsureCmdBufferSpace

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:30 +03:00
Pauli Nieminen
60d156f688 r200: Make swtcl use state size prediction for flush.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:30 +03:00
Pauli Nieminen
e083f53ce4 r200: Remove unnecessery Elts from r200 context.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:29 +03:00
Pauli Nieminen
9f7676c718 r200: Remove unnecessary calls to rcommonEnsureCmdBufSpace.
Calling EnsureCmdBufSpace is not required because rendering pipeline has to quarentee free space.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:29 +03:00
Pauli Nieminen
0f41259eff r200: Fix atom->check call to return emit size for atom.
This patch makes render emit size prediction count the corect maximum emit size
for state.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:29 +03:00
Pauli Nieminen
fb1d0bfd47 r200: Prevent flush in middle of rendering.
Patch adds prediction functionthat tries to predict emit size to the smallest
possible values that is quarenteed to be higher than worst case scenario in
rendering pipeline.

State emit size prediction code is in place but fix for emit sizes is included
in next patch.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:29 +03:00
Pauli Nieminen
7f8f486b36 radeon/r200: Add -Wall to default build flags like it is in r300/r600
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:29 +03:00
Pauli Nieminen
45e3be3c07 glx: Make drawables persistent untill they are changed by glXMakeCurrent
This fixes bug that xdemos/manywin would segfault if it was run with command
./manywin 2. Demo is tring to call glXSwapBuffers while another context was
bind using glXMakeCurrent.

Fix is simple makes drawable and readable persistent untill they change or
context is destroyed.

I found a logic error when same dri context is used for multiple drawables
which caused readable and drawable to fall out of sync in special case. Fix
is simple just updating  drawables more often than in original patch.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:28 +03:00
Chia-I Wu
b1f156f0ec egl: Make _eglChooseDriver return the filename of the driver.
The real difference is that the driver suffix is now appended.  This
also fixes an annoying bug that EGL_DRIVER could not specify the path to
a driver because a suffix was always appended.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-21 08:34:34 -06:00
Chia-I Wu
5a459d58fc egl: Remove dependency on libX11.
libX11 is used to determine the screen number, which is in turned used
to determine the DRI driver.  However, the sysfs interface for
determining the DRI driver is gone, and no working driver depends on
this mechanism.

Display string parsing is moved to a new function,
_eglSplitDisplayString.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-21 08:34:34 -06:00
Chia-I Wu
1f871a4d15 egl_softpipe: Do not flush unlinked context.
An unlinked context is destroyed after _eglMakeCurrent.  Flushing such
context would cause segfault.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-21 08:34:34 -06:00
Chia-I Wu
408db29792 egl: Check for null display in handle checking.
The display may be NULL when checking a handle.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-21 08:34:34 -06:00
Jakob Bornecrantz
9b3e5df900 st/egl: Add support for drmModeDirtyFB command if found 2009-08-21 15:04:21 +02:00
Pauli Nieminen
0c0cea250d radeon: Add comment to explain logic for freeing dma buffers. 2009-08-21 16:40:14 +03:00
Ian Romanick
ac5551fbb9 ARB prog parser: Revert part of previous change to constant parsing
The commit "ARP prog parser: Implement the spec, not what makes sense"
broke the parsing of scalar constants.  This commit reverts that part
of that commit.  Now vp_swizzle.c passes.
2009-08-20 18:29:41 -07:00
Alex Deucher
ba48e78b1f r600: convert to using common radeon state atoms
switches more state handling to common code.  We need
should be more fine grained with the state atoms
eventually.
2009-08-20 18:55:41 -04:00
Alex Deucher
a47bb56d45 r600: improve state emission
Slowing migrating to atom based system like
the other radeon drivers.
2009-08-20 17:21:50 -04:00