summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: implement blit-based path for glCopyPixelsBrian Paul2011-02-171-0/+114
| | | | | If doing a simple non-overlapping glCopyPixels with no per-fragment ops we can use pipe_context::resource_copy_region().
* st/mesa: indentation fixBrian Paul2011-02-171-1/+1
|
* st/mesa: fix incorrect glCopyPixels position on fallback pathBrian Paul2011-02-171-3/+4
| | | | | | | | | If we hit the pipe_get/put_tile() path for setting up the glCopyPixels texture we were passing the wrong x/y position to pipe_get_tile(). The x/y position was already accounted for in the pipe_get_transfer() call so we were effectively reading from 2*readX, 2*readY. NOTE: This is a candidate for the 7.9 and 7.10 branches.
* st/mesa: remove unused screen variablesBrian Paul2011-02-171-2/+0
|
* mesa: Remove the DXT compression via blit path.José Fonseca2011-02-162-157/+1
| | | | No longer used.
* gallium: add usage parameter to pipe_buffer_createMarek Olšák2011-02-155-6/+31
| | | | | And set a reasonable buffer usage flag everywhere instead of just PIPE_USAGE_DEFAULT.
* st/mesa: fix compressed mipmap generation.Dave Airlie2011-02-151-6/+4
| | | | | | | | | If the underlying transfer had a stride wider for hw alignment reasons, the mipmap generation would generate badly strided images. this fixes a few problems I found while testing r600g with s3tc Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: fix GLES buildMarek Olšák2011-02-151-1/+1
| | | | | | Broken since d5062fb3a315c46d77d5c954a3e3c14be1907d33. I wonder why this code is hidden behind #if by default.
* st/mesa: Use blend equation and function of first render target for all ↵Fabian Bieler2011-02-141-8/+11
| | | | | | | | | | | render targets if ARB_draw_buffers_blend is not supported If EXT_draw_buffers2 is supported but ARB_draw_buffers_blend isn't _mesa_BlendFuncSeparateEXT only sets up the blend equation and function for the first render target. This patch makes sure that update_blend doesn't try to use the data from other rendertargets in such cases. Signed-off-by: Brian Paul <[email protected]>
* gallium: notify drivers about possible changes in user buffer contentsMarek Olšák2011-02-143-0/+48
| | | | Also implement the redefine_user_buffer hook in the drivers.
* st/mesa: set vertex arrays state only when necessaryMarek Olšák2011-02-141-182/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | The vertex arrays state should be set only when (_NEW_ARRAY | _NEW_PROGRAM) is dirty. This assumes user buffer content is mutable, which will be sorted out in the next commit. The following usage case should be much faster now: for (i = 0; i < 1000; i++) { glDrawElements(...); } Or even: for (i = 0; i < 1000; i++) { glSomeStateChangeOtherThanArraysOrProgram(...); glDrawElements(...); } The performance increase from this may be significant in some apps and negligible in others. It is especially noticable in the Torcs game (r300g): Before: 15.4 fps After: 20 fps Also less looping over attribs in st_draw_vbo yields slight speed-up in apps with lots of glDraw* calls.
* gallium: remove pipe_vertex_buffer::max_indexMarek Olšák2011-02-142-6/+0
| | | | | This is redundant to pipe_draw_info::max_index and doesn't really fit in the optimizations I plan.
* gallium: always save and restore vertex buffers using cso_cacheMarek Olšák2011-02-145-4/+13
|
* st/mesa: Fix surfaceless opengl with non-dummy contextsBenjamin Franzke2011-02-111-10/+5
| | | | | | | main/context.c:check_complatible() detecs an incomplete framebuffer using its pointer, so do not copy it. This should fix https://bugs.freedesktop.org/show_bug.cgi?id=34042
* st/mesa: allow rendering to sRGB textures if EXT_fb_srgb is unsupportedMarek Olšák2011-02-111-5/+24
| | | | | In this case, we always use the corresponding linear format in create_surface, therefore we should check for linear format support as well.
* mesa/st: enable GL_EXT_framebuffer_sRGBDave Airlie2011-02-103-3/+14
| | | | | | | | | If the formats don't match we need to update the surface with the new format. if we can render to SRGB formats, enable the extension Signed-off-by: Dave Airlie <[email protected]>
* mesa/st: Clean up vertex buffer unreferencingThomas Hellstrom2011-02-091-10/+9
| | | | | | | Avoid accessing draw module internal structures outside of the draw module. Unreference vertex buffers in error path. Signed-off-by: Thomas Hellstrom <[email protected]>
* mesa: remove _mesa_create_context_for_api()Brian Paul2011-02-081-1/+1
| | | | Just add the gl_api parameter to _mesa_create_context().
* st/mesa: fix shader deletion regressionBrian Paul2011-02-081-3/+4
| | | | | | | | | Fixes a regression from commit 5cbff0932e498f49b57cbb71037b93416bfe30e0. The problem is *some* glDrawPixels fragment programs need to be deleted, but not all. Use an explicit flag to indicate whether or not the program needs to be deleted. This should fix http://bugs.freedesktop.org/show_bug.cgi?id=34049
* mesa/st: Plug a fragment program variant parameter leakThomas Hellstrom2011-02-081-0/+2
| | | | | | | Fixes a minor memory leak with the "engine" mesa demo. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* st/mesa: free the temporary bitmap/drawpix shader codeBrian Paul2011-02-081-2/+10
| | | | | | | Fixes a per-shader memory leak when drawing glBitmaps, glDrawPixels or glCopyPixels. NOTE: This is a candidate for the 7.9 and 7.10 branches.
* mesa/st: Fix vertex buffer leakThomas Hellstrom2011-02-081-0/+1
| | | | | | | | | Make sure we unreference the vertex buffer pointers in a local array. This fixes huge vertex buffer / memory leaks in mesa demos "fire" and "engine". NOTE: This is a candidate for the 7.9 and 7.10 branches. Signed-off-by: Thomas Hellstrom <[email protected]>
* st/mesa: fix texture array dimensionsBrian Paul2011-01-283-18/+122
| | | | | | | | | | | | | For 1D/2D texture arrays use the pipe_resource::array_size field. In OpenGL 1D arrays texture use the height dimension as the array size and 2D array textures use the depth dimension as the array size. Gallium uses a special array_size field instead. When setting up gallium textures or comparing Mesa textures to gallium textures we need to be extra careful that we're comparing the right fields. The new st_gl_texture_dims_to_pipe_dims() function maps OpenGL texture dimensions to gallium texture dimensions and simplifies this quite a bit.
* st/mesa: pass layers param to st_texture_create()Brian Paul2011-01-287-4/+9
|
* st/mesa: support for 1D/2D texture arraysBrian Paul2011-01-253-5/+12
|
* st/mesa: add comments in emit_wpos()Brian Paul2011-01-251-0/+12
|
* st/mesa: fix incorrect fragcoord.x translationBrian Paul2011-01-251-4/+6
| | | | | | | | | emit_adjusted_wpos() needs separate x,y translation values. If we invert Y, we don't want to effect X. Part of the fix for http://bugs.freedesktop.org/show_bug.cgi?id=26795 NOTE: This is a candidate for the 7.9 and 7.10 branches.
* st/mesa: Enable EXT_texture_format_BGRA8888 for gles1/2Benjamin Franzke2011-01-241-0/+2
|
* st/mesa: support internalFormat=GL_BGRA in TexImage2DBenjamin Franzke2011-01-241-1/+10
|
* st/mesa: ensure that all pixel paths operation on linear RGB data, not sRGBBrian Paul2011-01-225-18/+39
| | | | | | | | | | | | Before, we were converting between linear/sRGB in glReadPixels, glDrawPixels, glAccum, etc if the renderbuffer was an sRGB texture. Those all need to operate on pixel values as-is without conversion. Also, when setting up render-to-texture, if the texture is sRGB the pipe_surface view must be linear RGB. This will change when we support GL_ARB_framebuffer_sRGB. This fixes http://bugs.freedesktop.org/show_bug.cgi?id=33353
* st/mesa: update comment, use st_fb_orientation()Brian Paul2011-01-221-6/+8
|
* st/mesa: comments in update_viewport()Brian Paul2011-01-221-0/+4
|
* st/mesa: clean up the sampler view format codeBrian Paul2011-01-201-7/+14
|
* st/mesa: formatting, whitespace fixesBrian Paul2011-01-202-17/+18
|
* st/mesa: move PIPE_CAP_INDEP_BLEND_FUNC codeBrian Paul2011-01-171-4/+4
|
* gallium: add EXT_texture_sRGB_decode.Dave Airlie2011-01-162-0/+5
| | | | | | This uses a sampler view to access the texture with the alternate format. Signed-off-by: Dave Airlie <[email protected]>
* mesa: begin implementation of GL_ARB_draw_buffers_blendBrian Paul2011-01-152-14/+25
|
* st/mesa: GL_ARB_instanced_arrays supportBrian Paul2011-01-152-3/+15
|
* st/mesa: move/consolidate an assignmentBrian Paul2011-01-151-2/+1
|
* Merge branch 'draw-instanced'Brian Paul2011-01-152-0/+31
|\ | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/draw/draw_llvm.c src/gallium/drivers/llvmpipe/lp_state_fs.c src/glsl/ir_set_program_inouts.cpp src/mesa/tnl/t_vb_program.c
| * st/mesa: translate shader system inputsBrian Paul2010-12-081-0/+27
| |
| * st/mesa: GL_ARB_draw_instanced depends on PIPE_CAP_INSTANCED_DRAWINGBrian Paul2010-12-051-0/+4
| |
* | st/mesa: fix a regression from cae2bb76Fredrik Höglund2011-01-131-2/+1
| | | | | | | | | | | | | | | | | | | | stObj->pt is null when a TFP texture is passed to st_finalize_texture, and with the changes introduced in the above commit this resulted in a new texture being created and the existing image being copied into it. NOTE: This is a candidate for the 7.10 branch. Reviewed-by: Alex Deucher <[email protected]>
* | st/mesa: add st_BeginQuery() case for GL_ANY_SAMPLES_PASSEDBrian Paul2011-01-121-0/+2
| | | | | | | | Fixes piglit occlusion_query2 failure.
* | st/mesa: Include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-0926-0/+26
| |
* | st/mesa: remove unused members in st_contextMarek Olšák2011-01-061-9/+0
| | | | | | | | What were these for?
* | st/mesa: optimize constant buffer uploadsMarek Olšák2011-01-064-34/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | The overhead of resource_create, transfer_inline_write, and resource_destroy to upload constant data is very visible with some apps in sysprof, and as such should be eliminated. My approach uses a user buffer to pass a pointer to a driver. This gives the driver the freedom it needs to take the fast path, which may differ for each driver. This commit addresses the same issue as Jakob's one that suballocates out of a big constant buffer, but it also eliminates the copy to the buffer.
* | st/mesa: do sanity checks on states only in debug buildsMarek Olšák2011-01-061-0/+4
| |
* | st/mesa: Include mtypes.h in st_cb_drawpixels.c.Vinson Lee2011-01-051-0/+1
| | | | | | | | Include mtypes.h for gl_context symbol.
* | st/mesa: advertise GL_ARB_half_float_pixelMarek Olšák2011-01-041-0/+1
| | | | | | | | This extension doesn't appear to need any driver-specific parts.