summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* mesa/st: don't reuse vertex buffers for bitmap, clear quadsKeith Whitwell2009-10-022-2/+24
| | | | | | | | | | Currently using max_slots > 1 will cause synchronous rendering if the driver flushes its command buffers between one bitmap and the next. Need to improve buffer_write to allow NO_WAIT (as well as no_flush) updates to buffers where we know there is no conflict with previous data.
* gallium: Preparations for adding more PIPE_TRANSFER_* usage flags.Michel Dänzer2009-10-022-3/+2
| | | | | | Always test for PIPE_TRANSFER_READ/WRITE using the bit-wise and operator, and add a pipe_transfer_buffer_flags() helper for getting the buffer usage flags corresponding to them.
* gallium: remove depth.occlusion_count flagKeith Whitwell2009-10-011-4/+0
| | | | | | | This was redundant as drivers can just keep track of whether they are inside a begin/end query pair. We want to add more query types later and also support nested queries, none of which map well onto a flag like this. No driver appeared to be using the flag.
* st/mesa: fix non-mipmap lastLevel calculation.Cooper Yuan2009-10-011-1/+5
| | | | reviewed by Brian Paul.
* mesa/main: New feature FEATURE_queryobj.Chia-I Wu2009-09-301-1/+1
| | | | | It merges FEATURE_ARB_occlusion_query and FEATURE_EXT_timer_query, and follows the feature conventions.
* st/mesa: check gl_texture_object::GenerateMipmap field when allocating texmemBrian Paul2009-09-281-0/+3
| | | | | In guess_and_alloc_texture() use the gl_texture_object::GenerateMipmap field as another hint as to whether to allocate space for a whole mipmap.
* Merge branch 'mesa_7_6_branch'Brian Paul2009-09-282-55/+89
|\
| * Merge branch 'mesa_7_5_branch' into mesa_7_6_branchBrian Paul2009-09-282-55/+89
| |\
| | * st/mesa: fix st_generate_mipmap() issuesBrian Paul2009-09-281-2/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | The main issue is we didn't always have a gallium texture object with enough space to store the to-be-generated mipmap levels. When that's the case, allocate a new gallium texture and use st_texure_finalize() to copy images from the old texture to the new one. We also had the baseLevel parameter to st_render_mipmap() wrong.
| | * st/mesa: fix/simplify st_texture_object::lastLevel calculationBrian Paul2009-09-281-53/+9
| | | | | | | | | | | | | | | | | | | | | Don't compute the st_texture_object::lastLevel field based on the texture filters. Use the _MaxLevel value that core Mesa computes for us. When called from the GenerateMipmap path, we'll use the lastLevel field as-is.
* | | Merge branch 'mesa_7_6_branch'Brian Paul2009-09-241-3/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/drivers/dri/r600/r700_assembler.c src/mesa/drivers/dri/r600/r700_chip.c src/mesa/drivers/dri/r600/r700_render.c src/mesa/drivers/dri/r600/r700_vertprog.c src/mesa/drivers/dri/r600/r700_vertprog.h src/mesa/drivers/dri/radeon/radeon_span.c
| * | Merge branch 'mesa_7_5_branch' into mesa_7_6_branchBrian Paul2009-09-241-3/+9
| |\|
| | * st/mesa: trim calculated userbuffer sizeKeith Whitwell2009-09-231-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In get_array_bounds we were previously defining a user buffer sized as (nr_vertices * stride). The trouble is that if the vertex data occupies less than stride bytes, the extra tailing (stride - size) bytes may extend outside the memory actually allocated by the app and caused a segfault. To fix this, define a the buffer bounds to be: ptr .. ptr + (nr-1)*stride + element_size
* | | mesa: Ensure TGSI tokens are freed with gallium's free.José Fonseca2009-09-214-5/+20
| | | | | | | | | | | | To avoid breaking the gallium's builtin malloc debugging.
* | | Merge branch 'mesa_7_6_branch'Brian Paul2009-09-203-8/+29
|\| | | | | | | | | | | | | | Conflicts: src/mesa/drivers/dri/intel/intel_clear.c
| * | Merge branch 'mesa_7_5_branch' into mesa_7_6_branchNicolai Hähnle2009-09-202-5/+14
| |\|
| | * mesa/st: Initialize format bits of framebuffer renderbuffersNicolai Hähnle2009-09-201-0/+1
| | | | | | | | | | | | Signed-off-by: Nicolai Hähnle <[email protected]>
| | * st/mesa: fix some incorrect branching/clean-up code in TexImage functionsBrian Paul2009-09-161-3/+3
| | | | | | | | | | | | | | | We need to be sure to call the _mesa_unmap_teximage_pbo() function if we called _mesa_validate_pbo_teximage().
| | * st/mesa: fix texture memory allocation bugBrian Paul2009-09-161-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following example caused an incorrect GL_OUT_OF_MEMORY error to be raised in glTexSubImage2D: glTexImage2D(level=0, width=32, height=32, pixels=NULL); glTexImage2D(level=0, width=64, height=64, pixels=NULL); glTexSubImage2D(level=0, pixels!=NULL); The second glTexImage2D() call needs to cause the first image to be deallocated then reallocated at the new size. This was not happening because we were testing for pixels==NULL too early.
| | * 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-021-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.
| | * st/mesa: flush bitmap cache if Z value changesBrian Paul2009-08-211-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]>
| * | mesa/st: Create front renderbuffer on the fly when supplied with a surfaceNicolai Hähnle2009-09-201-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally, the mesa/st would create a fake front buffer out of a client-allocated surface. In the DRI setting, however, st/dri provides a front buffer surface which is created and maintained by the X server. Prefer to use this surface instead, so that front buffer rendering and reading works correctly. Signed-off-by: Nicolai Hähnle <[email protected]>
* | | mesa: Allow BlitFramebuffer from a texture.José Fonseca2009-09-191-11/+45
| | | | | | | | | | | | | | | Although GL_EXT_framebuffer_blit does not mention textures, it doesn't forbid them either, and some thirdparty driver appear to support this.
* | | mesa: move generate mipmap callsBrian Paul2009-09-151-12/+0
| | | | | | | | | | | | | | | | | | Per the suggestion in the Intel driver, move the calls to ctx->Driver.GenerateMipmap() into core Mesa so that drivers don't have to worry about it.
* | | st/mesa: disable accidentally committed _mesa_print_program() callBrian Paul2009-09-151-1/+1
| | |
* | | st/mesa: minor whitespace, comment clean-upsBrian Paul2009-09-141-21/+9
| | |
* | | mesa/st: remove dead commentKeith Whitwell2009-09-141-7/+0
| | |
* | | st/mesa: convert to new tgsi_ureg mechanism for shader emitKeith Whitwell2009-09-143-983/+625
| | | | | | | | | | | | | | | | | | | | | | | | | | | Should be easier to read and work with than the older ways of emitting TGSI tokens. Also, emit simpler TGSI than previously: - translate away source and dest extended modifiers - translate away the SWZ opcode
* | | mesa: remove unused SATURATE_PLUS_MINUS_ONE flagKeith Whitwell2009-09-121-2/+0
| | | | | | | | | | | | Never set in mesa. Remove from tgsi translation as well.
* | | st/mesa: use st_context() helperBrian Paul2009-09-101-17/+17
|/ /
* | 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
| | |