aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: protect Elements against multiple definitionsKeith Whitwell2009-06-181-2/+2
| | | | Mesa and gallium both have a definition of this macro
* intel: remove extra \n from warning stringBrian Paul2009-06-171-1/+1
| | | | (cherry picked from commit 42e9bde0fa2276b8f5bb434328eea7665794b127)
* i965: fix 1D texture borders with GL_CLAMP_TO_BORDERRobert Ellison2009-06-171-0/+10
| | | | | | | | | | | | | | | With 1D textures, GL_TEXTURE_WRAP_T should be ignored (only GL_TEXTURE_WRAP_S should be respected). But the i965 hardware seems to follow the value of GL_TEXTURE_WRAP_T even when sampling 1D textures. This fix forces GL_TEXTURE_WRAP_T to be GL_REPEAT whenever 1D textures are used; this allows the texture to be sampled correctly, avoiding "imaginary" border elements in the T direction. This bug was demonstrated in the Piglit tex1d-2dborder test. With this fix, that test passes. (cherry picked from commit ab6c4fa582972e25f8800c77b5dd5b3a83afc996)
* i965: send all warnings through _mesa_warning()Robert Ellison2009-06-171-1/+1
| | | | | | | | | | | | One warning message: drm_i915_getparam: -22 was still being sent to fprintf(). This causes all Piglit tests to fail, even with MESA_DEBUG=0. Using _mesa_warning() to emit the message allows the general Mesa controls for messages like this to be applied. (cherry picked from commit bc3270e99f5c39544aaf831742db14796ab83a6a)
* i965: fix segfault on low memory conditionsRobert Ellison2009-06-171-0/+7
| | | | | | | | When out of memory (in at least one case, triggered by a longrunning memory leak), this code will segfault and crash. By checking for the out-of-memory condition, the system can continue, and will report the out-of-memory error later, a much preferable outcome. (cherry picked from commit 44a4abfd4f8695809eaec07df8eeb191d6e017d7)
* Fast path when rebinding the same texture in single context environmentIan Romanick2009-06-171-0/+12
| | | | | | If there is no shared context, there is no purpose in rebinding the same texture. In some artificial tests this improves performance 10% - 30%. (cherry picked from commit 7f8000db8bd45bb95bda4a4f8535c49b8ef74254)
* i915: Don't put VBOs in graphics memory unless required for an operation.Eric Anholt2009-06-172-1/+40
| | | | | | This saves doing swtnl from uncached memory, which is painful. Improves clutter test-text performance by 10% since it started using VBOs. (cherry picked from commit a945e203d4fe254593bc0c5c5d6caca45e65f9f7)
* i915: Fall back on NPOT textured metaops on 830-class.Eric Anholt2009-06-173-0/+30
| | | | (cherry picked from commit 8ec6e036792decf5149a209e51cb5e93ccc5c754)
* i915: Restore the Viewport and DepthRange functions on 8xx.Eric Anholt2009-06-171-0/+21
| | | | | | | | Fixes failed viewport updates on glxgears (and other apps) resize since e41780fedc2c1f22b43118da30a0103fa68b769f. Bug #20473. (cherry picked from commit 0e83e8f51af07a3066519f169f07d9afbf23252e)
* i956: Make state dependency of SF on drawbuffer bounds match Mesa's.Eric Anholt2009-06-171-2/+5
| | | | | | | Noticed while debugging a weird 1D FBO testcase that left its existing viewport and projection matrix in place when switching drawbuffers. Didn't fix the testcase, though. (cherry picked from commit 3a521d84ecc646fcc65fa3fe7c5f1fdbdebe8bc2)
* intel: Don't complain on falling back from PBO fastpaths.Eric Anholt2009-06-171-3/+3
| | | | | | | Instead, stash the debug info under the handy debug flag. Bug #20053 (cherry picked from commit 22690482e692cb5ed2f84d3e69545c09292e3484)
* mesa: Mark FBOs with compressed color attachments as FBO-incomplete.Eric Anholt2009-06-171-0/+5
| | | | | | | | | Both EXT_fbo and ARB_fbo agree on this. Fixes a segfault in the metaops mipmap generation in Intel for SGIS_generate_mipmap of S3TC textures in Regnum Online. Bug #21654. (cherry picked from commit 0307e609aa3e707eeb40051bd664d36f2340ba9b)
* i915: Use Stencil.Enabled instead of Stencil._Enabled in DrawBuffers.Eric Anholt2009-06-171-1/+1
| | | | | | | | | The _Enabled field isn't updated at the point that DrawBuffers is called, and the Driver.Enable() function does the testing for stencil buffer presence anyway. bug #21608 for Radeon (cherry picked from commit 4c6f82989983eecc0b3b724716cb3bcb675664c5)
* i915: Only use the new 945 cube layout for compressed textures.Eric Anholt2009-06-171-1/+4
| | | | | | | | | | The docs actually explain this, but not in a terribly clear manner. This nearly fixes the piglit cubemap testcase, except that something's going wrong with the nearest filtering at 2x2 sizes in the testcase. Looks good by visual inspection, though. Bug #21692 (cherry picked from commit 5c5a46884899ea25cdf25545d6ab3d9a74eafa3a)
* i965: Fix varying payload reg assignment for the non-GLSL-instructions path.Eric Anholt2009-06-171-8/+10
| | | | | I don't have a testcase for this, but it seems clearly wrong. (cherry picked from commit dc657f3929fbe03275b3fae4ef84f02e74b51114)
* i965: Fix register allocation of GLSL fp inputs.Eric Anholt2009-06-174-13/+27
| | | | | | | | | | | Before, if the VP output something that is in the attributes coming into the WM but which isn't used by the WM, then WM would end up reading subsequent varyings from the wrong places. This was visible with a GLSL demo using gl_PointSize in the VS and a varying in the WM, as point size is in the VUE but not used by the WM. There is now a regression test in piglit, glsl-unused-varying. (cherry picked from commit 0f5113deed91611ecdda6596542530b1849bb161)
* intel: Use FRONT_AND_BACK for StencilOp as well.Eric Anholt2009-06-171-1/+2
| | | | (cherry picked from commit 64980125c76b05501a6fe7fe20fe52438f459129)
* intel: Use GL_FRONT_AND_BACK for stencil clearing.Eric Anholt2009-06-171-1/+2
| | | | | | This comes from a radeon-rewrite fallback fix, but may also fix stencil clear failure when the polygon winding mode is flipped. (cherry picked from commit d866abeffc7e4a29736fa35fb8ac09c3a28a44d6)
* intel: Skip the DRI2 renderbuffer update when doing Viewport on an FBO.Eric Anholt2009-06-171-1/+1
| | | | (cherry picked from commit d4a42b0ce6455d03be70aa56aacd779be193aca4)
* intel: Map write-only buffer objects through the GTT when possible.Eric Anholt2009-06-172-2/+15
| | | | | | This looks to be a win of a few percent in cairogears with new vbo code, thanks to not polluting caches. (cherry picked from commit aa422b262509bc0763a50f63a51a1730139ea52f)
* mesa: rework viewport/scissor initialization codeBrian Paul2009-06-175-34/+38
| | | | | | | | | | The first time a context is bound to a drawable, the viewport and scissor bounds are initialized to the buffer's size. This is actually a bit tricky. A new _mesa_check_init_viewport() function is called in several places to check if the viewport has been initialized. We also use a new ctx->ViewportInitialized flag instead of the overloaded ctx->FirstTimeCurrent flag.
* mesa: added null ptr check in Fake_glXCreatePixmap()Brian Paul2009-06-171-1/+1
| | | | Fixes segfault in progs/xdemos/glxgears_pixmap.c
* GLX: attempt to fix glean makeCurrent test cases.Brian Paul2009-06-171-1/+5
| | | | | | | | | | | | | Two parts to this: One we don't keep pointers to possibly freed memory anymore once we unbind the drawables from the context. Brian I need to figure out what the comment you made there, can we get a glean/piglit test so we can fix it properly? If the new gc is the same as the oldGC, we call the unbind even though we just bound it in that function. doh. (cherry picked from master, commit 77506dac8e81e9548a7e9680ce367175fe5747af)
* i965: fix bugs in projective texture coordinatesBrian Paul2009-06-165-20/+54
| | | | | | | | | | | | | | | | | | | | | | | | For the TXP instruction we check if the texcoord is really a 4-component atttibute which requires the divide by W step. This check involved the projtex_mask field. However, the projtex_mask field was being miscalculated because of some confusion between vertex program outputs and fragment program inputs. 1. Rework the size_masks calculation so we correctly set bits corresponding to fragment program input attributes. 2. Rename projtex_mask to proj_attrib_mask since we're interested in more than just texcoords (generic varying vars too). 3. Simply the indexing of the size_masks and proj_attrib_mask fields. 4. The tracker::active[] array was mis-dimensioned. Use MAX_PROGRAM_TEMPS instead of a magic number. 5. Update comments, add new assertions. With these changes the Lightsmark demo/benchmark renders correctly, until we eventually hit a GPU lockup...
* mesa: fix incorrect viewport clamping in _mesa_set_viewport()Brian Paul2009-06-161-2/+2
| | | | | A 0 by 0 viewport size is legal. Don't clamp against lower bound of one. The error checking earlier in the function prevents negative values.
* mesa: fix REMAINDER() macroBrian Paul2009-06-161-1/+1
| | | | | The results were incorrect for some negative values of A. See bug 21872.
* intel: Release fb backing regions in intelDestroyBuffer()Shuang He2009-06-151-0/+24
| | | | Fixes memory leak when destroying framebuffers.
* mesa: Always return a value.José Fonseca2009-06-151-0/+1
|
* mesa: Use appropriate float/integer types.José Fonseca2009-06-152-3/+3
|
* mesa: Use type modifier for float constants.José Fonseca2009-06-153-21/+21
|
* mesa: Use integer type with appropriate sign.José Fonseca2009-06-152-4/+4
|
* mesa: Enable uploads of only depth to z24s8 texturesJakob Bornecrantz2009-06-121-3/+36
|
* mesa: rework vertex shader output / fragment shader input attribute matchingBrian Paul2009-06-111-20/+33
| | | | | | | | | | | | | | | | | | | | Before, if a vertex shader's outputs didn't exactly match a fragment shader's inputs we could wind up with invalid TGSI shader declarations. For example: Before patch: DCL OUT[0], POSITION DCL OUT[1], COLOR[1] DCL OUT[2], GENERIC[0] DCL OUT[3], GENERIC[0] <- note duplicate [0] DCL OUT[4], GENERIC[2] After patch: DCL OUT[0], POSITION DCL OUT[1], COLOR[1] DCL OUT[2], GENERIC[0] DCL OUT[3], GENERIC[1] DCL OUT[4], GENERIC[2]
* mesa: add default function for ctx->Driver.CheckQuery() hookBrian Paul2009-06-113-1/+19
|
* mesa: Use new pf_is_depth_and_stencil inline.José Fonseca2009-06-111-16/+2
|
* mesa: Use PIPE_TEXTURE_USAGE_DEPTH_STENCIL for any depth or stencil format.José Fonseca2009-06-112-7/+11
|
* mesa: Remove dead code.José Fonseca2009-06-111-3/+0
|
* st/mesa: fix typo s/BFC0/BFC1/Brian Paul2009-06-111-2/+2
|
* vbo: fix assertion, #define IMM_BUFFER_NAMEBrian Paul2009-06-111-2/+7
| | | | | This was sometimes seen when Glean exited upon test failure when using Gallium.
* mesa: Only do read write when we don't have a depth value to writeJakob Bornecrantz2009-06-111-1/+1
|
* mesa: Take the format from the right structure.José Fonseca2009-06-111-1/+1
|
* meas: Use a read/write transfer when writing stencil component, but not ↵José Fonseca2009-06-111-2/+23
| | | | touching the depth component.
* mesa: Reverse s8z24 into z24s8 as required by EXT_packed_depth_stencil.José Fonseca2009-06-101-2/+7
| | | | | | Actually, after spotting this problem, I realized this is unreachable code. However don't bother to enable this fast path now, given the normal path is working just fine.
* mesa: Fix typo in bitmask.José Fonseca2009-06-101-1/+1
|
* mesa: Fix draw_stencil_pixels for PIPE_FORMAT_Z24S8_UNORM.José Fonseca2009-06-101-1/+1
| | | | | | | Reversed component order. This fixes glean depthStencil test failures for PIPE_FORMAT_Z24S8_UNORM visuals.
* glsl: fix warnings, update comments, s/TRUE/GL_TRUE/Brian Paul2009-06-101-3/+4
| | | | (cherry picked from master, commit 7fdd64ab29576e607434fb8c82ddfa61e8ea6aa8)
* glsl: Handle continuation characters in preprocessor.Brian Paul2009-06-101-1/+67
| | | | (cherry picked from master, commit cc22620e4b11425997f3bc1fc70f4c88cec22d2e)
* swrast: fix state validation bug for changing program constantsBrian Paul2009-06-101-0/+1
| | | | | | | Add _NEW_PROGRAM_CONSTANTS to _SWRAST_NEW_DERIVED. This makes sure that we update the fragment shader's constants when state vars (such as point size) changes. Fixes the progs/glsl/points.c demo.
* glsl: Fix symbol replacement handling in preprocessor.Brian Paul2009-06-101-13/+15
| | | | (cherry picked from master, commit d9617deb008b75f4a605a30408aeb1948139c33e)
* mesa: disable texture unit error check in _mesa_MatrixMode()Brian Paul2009-06-101-0/+10
| | | | See comments for details.