summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: support GL_EXT_stencil_two_side in gallium/mesa state trackerBrian Paul2009-02-192-25/+28
| | | | | | | | Since Ian's patch of a few weeks ago, we can enable all three variations of two-sided stencil. Update the state tracker to handle the extra back- face state and turn on the EXT. Note: there's a new Glean test for two-sided stencil now...
* mesa: fix/update/restore comments related to two-sided stencilBrian Paul2009-02-192-2/+19
|
* mesa: initialize ctx->Stencil._BackFace = 1Brian Paul2009-02-191-0/+1
| | | | | | Back-face stencil operations didn't work correctly because this value was zero. It needs to be 1 or 2. The only place it's set otherwise is in glEnable/Disable(GL_STENCIL_TEST_TWO_SIDE_EXT).
* mesa: Free the util shaders with the gallium's FREE.José Fonseca2009-02-193-3/+4
|
* mesa: convert VERT_RESULT_* from #defines to enum, like the othersBrian Paul2009-02-181-21/+24
|
* glsl: asst improvements, clean-ups in set_program_uniform()Brian Paul2009-02-181-27/+36
| | | | | | Move the is_boolean/integer_type() calls out of the loops. Move the is_sampler_type() function near the bool/int functions. Add a bunch of comments.
* glsl: fix inequality in set_program_uniform()Brian Paul2009-02-181-1/+1
| | | | We were off by one when checking for too many uniform values.
* glsl: fix link failure for variable-indexed varying output arraysBrian Paul2009-02-181-0/+25
| | | | | | | | | | | | | | | If the vertex shader writes to a varying array with a variable index, mark all the elements of that array as being written. For example, if the vertex shader does: for (i = 0; i < 4; i++) gl_TexCoord[i] = expr; Mark all texcoord outputs as being written, not just the first. Linking will fail if a fragment shader tries to read an input that's not written by the vertex shader. Before this fix, this linker test could fail.
* swrast: Set vp_override flag during DrawPixelsNicolai Haehnle2009-02-181-0/+11
| | | | | | | | | Obviously, the color of fragments produced by DrawPixels is not constant, even if the current vertex array / vertex program state indicates that the color for normal rendering will be constant. Therefore, we need to override certain optimisations that have been added to texenvprogram.c Signed-off-by: Nicolai Haehnle <[email protected]>
* mesa: improved error msgBrian Paul2009-02-181-1/+2
|
* mesa: increase MAX_UNIFORMS to 1024 (of vec4 type)Brian Paul2009-02-183-5/+22
| | | | | | | | Old limit was 256. Note that no arrays are declared to this size. The only place we have to be careful about raising this limit is the prog_src/dst_register Index bitfields. These have been bumped up too. Added assertions to check we don't exceed the bitfield in the future too.
* glsl: fix a swizzle-related regressionBrian Paul2009-02-181-1/+1
| | | | This new issue was exposed by commit 6eabfc27f19a10dfc2663e99f9560966ba1ff697
* Merge branch 'gallium-texture-transfer'Michel Dänzer2009-02-1810-294/+314
|\ | | | | | | | | Conflicts: src/gallium/drivers/softpipe/sp_tile_cache.c
| * gallium: fix mergeKeith Whitwell2009-02-161-29/+5
| | | | | | | | | | It looks like I resolved the merge conflicts but did not save my emacs buffers before committing...
| * Merge branch 'master' into gallium-texture-transferKeith Whitwell2009-02-16258-11254/+12591
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/state_tracker/st_cb_accum.c src/mesa/state_tracker/st_cb_drawpixels.c
| * | gallium: Various coordinate fixups for texture transfers.Michel Dänzer2009-02-133-9/+9
| | | | | | | | | | | | Fixes glReadPixels, gl(Copy)TexSubImage, glCopyPixels.
| * | gallium: Fix GL_DEPTH CopyPixels tile coordinates.Michel Dänzer2009-02-121-1/+1
| | |
| * | gallium: Fix accumulation buffer tile coordinates.Michel Dänzer2009-02-121-5/+5
| | |
| * | gallium: No longer allow CPU mapping surfaces directly.Michel Dänzer2009-02-0510-291/+311
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead, a new pipe_transfer object has to be created and mapped for transferring data between the CPU and a texture. This gives the driver more flexibility for textures in address spaces that aren't CPU accessible. This is a first pass; softpipe/xlib builds and runs glxgears, but it only shows a black window. Looks like something's off related to the Z buffer, so the depth test always fails.
* | | util: Move p_debug.h into util module.José Fonseca2009-02-181-1/+1
| | | | | | | | | | | | | | | The debug functions depend on several util function for os abstractions, and these depend on debug functions, so a seperate module is not possible.
* | | mesa: add some debug code to help diagnose incomplete FBO attachments (disabled)Brian Paul2009-02-171-0/+27
| | |
* | | glsl: fix mistake in a commentBrian Paul2009-02-171-1/+1
| | |
* | | mesa: turn on reporting of GLSL version 1.20Brian Paul2009-02-172-3/+3
| | | | | | | | | | | | | | | | | | The new array features, precision/invariant/centroid qualifiers, etc. were done a while back. The glGetString(GL_SHADING_LANGUAGE_VERSION) query returns "1.20" now (for drivers that support it anyway).
* | | glsl: fix an array indexing bugBrian Paul2009-02-171-10/+43
| | | | | | | | | | | | | | | This fixes a bug found with swizzled array indexes such as in "array[index.z]" where "index" is an ivec4.
* | | glsl: added --params option to stand-alone GLSL compilerBrian Paul2009-02-171-0/+8
| | | | | | | | | | | | Prints program parameter info
* | | mesa: when printing/dumping instruction, include relative addressing infoBrian Paul2009-02-171-13/+11
| | | | | | | | | | | | Not all cases were handled before.
* | | intel: Fix tri clear to do FBO color attachments as well.Eric Anholt2009-02-171-8/+25
| | | | | | | | | | | | | | | This is a 2% win in fbo_firecube, and would avoid a sw fallback for masked clears.
* | | i965: Fix fallback on stencil drawing to fbo when the visual lacks stencil.Eric Anholt2009-02-171-2/+2
| | | | | | | | | | | | Noticed this with the fbotexture demo.
* | | intel: Clean up several 965 memory leaks on context destroy.Eric Anholt2009-02-175-2/+8
| | |
* | | mesa: remove old comment as it's fixed elsewhere now.Alan Hourihane2009-02-171-9/+0
| |/ |/|
* | mesa: remove old commentsBrian Paul2009-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: the default value for EmitCondCodes is FALSE. This means the GLSL compiler will emit code like this: SEQ TEMP[0].x, A, B; IF TEMP[0].x; ... ENDIF But if EmitCondCodes is TRUE, condition codes will be used instead: SEQ.C TEMP[0].x, A, B; IF (NE.xxxx); ... ENDIF
* | i965: tell GLSL compiler to emit code using condition codesBrian Paul2009-02-161-0/+3
| | | | | | | | | | | | The default for EmitCondCodes got flipped when gallium-0.2 was merged. This fixes GLSL if/else/endif regressions. Drivers that use GLSL should always explicitly set the flag to be safe.
* | glsl: silence some uninit var warningsBrian Paul2009-02-162-2/+2
| |
* | r300: Redirect constant TEX coordinatesNicolai Haehnle2009-02-142-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | R3xx/R5xx fragment program texture constants must come from a hardware register instead of the constant file, so we redirect if necessary during the native rewrite phase. The symptoms of this bug started appearing when the Mesa fixed function texenvprogram code started using STATE_CURRENT_ATTRIB constants for texture coordinates when the corresponding attributes were constant across all vertices. Signed-off-by: Nicolai Haehnle <[email protected]>
* | i965: rewrite the code for handling shader subroutine callsBrian Paul2009-02-136-64/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the prog_instruction::Data field was used to map original Mesa instructions to brw instructions in order to resolve subroutine calls. This was a rather tangled mess. Plus it's an obstacle to implementing dynamic allocation/growing of the instruction buffer (it's still a fixed size). Mesa's GLSL compiler emits a label for each subroutine and CAL instruction. Now we use those labels to patch the subroutine calls after code generation has been done. We just keep a list of all CAL instructions that needs patching and a list of all subroutine labels. It's a simple matter to resolve them. This also consolidates some redundant post-emit code between brw_vs_emit.c and brw_wm_glsl.c and removes some loops that cleared the prog_instruction::Data fields at the end. Plus, a bunch of new comments.
* | i965: add missing break for OPCODE_RET caseBrian Paul2009-02-131-0/+1
| | | | | | | | This doesn't effect correctness, but we were emitting an extraneous ADD.
* | i965: the return value of translate_insn() is never used. Make it void.Brian Paul2009-02-131-4/+3
| |
* | i965: minor clean-upsBrian Paul2009-02-131-27/+26
| |
* | i965: code clean-ups, comments, and minor refactoringBrian Paul2009-02-132-37/+65
| |
* | i965: updated commentsBrian Paul2009-02-131-17/+37
| |
* | intel: turn on GL_ARB_shading_language_120Brian Paul2009-02-131-4/+0
| | | | | | | | | | It's done in the Mesa GLSL compiler. The only part of it that might matter in drivers is the centroid sampling option for MSAA.
* | i965: more reformatting/clean-upBrian Paul2009-02-131-12/+10
| |
* | i965: s/__inline/INLINE/Brian Paul2009-02-131-4/+4
| |
* | i965: formatting and indentation fixesBrian Paul2009-02-131-17/+16
| |
* | i965: fix inconsistant indentation in brw_wm.cBrian Paul2009-02-131-37/+39
| |
* | i965: Eric Anholt's patch for bumping up texture sizesRobert Ellison2009-02-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | I'm committing this because it fixes a conform failure; the failure occurs on the TextureProxy test, where the test attempts to create proxy textures at every level, but fails at the last level (border == 1, width == 1, height == 1) because it's beyond MAX_TEXTURE_LEVELS. Eric's original comment was: idr said that in his review swrast was ready for it, and the 965 driver is advertising it already though it has been resulting in many crashes due to arrays using these defines not being big enough.
* | mesa: check if TNL state is null in _tnl_free_vertices() to avoid potential ↵Brian Paul2009-02-131-21/+24
| | | | | | | | | | | | | | | | | | segfault _tnl_free_vertices() is called from several places during context tear-down. Depending on the order in which the swrast, swrast_setup and tnl context is destroyed we could hit a null pointer here. This doesn't seem to be an actual issue with any Mesa drivers, but let's be safe.
* | mesa: add additional texture size/limit assertionsBrian Paul2009-02-131-5/+13
| |
* | glDrawBuffers(n==0) is validRobert Ellison2009-02-121-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the GL spec, calling glDrawBuffers() with n == 0 is a valid operation (and essentially prevents drawing to any buffers). But _msa_DrawBuffersARB() was producing a GL_INVALID_VALUE error in this case. This fix adjusts the error check, and makes a small change to the ctx->Driver.DrawBuffer() call below to ensure that, if n == 0, Driver.DrawBuffer() is called with GL_NONE and that buffers[0] is *not* referenced in this case (since we don't know whether it is valid). Internal identifier: 365833
* | mesa: use new ST_CALLOC_STRUCT() macro in gallium state trackerBrian Paul2009-02-1212-15/+19
| |