summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: silence uninitialized var warningsBrian Paul2009-09-031-2/+2
|
* st/mesa: fix glCopyPixels(GL_STENCIL_INDEX) inverted positionBrian Paul2009-09-031-0/+4
| | | | | If the renderbuffer orientation is Y=0=TOP we need to invert the dstY position.
* st/mesa: Do GL_RGBA->GL_RGB texsubimage on hardwareKeith Whitwell2009-09-031-14/+51
| | | | | | | | | | | | State tracker currently backs GL_RGB textures with RGBA almost always. This means we need to maintain A==1 in these textures to give correct GL_RGB sampling results. This change offloads the RGBA->RGB copy to hardware using the new writemask version of u_blit_pixels. More src/dstLogical/dstActual triples could be shifted to hardware by this technique in future patches.
* mesa: consolidate PBO map/unmap helpersBrian Paul2009-09-034-13/+13
| | | | | | | Instead of _mesa_map_readpix_pbo() use _mesa_map_pbo_source(). Instead of _mesa_map_drawpix_pbo() and _mesa_map_bitmap_pbo() use _mesa_map_pbo_dest().
* mesa: change ctx->Driver.BufferData() to return GLboolean for success/failureBrian Paul2009-09-031-4/+5
| | | | | Return GL_FALSE if we failed to allocate the buffer. Then raise GL_OUT_OF_MEMORY in core Mesa.
* st/mesa: use new _mesa_expand_bitmap() functionBrian Paul2009-09-011-57/+4
|
* st/mesa: fix obj->Pointer offset in st_bufferobj_map_range()Brian Paul2009-08-311-5/+5
| | | | | This fixes a bunch of gallium regressions since commit 8096aa521369c3bcf5226c060efa6dd06e48ddc8
* st/mesa: flush bitmap cache if Z value changesBrian Paul2009-08-241-5/+11
| | | | | | | When adding a new bitmap to the cache we have to check if the Z value is changing and flush first if it is. This is a modified version of a patch from Justin Dou <[email protected]>
* gallium: rename copy/fill_rect utility functionsBrian Paul2009-08-191-1/+1
|
* Merge branch 'new-frag-attribs'Brian Paul2009-08-123-66/+14
|\ | | | | | | | | | | | | This branch introduces new FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC fragment program inputs for GLSL gl_FrontFacing and gl_PointCoord. Before, these attributes were packed with the FOG attribute. That made things complicated elsewhere.
| * mesa: add new FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC fragment program inputsBrian Paul2009-07-293-66/+14
| | | | | | | | | | | | | | | | | | | | Previously, the FOGC attribute contained the fragment fog coord, front/back- face flag and the gl_PointCoord.xy values. Now each of those things are separate fragment program attributes. This simplifies quite a few things in Mesa and gallium. Need to test i965 driver and fix up point coord handling in the gallium/draw module...
* | vbo: Avoid extra validation of DrawElements.Eric Anholt2009-08-124-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | This saves mapping the index buffer to get a bounds on the indices that drivers just drop on the floor in the VBO case (cache win), saves a bonus walk of the indices in the CheckArrayBounds case, and other miscellaneous validation. On intel it's a particularly a large win (50-100% in my app) because even though we let the indices stay in both CPU and GPU caches, we still end up waiting for the GPU to be done with the buffer before reading from it. Drivers that want the min/max_index fields must now check index_bounds_valid and use vbo_get_minmax_index before using them.
* | st/mesa: remove redundant calls to _mesa_set_vp_override()Brian Paul2009-08-071-4/+2
| | | | | | | | Called from core Mesa now.
* | mesa/st: Add support for binding pipe surface to texture.Chia-I Wu2009-08-054-16/+107
| | | | | | | | | | | | | | This commit adds functions to bind a pipe surface to a texture. This allows texturing directly from the surface. Signed-off-by: Chia-I Wu <[email protected]>
* | Merge branch 'mesa_7_5_branch'Brian Paul2009-08-052-13/+88
|\ \ | | | | | | | | | | | | | | | Conflicts: src/mesa/main/state.c
| * | st/mesa: implement BlitFramebuffer() for depth/stencil (incomplete)Brian Paul2009-08-051-29/+80
| | | | | | | | | | | | | | | | | | We now handle the case of blitting Z+stencil to/from combined Z/stencil surfaces. But Z-only or stencil-only and separate depth/stencil surfaces are not yet implemented.
| * | st/mesa: fix Y inversion and optimize st_BlitFramebuffer()Brian Paul2009-08-051-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Need to check for Y inversion separately for src/dest buffers. If both the src and dest regions are upside down, make them right-side up for a better chance at a fast path. progs/tests/copypixrate -blit is much faster now.
| * | st/mesa: we don't support GL_NV_point_sprite (see comment)Brian Paul2009-08-031-1/+3
| | |
* | | mesa st: Use POT texture for draw pixels operations if NPOT texture is not ↵Patrice Mandin2009-08-011-10/+58
| | | | | | | | | | | | supported
* | | mesa st: Move logbase2 function to util/u_math.hPatrice Mandin2009-08-011-13/+4
| | |
* | | Rename TGSI LOOP instruction to better match theri usage.Michal Krol2009-07-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The LOOP/ENDLOOP pair is renamed to BGNFOR/ENDFOR as its behaviour is similar to a C language for-loop. The BGNLOOP2/ENDLOOP2 pair is renamed to BGNLOOP/ENDLOOP as now there is no name collision.
* | | Merge branch 'mesa_7_5_branch'Brian Paul2009-07-302-4/+32
|\| |
| * | mesa/st: short-circuit glFinish calls on WIN32 onlyKeith Whitwell2009-07-291-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows opengl32.dll calls glFinish prior to every swapbuffers, which makes it pretty hard to get decent performance... Work around by mapping finish to flush on PIPE_OS_WINDOWS. This is conformant, though it might confuse poorly-written benchmarks which attempt to measure a single event rather than figuring out the rate of continuous processing.
| * | mesa/st: recognize no-op scissor state when checking clear_with_quadsKeith Whitwell2009-07-291-4/+20
| | | | | | | | | | | | | | | Some apps enable scissor but set the rectangle to the dimensions of the window. Don't let this force us onto a slower clear path.
* | | mesa st: Change the preferred internal format for some RGB formats.Thomas Hellstrom2009-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | For GL_RGB5, GL_RGB4 and GL_R3_G3_B2, prefer PIPE_FORMAT_R5G6B5_UNORM over PIPE_FORMAT_A1R5G5B5_UNORM, since hardware is more likely to support the previous format for rendering. Signed-off-by: Thomas Hellstrom <[email protected]>
* | | mesa st: Report unsupported render-to-texture formats.Thomas Hellstrom2009-07-301-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | If a texture image is bound to a framebuffer for render-to-texture, but the hardware doesn't support rendering to its internal format, report the framebuffer as incomplete with FRAMEBUFFER_UNSUPPORTED. Signed-off-by: Thomas Hellstrom <[email protected]>
* | | gallium: fix SSE shadow texture instructionsBrian Paul2009-07-291-6/+0
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | When sampling a 2D shadow map we need 3 texcoord components, not 2. The third component (distance from light source) is compared against the texture sample to return the result (visible vs. occluded). Also, enable proper handling of TGSI_TEXTURE_SHADOW targets in Mesa->TGSI translation. There's a possibility for breakage in gallium drivers if they fail to handle the TGSI_TEXTURE_SHADOW1D / TGSI_TEXTURE_SHADOW2D / TGSI_TEXTURE_SHADOWRECT texture targets for TGSI_OPCODE_TEX/TXP instructions, but that should be easy to fix. With these changes, progs/demos/shadowtex.c renders properly again with softpipe.
* | Merge branch 'mesa_7_5_branch'Brian Paul2009-07-281-1/+2
|\| | | | | | | | | | | | | | | | | Conflicts: Makefile configs/default docs/relnotes.html src/mesa/main/version.h
| * st/mesa: silence warningBrian Paul2009-07-271-1/+2
| |
* | gallium: simplify tgsi_full_immediate structKeith Whitwell2009-07-221-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove the need to have a pointer in this struct by just including the immediate data inline. Having a pointer in the struct introduces complications like needing to alloc/free the data pointed to, uncertainty about who owns the data, etc. There doesn't seem to be a need for it, and it is unlikely to make much difference plus or minus to performance. Added some asserts as we now will trip up on immediates with more than four elements. There were actually already quite a few such asserts, but the >4 case could be used in the future to specify indexable immediate ranges, such as lookup tables.
* | Merge branch 'mesa_7_5_branch'Brian Paul2009-07-171-10/+13
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile progs/glsl/multitex.c src/mesa/main/enums.c src/mesa/main/state.c src/mesa/main/texenvprogram.c src/mesa/main/version.h
| * mesa: Fix logbase2.José Fonseca2009-07-161-7/+5
| | | | | | | | It was providing 1 too many for non power two values.
| * mesa: Report the true face number when flushing.José Fonseca2009-07-141-3/+8
| |
* | st/mesa: add some array index bounds assertionsBrian Paul2009-07-161-0/+5
| |
* | gallium: Define PIPE_CAP_BLEND_EQUATION_SEPARATE, remove extension from ↵Patrice Mandin2009-07-141-1/+4
| | | | | | | | default extension list
* | Merge branch 'mesa_7_5_branch'Brian Paul2009-07-132-1/+6
|\|
| * gallium: compare the actual register, not all the inputsZack Rusin2009-07-111-1/+1
| | | | | | | | otherwise we decrement indexes for all registers
| * st/mesa: implement indirect addressing for destination registersBrian Paul2009-07-101-0/+5
| |
* | Merge branch 'mesa_7_5_branch'Jakob Bornecrantz2009-07-051-3/+12
|\|
| * gallium: fixup register indexes for fog/frontface/point coordZack Rusin2009-07-071-3/+12
| |
* | Merge branch 'mesa_7_5_branch'Jakob Bornecrantz2009-07-046-36/+78
|\|
| * gallium: Fixes for clobbering stencil values in combined depth/stencil textures.Michel Dänzer2009-07-072-10/+37
| | | | | | | | | | Also fix one case where a 32 bit depth value was incorrectly converted to a combined depth/stencil value.
| * gallium: Only set FRONT_STATUS_COPY_OF_BACK if there is a back buffer.Michel Dänzer2009-07-071-1/+2
| | | | | | | | Fixes potential crash when SwapBuffers is called but there's no back buffer.
| * gallium: more fog extraction fixesZack Rusin2009-07-063-25/+39
| | | | | | | | | | fix the cases when fog coord/front face/point coord are used in the same shader.
* | Merge branch 'mesa_7_5_branch'Jakob Bornecrantz2009-07-035-5/+135
|\| | | | | | | | | | | Conflicts: src/mesa/main/dlist.c src/mesa/vbo/vbo_save_api.c
| * mesa: Assume depth textures have a single level unless told otherwise.José Fonseca2009-07-021-1/+3
| |
| * st/gl: Add stubs for CompressedTexSubImage[1D|3D]Jakob Bornecrantz2009-06-301-0/+27
| |
| * st/gl: Add support for glCompressedTexSubImageJakob Bornecrantz2009-06-301-0/+58
| |
| * mesa: Unbind depth/stencil surface from pipe_framebuffer when none is attached.José Fonseca2009-07-011-0/+2
| |
| * gallium: fix the front face semanticsZack Rusin2009-07-013-4/+45
| | | | | | | | | | | | | | | | mesa allocates both frontface and pointcoord registers within the fog coordinate register, by using swizzling. to make it cleaner and easier for drivers we want each of them in its own register. so when doing compilation from the mesa IR to tgsi allocate new registers for both and add new semantics to the respective declarations.