Commit graph

25103 commits

Author SHA1 Message Date
Pauli Nieminen
bbf2b5c4ff radeon: Optimize memory handling for dma operations.
We keep dma buffer objects in list untill they have been unused for many
draw operations. Current limit of having 100 flushes is just guess for
good performance/memory trade off.

Moving WARN_ONCE macro to common context because it is used in multiple drivers.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-18 13:19:25 -04:00
Alex Deucher
c745c87b3e r300: fix the build on big endian 2009-08-18 11:40:18 -04:00
Brian Paul
1c1ee1176d gallium: improved comments, minor whitespace changes 2009-08-18 09:31:22 -06:00
Chia-I Wu
34d8c13bff egl: Remove eglhash.c and eglhash.h.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:50:12 -06:00
Chia-I Wu
e484a92928 egl: Add back handle checking.
Handle checking was done using hash tables.  Now that they are gone, we
have to loop over the lists.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:50:06 -06:00
Chia-I Wu
e3734e4685 egl: Make lookup functions static inline.
progs/egl/demo3.c is also changed since it uses an internal function.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:50:00 -06:00
Chia-I Wu
38feefdc4e egl: Remove hash table for displays.
The hash table was used to map a display to a handle.  It is simpler to
cast directly.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:49:53 -06:00
Chia-I Wu
7a9f528009 egl: Remove hash table for surfaces.
The hash table was used to map a surface to a handle.  It is simpler to
cast directly.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:49:34 -06:00
Chia-I Wu
ccc2b0bc65 egl: _eglCloseDriver should be no-op.
Move drv->API.Terminate call to eglTerminate.  Remove
_eglReleaseDisplayResource as drivers are doing it.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:49:22 -06:00
Chia-I Wu
5a2c9372a0 egl: Some per-driver data should be per-display.
Move some fields of _EGLDriver to _EGLDisplay.  It also becomes
unnecessary to pass _EGLDisplay to drivers when _eglMain is called.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:49:09 -06:00
Chia-I Wu
0eaa02c836 egl: Change the way drivers are loaded.
Driver is chosen and preloaded when eglGetDisplay is called.  Later when
eglInitialize is called, the same driver is matched to initialize the
display.  Also, add new, but unused, hooks to EGLDriver to allow a
driver to probe a display or unload itself.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:44:44 -06:00
Chia-I Wu
2f2cf461c5 egl: Overhaul driver API.
The motivation is so that drivers do not need to look up and check for
bad display, context, and etc.  It also becomes unnecessary for drivers
to call the link functions.

This commit makes eglapi.[ch] do the lookup and check.  As a result, the
driver API is overhauled, and almost all sources and drivers need
update.  The updates are mainly find and replace with human brains.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:44:34 -06:00
Dave Airlie
521dea21d4 r600: fix build 2009-08-18 20:38:49 +10:00
Dave Airlie
771e19a861 r300: remove warning introduced with OQ 2009-08-18 20:30:15 +10:00
Dave Airlie
f74e00f4d1 radeon/r200: fix build after OQ commits 2009-08-18 20:29:02 +10:00
Dave Airlie
9ad76e9479 r300: OQ rework
Move to common code base so radeon/r200 can add support for this.
Make OQ start a state emitted like all normal state, and make no-tcl
flushing work in proper places.

Really need a generic post emit space reservation mechanism like max_state
so we can reserve some space for the emit

this code passes demos/arbocclude, piglit occlusion query and
glean occlusion query with TCL and NO-TCL on my rv530.
2009-08-18 20:10:50 +10:00
Dave Airlie
0e705c0dd3 r300: fix missing BEGIN/END batches 2009-08-18 20:10:08 +10:00
Dave Airlie
c80bc3abcd r300: fix big endian build 2009-08-18 13:55:12 +10:00
Brian Paul
3aafd22f6a gallium: memset() tgsi_exec_machine to all zeros in tgsi_exec_machine_create()
This fixes invalid values for CondStackTop, LoopStackTop, etc.
2009-08-17 17:13:17 -06:00
Brian Paul
680df529a3 demos/glsl: remove glutInitWindowPosition() calls 2009-08-17 17:13:17 -06:00
Alex Deucher
af1dc225c2 r600: fix counting error after the last commit 2009-08-17 18:16:38 -04:00
Alex Deucher
66c632b5a1 r600: make sure the number of indices is valid
make sure the number of indices is valid for the
requested prim type.  glxgears sends invalid
quad strips with only 2 indices for example.
2009-08-17 17:47:27 -04:00
Alex Deucher
c3380ded10 radeon: remove RADEON_DEBUG_BO stuff
This stuff was a vestige of the r600 bring up and
now mostly serves to periodically break the build.
2009-08-17 15:42:19 -04:00
Maarten Maathuis
caf40d5d14 nv50: remove a few cases of directly casting struct pipe_context 2009-08-17 18:48:14 +02:00
Maarten Maathuis
97cc526eb7 nv50: borrow some flushing code from the ddx
- This fixes neverball corruption.
- I'm unsure about what we're actually flushing here.
2009-08-17 18:48:14 +02:00
Maarten Maathuis
f199dbdb76 gallium: Make PIPE_TRANSFER_{READ,WRITE,READ_WRITE} bitmask friendly. 2009-08-17 18:48:14 +02:00
Maarten Maathuis
93ce4c99d4 nv50: whitespace fixes and deobfuscation 2009-08-17 18:48:13 +02:00
Brian Paul
7c4223876b cell: fix incorrect pipe_transfer tests
The value is an enum, not a bitmask.
2009-08-17 08:28:22 -06:00
Jerome Glisse
c952c1f109 r300: split vbo rendering with big drawarray case
Split vbo rendering when the number of elements requested
by drawarrays is bigger than 65536.
2009-08-17 12:50:27 +02:00
Christoph Bumiller
0204c7d8d7 nv50: fix stencil state
It's the front stencil methods that have contiguous offsets,
not the back ones.
Unfortunately the names in the header still have FRONT/BACK
reversed, so I'm using hex values until it gets updated.
2009-08-17 12:26:54 +02:00
Dave Airlie
743c4af5cd radeon: turn off bo debugging 2009-08-17 19:09:15 +10:00
Maciej Cencora
fd97f2f8b8 r300: disable ZTOP only when occlusion queries are used 2009-08-16 02:04:29 +02:00
Maciej Cencora
30e9c753b8 Merge branch 'oq' 2009-08-16 01:56:29 +02:00
Pauli Nieminen
57f55af219 mesa: Add 2 new demos to .gitignore. 2009-08-15 13:30:15 -06:00
Maarten Maathuis
a7adb85827 nv50: avoid a NULL-ptr dereference when the pipe context changes
- We cannot assume all state objects are present when the pipe context changes.
2009-08-15 16:57:00 +02:00
Christoph Bumiller
a2af40b846 nv50: align registers used with TEX to 4
The TEX instruction is passed the first index of a contiguous
range of 4 TEMP registers that contain coordinates / LOD and,
after execution, the texel values.
It seems the first index is required to be a multiple of 4 on
some (older ?) cards.
2009-08-15 16:22:27 +02:00
Maciej Cencora
60587182d4 r300: enable ARB_occlusion_query
Supported only on HW with TCL block and with proper radeon drm.
Required minimum radeon drm version is 1.30 or KMS.
2009-08-15 15:14:29 +02:00
Maciej Cencora
d2b1b9e8d5 radeon: add flag for drm OQ support 2009-08-15 15:14:25 +02:00
Maciej Cencora
f3e1d7d6f8 r300: temporary occlusion query hack 2009-08-15 15:14:24 +02:00
Maciej Cencora
8d60c0b751 r300: clear not_flushed OQ list after flush 2009-08-15 15:14:24 +02:00
Maciej Cencora
c903834d4d r300/oq: add some debugging info 2009-08-15 15:14:23 +02:00
Maciej Cencora
0d0f01e2e0 r300: add occlusion queries support
TODO:
- use proper interface for checking if bo is idle when it's available
- disable ZTOP only when needed
- make it work under KMS
2009-08-15 15:14:11 +02:00
Dave Airlie
f2daded812 radeon space: realign with drm space check code 2009-08-15 21:34:17 +10:00
Dave Airlie
a6cc45e135 r300: fixup space checks since VBO code
Hopefully this gets the ordering correct so the space checks don't fail.
2009-08-15 21:18:30 +10:00
Dave Airlie
3cc9a28b9b r300: add just in case warn I don't think this can actually happen 2009-08-15 20:30:45 +10:00
Dave Airlie
5e4e8effec radeon: enable vertex splitting for IBs
Based on Maciej's code, just fixed up the alignments for INDX_BUFFER

ut2004 runs AS-Convoy
2009-08-15 20:22:13 +10:00
Roland Scheidegger
b9789948e0 i965: disable bounds checking on arrays with stride 0
if stride is 0 we cannot use count as max index for bounds checking,
since the hardware will simply return 0 as data for indices failing
bounds check. If stride is 0 any index should be valid hence simply
disable bounds checking in this case.
This fixes bugs introduced with e643bc5fc7.
2009-08-15 03:44:43 +02:00
Ian Romanick
e304c65a2b i965: Add support for GL_ARB_seamless_cube_map 2009-08-14 16:28:51 -07:00
Ian Romanick
8b0b33530c demos/cubemap: Add support for GL_ARB_seamless_cube_map 2009-08-14 16:28:51 -07:00
Ian Romanick
06ae1db4a9 Regenerate files for GL_ARB_seamless_cube_map 2009-08-14 16:28:51 -07:00