Commit Graph

24276 Commits

Author SHA1 Message Date
Dave Airlie d9913d7c09 radeon/fbo: stencil bits fix from Michel in intel fbo code 2009-07-14 01:23:23 +10:00
Xiang, Haihao 2995bf0d68 i965: add support for new chipsets
1. new PCI ids
2. fix some 3D commands on new chipset
3. fix send instruction on new chipset
4. new VUE vertex header
5. ff_sync message (added by Zou Nan Hai <nanhai.zou@intel.com>)
6. the offset in JMPI is in unit of 64bits on new chipset
7. new cube map layout
2009-07-13 11:01:13 +08:00
Dave Airlie f030e2ba17 r300: move fallback warnings inside fallback debugging
random output is bad
2009-07-12 21:37:47 +10:00
Dave Airlie dfecf217fa r300: fix clear mask to not use sw if not necessary 2009-07-12 21:37:46 +10:00
Nicolai Hähnle b484c71036 radeon: Fix crash when rendering to incomplete texture and other formats
It is possible to bind texture images of an incomplete mipmapped texture.
Software fallbacks in this case incorrectly tried to mmap the entire texture.

Additionally, add span functions for 1555 and 4444 formats.

This fixes crashes in piglit's fbo-readpixels test; unfortunately, the test
itself still fails - this needs to be investigated.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-12 12:50:36 +02:00
Dave Airlie a10244453c radeon: update clear code from Intel codebase.
This updates some of the clear code from Intel gives a 5x clearspd perf
for me here. played openarena also, not sure if the viewport changes
broke anything,
2009-07-12 17:28:14 +10:00
Dave Airlie b06cb372bf radeon: fbo fix firecube crashes
it might still be misrendering not sure
2009-07-12 12:13:40 +10:00
Michel Dänzer 65059606e9 radeon: Fix scissor rectangle calculation when rendering to FBO.
fgl_glxgears -fbo runs, though the gears don't look right yet.
2009-07-11 20:25:09 +02:00
Dave Airlie db618427ab radeon: enable GL_NV_texture_rectangle under dri2. 2009-07-11 03:17:13 +10:00
Dave Airlie 85957cb512 radeon: set texture in state properly.
make sure to turn off when no texture is used in hw
2009-07-11 03:17:12 +10:00
Dave Airlie a6a11e1dc0 radeon: make swtcl emit size bigger 2009-07-11 03:17:12 +10:00
Brian Paul 8987410ab6 Merge branch 'mesa_7_5_branch' 2009-07-09 08:05:56 -06:00
Brian Paul 78af70be37 docs: document gl_TextureMatrix[i][j] array indexing bug fix 2009-07-09 08:04:07 -06:00
Brian Paul c86b076668 glsl: do const parameter optimization for array element actual parameters
When a function parameter is const-qualified we can avoid making a copy
of the actual parameter (we basically do a search/replace when inlining).
This is now done for array element params too, resulting in better code
(fewer MOV instructions).

We should allow some other types of function arguments here but let's be
conservative for the moment.
2009-07-09 07:58:50 -06:00
Brian Paul abdb0fdcc0 glsl: fix incorrect indexing for gl_TextureMatrix[i][j]
The two indexes were mixed up when accessing a row of a matrix in an array
of matrices.
2009-07-09 07:57:29 -06:00
Brian Paul 36e906aad6 docs: document glMaterial/glShadeModel display list optimization 2009-07-08 14:14:03 -06:00
Brian Paul 4adc9b4a5b mesa: only use fallback texture when using shaders, not fixed-function (take two)
The semantics are a little different for shaders vs. fixed-function when
trying to use an incomplete texture.  The fallback texture returning
(0,0,0,1) should only be used with shaders.  For fixed function, the texture
unit is truly disabled/ignored.

Fixes glean fbo test regression.
(cherry picked from commit 01e16befd4)
(cherry picked from commit 51325f44d1)
[anholt: squashed these two together from master, skipping the mess in between]
2009-07-07 16:02:45 -07:00
Zack Rusin 7b861b9b9e gallium: fixup register indexes for fog/frontface/point coord 2009-07-07 12:48:50 -07:00
Michel Dänzer 71633abafc gallium: Fixes for clobbering stencil values in combined depth/stencil textures.
Also fix one case where a 32 bit depth value was incorrectly converted to a
combined depth/stencil value.
2009-07-07 14:49:52 +02:00
Michel Dänzer 25b492b976 GLX/DRI1: Mark GLX visuals with depth != screen depth non-conformant.
Such visuals are subject to automatic compositing in the X server, so DRI1
can't render to them properly.
2009-07-07 13:59:59 +02:00
Michel Dänzer 96601ec8e0 gallium: Only set FRONT_STATUS_COPY_OF_BACK if there is a back buffer.
Fixes potential crash when SwapBuffers is called but there's no back buffer.
2009-07-07 12:17:04 +02:00
Zack Rusin a4d952358d gallium: more fog extraction fixes
fix the cases when fog coord/front face/point coord are used in the same
shader.
2009-07-06 21:35:15 -04:00
Ian Romanick 7fb4becf98 demos: Fix vsync checking in glxgears
Of course glXGetVideoSyncSGI doesn't return the swap interval.  The feature
only exists in the Mesa extension... which is the whole reason I created the
Mesa extension!  Note that the Mesa extension allows drivers to default to a
swap interval of 0.  If the Mesa extension exists, use its value.  Only
consider the SGI extension when the Mesa extension is not available.

Fixes bug #22604.
2009-07-06 11:42:12 -07:00
José Fonseca 1068c15c61 wgl: Make the stw_framebuffer destructions threadsafe.
Ensure no other thread is accessing a framebuffer when it is being destroyed by
acquiring both the global and per-framebuffer mutexes. Normal access only
needs the global lock to walk the linked list and acquire the per-framebuffer
mutex.
2009-07-06 18:23:37 +01:00
José Fonseca 6f4167c8a2 wgl: Check for multiple threads before GET_CURRENT_CONTEXT.
Fixes wglthreads -- the 2nd thread MakeCurrent call was trying to flush
the first thread context while still in use.
2009-07-06 17:40:08 +01:00
José Fonseca 5470a67335 wgl: Listen to WM_WINDOWPOSCHANGED instead of WM_SIZE messages.
According to
http://blogs.msdn.com/oldnewthing/archive/2008/01/15/7113860.aspx
WM_SIZE is generated from WM_WINDOWPOSCHANGED by DefWindowProc so it
can be masked out by the application.

Also there were some weird bogus WM_SIZE 0x0 messages when starting
sharedtex_mt which we don't get like this.
2009-07-06 17:08:37 +01:00
Jakob Bornecrantz 7ccb00b1ac Merge branch 'mesa_7_5_branch' 2009-07-05 04:14:41 +02:00
Brian Paul f742f2c0b3 demos: indentation fix 2009-07-08 13:59:03 -06:00
Brian Paul 820436f978 demos: use glEnable/DisableClientState() for vertex arrays 2009-07-08 13:58:30 -06:00
RALOVICH, Kristóf bf71ece171 glx: death to RCS tag 2009-07-08 13:34:57 -06:00
Corbin Simpson 67a43b2cfc r300g: Remove VAP_CNTL_STATUS from invariant state.
Seriously.
2009-07-08 11:59:56 -07:00
Corbin Simpson c737e57357 r300g: Disable MSPOS registers for glisse's CS security checker.
These will come back in someday, when we can properly use them.
2009-07-08 11:55:27 -07:00
Corbin Simpson 746140e215 r300-gallium: Unify sampler and texture emit.
They have to cross into each other's registers.
2009-07-08 11:39:34 -07:00
Corbin Simpson 1aa38b2c2d r300-gallium: Mipmap setup.
(cherry picked from commit 88c01a15da5639dd68a6a0133724994cb66f1316)
2009-07-08 11:30:59 -07:00
Corbin Simpson e46d12d394 r300g: Add endian fix to vertex fetcher setup.
As reported and initially tested by MrCooper.
2009-07-08 11:27:26 -07:00
Corbin Simpson ce0f7954f8 gallium: Add endian detection to p_config. 2009-07-08 11:26:52 -07:00
Maciej Cencora 186d187ff7 r300: fix regression introduced by ca13937ef9
Stride == 0 means that we value for first vertex should be copied to every other vertices (e.g. constant color).

This fixes glean/vertProg1 and sauerbraten with enabled shaders.
2009-07-08 18:42:39 +02:00
Maciej Cencora 95df7bfc03 radeon: fix copy and paste typo 2009-07-08 18:42:39 +02:00
Maciej Cencora afd687b0dc mesa/vbo: always recalculate min_index and max_index when splitting vertices 2009-07-08 18:42:39 +02:00
Jakob Bornecrantz eb33c0ab8b progs/tests: Use compressed texture in mipmap_comp_tests 2009-07-04 16:01:45 +02:00
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