summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
AgeCommit message (Collapse)Author
2009-09-27mesa: change _mesa_format_to_type_and_comps() format parameter typeBrian Paul
2009-09-27mesa: use texture format functionsBrian Paul
2009-09-27st/mesa: use _mesa_get_texstore_func()Brian Paul
2009-09-27st/mesa: use _mesa_get_texstore_func()Brian Paul
2009-09-24Merge branch 'mesa_7_6_branch'Brian Paul
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
2009-09-24Merge branch 'mesa_7_5_branch' into mesa_7_6_branchBrian Paul
2009-09-23st/mesa: trim calculated userbuffer sizeKeith Whitwell
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
2009-09-21mesa: Ensure TGSI tokens are freed with gallium's free.José Fonseca
To avoid breaking the gallium's builtin malloc debugging.
2009-09-20Merge branch 'mesa_7_6_branch'Brian Paul
Conflicts: src/mesa/drivers/dri/intel/intel_clear.c
2009-09-20Merge branch 'mesa_7_5_branch' into mesa_7_6_branchNicolai Hähnle
2009-09-20mesa/st: Create front renderbuffer on the fly when supplied with a surfaceNicolai Hähnle
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 <nhaehnle@gmail.com>
2009-09-20mesa/st: Initialize format bits of framebuffer renderbuffersNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-09-19mesa: Allow BlitFramebuffer from a texture.José Fonseca
Although GL_EXT_framebuffer_blit does not mention textures, it doesn't forbid them either, and some thirdparty driver appear to support this.
2009-09-16st/mesa: fix some incorrect branching/clean-up code in TexImage functionsBrian Paul
We need to be sure to call the _mesa_unmap_teximage_pbo() function if we called _mesa_validate_pbo_teximage().
2009-09-16st/mesa: fix texture memory allocation bugBrian Paul
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.
2009-09-15mesa: move generate mipmap callsBrian Paul
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.
2009-09-15st/mesa: disable accidentally committed _mesa_print_program() callBrian Paul
2009-09-14st/mesa: minor whitespace, comment clean-upsBrian Paul
2009-09-14mesa/st: remove dead commentKeith Whitwell
2009-09-14st/mesa: convert to new tgsi_ureg mechanism for shader emitKeith Whitwell
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
2009-09-12mesa: remove unused SATURATE_PLUS_MINUS_ONE flagKeith Whitwell
Never set in mesa. Remove from tgsi translation as well.
2009-09-10st/mesa: use st_context() helperBrian Paul
2009-09-03st/mesa: silence uninitialized var warningsBrian Paul
2009-09-03st/mesa: fix glCopyPixels(GL_STENCIL_INDEX) inverted positionBrian Paul
If the renderbuffer orientation is Y=0=TOP we need to invert the dstY position.
2009-09-03st/mesa: Do GL_RGBA->GL_RGB texsubimage on hardwareKeith Whitwell
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.
2009-09-03st/mesa: silence uninitialized var warningsBrian Paul
2009-09-03st/mesa: fix glCopyPixels(GL_STENCIL_INDEX) inverted positionBrian Paul
If the renderbuffer orientation is Y=0=TOP we need to invert the dstY position.
2009-09-03mesa: consolidate PBO map/unmap helpersBrian Paul
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().
2009-09-03mesa: change ctx->Driver.BufferData() to return GLboolean for success/failureBrian Paul
Return GL_FALSE if we failed to allocate the buffer. Then raise GL_OUT_OF_MEMORY in core Mesa.
2009-09-02st/mesa: Do GL_RGBA->GL_RGB texsubimage on hardwareKeith Whitwell
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.
2009-09-01st/mesa: use new _mesa_expand_bitmap() functionBrian Paul
2009-08-31st/mesa: fix obj->Pointer offset in st_bufferobj_map_range()Brian Paul
This fixes a bunch of gallium regressions since commit 8096aa521369c3bcf5226c060efa6dd06e48ddc8
2009-08-24st/mesa: flush bitmap cache if Z value changesBrian Paul
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 <justin.dou@intel.com>
2009-08-21st/mesa: flush bitmap cache if Z value changesBrian Paul
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 <justin.dou@intel.com>
2009-08-19gallium: rename copy/fill_rect utility functionsBrian Paul
2009-08-12Merge branch 'new-frag-attribs'Brian Paul
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.
2009-08-12vbo: Avoid extra validation of DrawElements.Eric Anholt
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.
2009-08-07st/mesa: remove redundant calls to _mesa_set_vp_override()Brian Paul
Called from core Mesa now.
2009-08-05mesa/st: Add support for binding pipe surface to texture.Chia-I Wu
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 <olvaffe@gmail.com>
2009-08-05Merge branch 'mesa_7_5_branch'Brian Paul
Conflicts: src/mesa/main/state.c
2009-08-05st/mesa: implement BlitFramebuffer() for depth/stencil (incomplete)Brian Paul
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.
2009-08-05st/mesa: fix Y inversion and optimize st_BlitFramebuffer()Brian Paul
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.
2009-08-03st/mesa: we don't support GL_NV_point_sprite (see comment)Brian Paul
2009-08-01mesa st: Use POT texture for draw pixels operations if NPOT texture is not ↵Patrice Mandin
supported
2009-08-01mesa st: Move logbase2 function to util/u_math.hPatrice Mandin
2009-07-31Rename TGSI LOOP instruction to better match theri usage.Michal Krol
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.
2009-07-30Merge branch 'mesa_7_5_branch'Brian Paul
2009-07-30mesa st: Change the preferred internal format for some RGB formats.Thomas Hellstrom
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 <thellstrom@vmware.com>
2009-07-30mesa st: Report unsupported render-to-texture formats.Thomas Hellstrom
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 <thellstrom@vmware.com>
2009-07-29mesa: add new FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC fragment program inputsBrian Paul
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...