summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* glsl: added slang_operation_insert_child()Brian Paul2009-06-262-0/+23
|
* glsl: use slang_generate_declaration() to consolidate some codeBrian Paul2009-06-261-31/+37
|
* glsl: remove obsolete commentBrian Paul2009-06-261-3/+0
|
* st/mesa: query PIPE_CAP_TGSI_CONT_SUPPORTEDBrian Paul2009-06-261-0/+5
|
* glsl: implement _slang_gen_while_without_continue()Brian Paul2009-06-261-82/+115
|
* glsl: fix a bug involving 'continue' in 'for' loopsBrian Paul2009-06-262-23/+44
| | | | | | | | Need to execute the for loop's increment code before we continue. Add a slang_assemble_ctx::CurLoopOper field to keep track of the containing loop and avoid the "cont if true" path in this situation. Plus, assorted clean-ups.
* glsl: added slang_oper_child_const()Brian Paul2009-06-261-0/+8
|
* glsl: use _slang_loop_contains_continue_or_break() to check for unrollingBrian Paul2009-06-261-5/+36
| | | | The previous test failed for nested loops.
* glsl: use new _slang_loop_contains_continue() helper functionBrian Paul2009-06-261-5/+126
|
* glsl: implement continue->break translation for do-while loopsBrian Paul2009-06-261-15/+219
|
* glsl: added slang_operation_literal_int/bool() helper functionsBrian Paul2009-06-261-0/+26
|
* glsl: don't allocate 0-length children array in slang_operation_copy()Brian Paul2009-06-261-6/+7
|
* glsl: remove debug code, misc clean-upBrian Paul2009-06-261-5/+0
|
* glsl: implement continue->break transformation for for-loopsBrian Paul2009-06-261-3/+167
|
* glsl: added slang_operation_add_children() and slang_oper_child() helpersBrian Paul2009-06-262-0/+25
|
* glsl: added slang_assemble_ctx::EmitContReturn field, initBrian Paul2009-06-262-0/+4
|
* glsl: don't unroll loops containing continue/breakBrian Paul2009-06-261-0/+6
| | | | Just search the AST in _slang_can_unroll_for_loop().
* Revert "slang: if/else/break & if/else/continue work for unrolled loops"Brian Paul2009-06-262-38/+7
| | | | | | | | | | | We should just check if the loop contains a continue/break in the _slang_can_unroll_for_loop() test function... This reverts commit 989856bde47d699d7e18798df4013fbf962e1d4b. Conflicts: src/mesa/shader/slang/slang_codegen.h
* glsl: Added gl_shader_state::EmitContReturn fieldBrian Paul2009-06-262-0/+2
| | | | | | | This is the start of a glsl-continue-return feature branch to support a GLSL code generator option for 'continue' and 'return' statements. Some targets don't support CONT or RET statements so we'll need to try to generate code that does not use them...
* i965: handle OPCODE_SWZ in the glsl pathRoland Scheidegger2009-06-221-0/+1
| | | | | | | glsl compiler will not generate OPCODE_SWZ, and as a first step it would be translated away to a MOV anyway (why?), but later internally this opcode is generated (for EXT_texture_swizzling). (cherry picked from commit 4ef1f8e3b52a06fcf58f78c9c36738531b91dbac)
* intel: intel_texture_drawpixels() can't handle GL_DEPTH_STENCIL.Michel Dänzer2009-06-221-1/+1
| | | | | Fixes glean depthStencil test. (cherry picked from commit 3885b708fdbb7bbd5dd3a247c41fb9a75ee7c057)
* i965: added intelFlush() call in intel_get_tex_image()Brian Paul2009-06-221-0/+6
| | | | | Fixes the render-to-texture test in progs/tests/getteximage.c (cherry picked from commit a03b349153660e449daf4f56d750f1caef23b1a5)
* mesa: s/MAX_VERTEX_PROGRAM_ATTRIBS/MAX_NV_VERTEX_PROGRAM_INPUTS/ in NV funcsBrian Paul2009-06-221-8/+8
| | | | (cherry picked from commit 4dc426c01627a240bd5b148c1804c45b0d5ecd6c)
* mesa: rename MAX_VERTEX_ATTRIBS to MAX_VERTEX_GENERIC_ATTRIBSBrian Paul2009-06-227-40/+40
| | | | | | Be clearer that this is the number of generic vertex program/shader attributes, not counting the legacy attributes (pos, normal, color, etc). (cherry picked from commit 4a95185c9f30c2de7a03bb1a0653f51b53b1111d)
* mesa: s/MAX_VERTEX_PROGRAM_ATTRIBS/MAX_NV_VERTEX_PROGRAM_INPUTSBrian Paul2009-06-221-1/+1
| | | | (cherry picked from commit d2a74d76c96957cf0294dcf40d29526621ada95e)
* mesa: fix some potential state-restore issues in pop_texture_group()Brian Paul2009-06-221-45/+45
| | | | | | | Call the _mesa_set_enable() functions instead of driver functions, etc. Also, add missing code for 1D/2D texture arrays. (cherry picked from commit aac19609bfd7c950b2577489b06886c8a8097bb2)
* vbo: return VP_NONE from get_program_mode() if running fixed-func vertex programBrian Paul2009-06-221-0/+2
| | | | | | | | If we're running a vertex program to emulated fixed-function, we still need to treat vertex arrays/attributes as if we're in fixed-function mode. This should probably be back-ported to Mesa 7.5 after a bit more testing. (cherry picked from commit dda82137d28aba846dda73da230871c115e30aaf)
* mesa: create/use a fallback texture when bound texture is incompleteBrian Paul2009-06-224-2/+66
| | | | | | | | | | | | | | | When a GLSL sampler reads from an incomplete texture it should return (0,0,0,1). Instead of jumping through hoops in all the drivers to make this happen, just create/install a fallback texture with those texel values. Fixes piglit/fp-incomplete-tex on i965 and more importantly, fixes some GPU lockups when trying to sample from missing surfaces. If a binding table entry is NULL, it seems that sampling sometimes works, but not always (lockup). Todo: create a fallback texture for each type of texture target? (cherry picked from commit 3f25219c7bf0f090502489928f0f018e62c4f6cf)
* intel: Fix other metaops versus GL_COMPILE_AND_EXECUTE dlists.Eric Anholt2009-06-192-3/+3
| | | | | | Fixes oglconform zbfunc.c and pxtrans-cidraw.c, at least. (cherry picked from commit 405300bb190f516e16b704050abe3389b366ed27)
* intel: Fix glClear behavior versus display lists.Eric Anholt2009-06-191-1/+1
| | | | | | | The CALL_DrawArrays was leaking the clear's primitives into the display list with GL_COMPILE_AND_EXECUTE. Use _mesa_DrawArrays instead, which doesn't appear to leak. Fixes piglit dlist-clear test. (cherry picked from commit 64edde1004f7a69e77877bba24d315a92bcd47c8)
* radeons: use dp4 for position invariant vertex programsRoland Scheidegger2009-06-193-0/+6
| | | | | | | | Fixes #22181. R200 requires this since DP4 is used in hw tnl mode. R300 prefers it (should be faster due to no instruction dependencies), but both methods should be correct (when sw tcl is used though, MUL/MAD might be faster). Probably doesn't make much difference for R100 since vertex progs are executed in software anyway, but let's just keep it the same there too.
* Always free image offsets memory when re-initializing texture image fields.Michel Dänzer2009-06-193-6/+2
| | | | Fixes leak running compiz with direct rendering.
* 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)