summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
AgeCommit message (Collapse)Author
2011-03-15st/mesa: use BITFIELD64_BIT() macro in a few more placesBrian Paul
2011-03-15gallium: add texture barrier support to the interface and st/mesa (v2)Marek Olšák
v2: change the gallium entry point to texture_barrier.
2011-03-15st/mesa: Make use of the new PIPE_TRANSFER_DISCARD_* for buffer object.Mathias Fröhlich
In memory mapping buffer objects make use of PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE and PIPE_TRANSFER_DISCARD_RANGE when appropriate. Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2011-03-12gallium: Delay the creation of simple helper shadersJakob Bornecrantz
2011-03-12u_blitter: Do blits in linear color space.Henri Verbeet
Blits between sRGB and linear formats should happen in linear color space. This fixes piglit fbo/fbo-srgb-blit.
2011-03-11gallium: remove flags from the flush functionMarek Olšák
The drivers have been changed so that they behave as if all of the flags were set. This is already implicit in most hardware drivers and required for multiple contexts. Some state trackers were also abusing the PIPE_FLUSH_RENDER_CACHE flag to decide whether flush_frontbuffer should be called. New flag ST_FLUSH_FRONT has been added to st_api.h as a replacement.
2011-03-11gallium: remove the geom_flags param from is_format_supportedMarek Olšák
2011-03-11gallium: cleanup fence_signalled and fence_finishMarek Olšák
So that they don't have the driver-specific param and return type.
2011-03-11st/mesa: remove unnecessary flushesMarek Olšák
The framebuffer cache flush should be implicit when calling set_framebuffer_state. There is no need to flush the command stream either.
2011-03-08gallium: add timeout parameter to fence_finishMarek Olšák
This is a follow-up to the ARB_sync patch for st/mesa and completes the ARB_sync implementation.
2011-03-08st/mesa: implement ARB_syncMarek Olšák
The ServerWaitSync implementation matches Intel's driver. The extension is advertised when pipe_screen::fence_finish is set.
2011-03-08st/mesa: cleanup checking for signed compressed formats in generate_mipmapsMarek Olšák
2011-03-08st/mesa: add LATC and 3DC supportMarek Olšák
softpipe passes all tests.
2011-03-08st/mesa: Fix an incorrect user vertex buffer referenceThomas Hellstrom
st->user_vb[attr] was always pointing to the same user vb, regardless of the value of attr. Together with reverting the temporary workaround for bug 34378, and a fix in the svga driver, this fixes googleearth on svga. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-03-07st/mesa: fail to alloc a renderbuffer if st_choose_renderbuffer_format failsMarek Olšák
This fixes: state_tracker/st_format.c:401:st_pipe_format_to_mesa_format: Assertion `0' failed.
2011-03-07st/mesa: fix incorrect version checking codeBrian Paul
2011-03-05gallium: split CAP_INSTANCE_DRAWING into INSTANCEID and INSTANCE_DIVISORMarek Olšák
ARB_instanced_arrays is a subset of D3D9. ARB_draw_instanced is a subset of D3D10. The point of this change is to allow D3D9-level drivers to enable ARB_instanced_arrays without ARB_draw_instanced.
2011-03-04st/mesa: set PIPE_BIND_RENDER_TARGET for sRGB formats if UNORM is supportedMarek Olšák
Because the format can be changed to UNORM in a surface. This fixes: state_tracker/st_atom_framebuffer.c:163:update_framebuffer_state: Assertion `framebuffer->cbufs[i]->texture->bind & (1 << 1)' failed.
2011-03-02mesa/st: fix softpipe npot compressed mipmaps.Dave Airlie
this fixes fbo-generatemipmap-formats rgtc and s3tc in NPOT mode with softpipe. r600g fails to even get level 0 correct so have to look into that a bit further. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-02mesa/st: fix generate mipmap for signed compressed formats.Dave Airlie
This was always converting to 8-bit per channel unsigned formats, which isn't suitable for RGTC signed formats, this special cases those two formats and converts to floats for those. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-02st/mesa: use RGTC for GL_COMPRESSED_RED/RG if possibleMarek Olšák
With proper fallback formats.
2011-03-01st/mesa: probably handle instanced drawingChristian König
Remove the previous workaround for instanced drawing and implement it correctly.
2011-02-28mesa: move PBO-related functions into a new fileBrian Paul
2011-02-28mesa/st: add RGTC format support.Dave Airlie
this just adds a format check + format conversion.
2011-02-28st/mesa & v_bug_mgr: two small instanced drawing fixesChristian König
2011-02-25gallium/st: place value check before value is useJerome Glisse
7.9 & 7.10 candidate Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2011-02-24st/mesa: treat 1D ARRAY upload like a depth or 2D array upload.Dave Airlie
This is because the HW doesn't always store a 1D array like a 2D texture, it more likely stores it like 2D texture (i.e. alignments etc). This means we upload each slice separately and let the driver work out where to put it. this might break nvc0 as I can't test it, I have only nv50 here. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-23st/mesa: fix computing the lowest address for interleaved attribsWiktor Janas
Ptr can be very well NULL, so when there are two arrays, with one having offset 0 (and thus NULL Ptr), and the other having a non-zero offset, the non-zero value is taken as minimum (because of !low_addr ? start ...). On 32-bit systems, this somehow works. On 64-bit systems, it leads to crashes. Signed-off-by: Marek Olšák <maraeo@gmail.com>
2011-02-20st/mesa: fix crash when using both user and vbo buffers with the same strideMarek Olšák
If two buffers had the same stride where one buffer is a user one and the other is a vbo, it was considered to be one interleaved buffer, resulting in incorrect rendering and crashes. This patch makes sure that the interleaved buffer is either user or vbo, not both.
2011-02-20st/mesa: fix crash when DrawBuffer->_ColorDrawBuffers[0] is NULLMarek Olšák
This fixes the game Tiny and Big.
2011-02-21st/mesa: need to translate clear color according to surface's base formatBrian Paul
When clearing a GL_LUMINANCE_ALPHA buffer, for example, we need to convert the clear color (R,G,B,A) to (R,R,R,A). We were doing this for texture border colors but not renderbuffers. Move the translation function to st_format.c and share it. This fixes the piglit fbo-clear-formats test. NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-02-21st/mesa: fix the default case in st_format_datatype()Brian Paul
Part of the fix for piglit fbo-clear-formats NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-02-21st/mesa: fix incorrect texture size allocation in st_finalize_texture()Brian Paul
If finalizing a non-POW mipmapped texture with an odd-sized base texture image we were allocating the wrong size of gallium texture (off by one). Need to be more careful about computing the base texture image size. This fixes https://bugs.freedesktop.org/show_bug.cgi?id=34463
2011-02-21st/mesa: refactor guess_and_alloc_texture() codeBrian Paul
2011-02-21st/mesa: fix mipmap generation for non-POW texturesBrian Paul
This is part of the fix for https://bugs.freedesktop.org/show_bug.cgi?id=34463
2011-02-18st/mesa: set renderbuffer _BaseFormat in a few placesBrian Paul
NOTE: This is a candidate for the 7.9 and 7.10 branches
2011-02-18st/mesa: check buffer orientation in blit_copy_pixels()Brian Paul
Can't invert the region if copying between surfaces with different orientations.
2011-02-18st/mesa: fix geometry corruption by always re-binding vertex arraysMarek Olšák
This is a temporary workaround. It fixes sauerbrauten with shaders enabled. I guess we might be changing vertex attribs somewhere and not updating the appropriate dirty flags, therefore we can't rely on them for now. Or maybe we need to make this state dependent on some other flags too. More info: https://bugs.freedesktop.org/show_bug.cgi?id=34378
2011-02-17st/mesa: implement blit-based path for glCopyPixelsBrian Paul
If doing a simple non-overlapping glCopyPixels with no per-fragment ops we can use pipe_context::resource_copy_region().
2011-02-17st/mesa: indentation fixBrian Paul
2011-02-17st/mesa: fix incorrect glCopyPixels position on fallback pathBrian Paul
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.
2011-02-17st/mesa: remove unused screen variablesBrian Paul
2011-02-16mesa: Remove the DXT compression via blit path.José Fonseca
No longer used.
2011-02-15gallium: add usage parameter to pipe_buffer_createMarek Olšák
And set a reasonable buffer usage flag everywhere instead of just PIPE_USAGE_DEFAULT.
2011-02-15st/mesa: fix compressed mipmap generation.Dave Airlie
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 <airlied@redhat.com>
2011-02-15st/mesa: fix GLES buildMarek Olšák
Broken since d5062fb3a315c46d77d5c954a3e3c14be1907d33. I wonder why this code is hidden behind #if by default.
2011-02-14st/mesa: Use blend equation and function of first render target for all ↵Fabian Bieler
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 <brianp@vmware.com>
2011-02-14gallium: notify drivers about possible changes in user buffer contentsMarek Olšák
Also implement the redefine_user_buffer hook in the drivers.
2011-02-14st/mesa: set vertex arrays state only when necessaryMarek Olšák
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.
2011-02-14gallium: remove pipe_vertex_buffer::max_indexMarek Olšák
This is redundant to pipe_draw_info::max_index and doesn't really fit in the optimizations I plan.