summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* intel: Add support for ARB_sampler_objects.Eric Anholt2011-04-233-17/+6
| | | | | | | | | | | | This extension support consists of replacing "gl_texture_obj->Sampler." with "_mesa_get_samplerobj(ctx, unit)->". One instance of referencing the texture's base sampler remains in the initial miptree allocation, where I'm not sure we have a clear association with any texture unit. Tested with piglit ARB_sampler_objects/sampler-objects. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: check image size before copy_image_data_to_texture()Brian Paul2011-04-211-2/+7
| | | | | | | | | | | | | We should only copy images into the dest texture if the size is correct. This fixes a failed assertion when finalizing a texture with mis-defined mipmap levels such as: level 0: 32x32 level 1: 8x8 Also, fix incorrect mipmap level used in assertion at the top of copy_image_data_to_texture(). NOTE: This is a candidate for the 7.10 branch.
* st/mesa: implement CopyBufferSubData using resource_copy_regionMarek Olšák2011-04-211-19/+4
| | | | Reviewed-by: Jakob Bornecrantz <[email protected]>
* st/mesa: simplify a bit of the previous patchBrian Paul2011-04-151-5/+8
| | | | Grrr, this was supposed to go in the previous commit.
* st/mesa: add handling for 'PIPE_FORMAT_B8G8R8X8_UNORM' in st_fast_readpixelsPierre-Eric Pelloux-Prayer2011-04-151-10/+20
| | | | | | With minor edits by Brian Paul. Signed-off-by: Brian Paul <[email protected]>
* st/mesa: convert Mesa float formats to GalliumMarek Olšák2011-04-152-0/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: Author: Marek Olšák <[email protected]> st/mesa: require RGBA16F and RGBA32F to be renderable st/mesa: fix L32F and L16F format translation st/mesa: also convert the R/RG float formats commit 49a9948b6a81b7d813304d081139d98e95ba5d1a Author: Luca Barbieri <[email protected]> Date: Fri Aug 20 10:36:17 2010 +0200 mesa/st: enable ARB_texture_float if supported formats allow it commit 7383632f7b6f9021b65f4973b7e7c99f0e8ce9b2 Author: Luca Barbieri <[email protected]> Date: Tue Aug 24 21:00:46 2010 +0200 mesa/st: support ARB_texture_float internal formats commit 7c362cc06982586c2d29fac55f6bcc4bcd1550b5 Author: Luca Barbieri <[email protected]> Date: Tue Aug 24 21:00:33 2010 +0200 mesa/st: convert L/A/I floating point formats
* mesa/st: Avoid spurious transfers when creating fbo textures without image data.José Fonseca2011-04-141-1/+6
| | | | | | | | | We could actually try to do an early return both for gallium textures and malloc memory textures, but I'm not sure exactly which situations stImage->pt is NULL, and whether texImage->Data == NULL would be acceptible or not. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: add support for GL_RGBA + GL_UNSIGNED_INT_8_8_8_8 in st_fast_readpixelspepp2011-04-141-1/+20
| | | | Signed-off-by: Brian Paul <[email protected]>
* st/mesa: minor clean-ups in update_textures()Brian Paul2011-04-131-4/+8
|
* mesa: plug in new functions for GL_ARB_sampler_objectsBrian Paul2011-04-102-0/+3
| | | | | | Build the new sources, plug the new functions into the dispatch table, implement display list support. And enable extension in the gallium state tracker.
* mesa: move sampler state into new gl_sampler_object typeBrian Paul2011-04-104-24/+52
| | | | | | gl_texture_object contains an instance of this type for the regular texture object sampling state. glGenSamplers() generates new instances of gl_sampler_object which can override that state with glBindSampler().
* Make st_pipe_vertex_format return type in st_draw.h match st_draw.cAlan Coopersmith2011-04-081-1/+1
| | | | | | | | | Fixes compiler error from Sun compilers: "state_tracker/st_draw.c", line 185: identifier redeclared: st_pipe_vertex_format current : function(unsigned int, unsigned int, unsigned int, unsigned char) returning enum pipe_format previous: function(unsigned int, unsigned int, unsigned int, unsigned char) returning unsigned int : "state_tracker/st_draw.h", line 73 Signed-off-by: Alan Coopersmith <[email protected]>
* st/mesa: Clamp min_lod to the max miplevel as well.Henri Verbeet2011-04-081-1/+3
| | | | | | | | Otherwise min_lod can potentially be larger than the clamped max_lod. The code that follows will swap min_lod and max_lod in that case, resulting in a max_lod larger than MAX_LEVEL. Signed-off-by: Brian Paul <[email protected]>
* st/mesa: Set samplers views' first_level.Henri Verbeet2011-04-082-7/+6
| | | | | | | | Base level and min LOD aren't equivalent. In particular, min LOD has no effect on image array selection for magnification and non-mipmapped minification. Signed-off-by: Brian Paul <[email protected]>
* mesa/st: Fix user buffer size computation when stride is zero.José Fonseca2011-04-073-41/+54
| | | | | | | | | | | | | | | | | | | Although for GL a zero stride means tightly packed elements, Mesa internally uses zero strides for constant arrays. Therefore user buffers need to be defined from buffer_offset + src_offset + min_index*stride to buffer_offset + src_offset + max_index*stride + elem_size Simplifying the later with (max_index + 1)*stride will give zero sized buffers. This change also aggregates the st_context's info about user buffers into a single array.
* mesa/st: Handle feedback draw when VBO offsets are not sorted in ascending ↵José Fonseca2011-04-071-2/+13
| | | | | | | | order. Simply port the same logic from setup_interleaved_attribs(). Avoids overflow in mustpass.c and feedback.c conform tests.
* mesa: core support for GL_ARB_texture_buffer_objectBrian Paul2011-04-051-0/+3
| | | | No GLSL or driver support yet.
* st/mesa: Apply LOD from texture objectFabian Bieler2011-04-051-1/+2
| | | | Signed-off-by: Brian Paul <[email protected]>
* st/mesa: Apply LOD bias from correct texture unitFabian Bieler2011-04-051-1/+1
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: added _mesa_get_attachment_teximage() helpersBrian Paul2011-04-051-3/+2
|
* st/mesa: minor assorted clean-ups and fixesBrian Paul2011-04-041-20/+22
|
* st/mesa: use 'array' local var to simplify the code a bitBrian Paul2011-04-041-29/+28
|
* st/mesa: fix zero-sized user vertex buffer bugBrian Paul2011-04-041-13/+23
| | | | | | | Commit 4c4ab5668cd6df573db7b065f0493fb80ac70ab8 didn't properly handle the stride==0 case. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=35961
* gallium: add a CAP for mixed colorbuffer format supportMarek Olšák2011-04-011-1/+24
| | | | | Some GPUs can't do it (I think most of DX9 ones), so they should have the option not to allow it.
* gallium: remove PIPE_CAP_VERTEX_COLOR_CLAMP_CONTROLMarek Olšák2011-03-291-4/+26
| | | | | | | | | | | | | | The vertex color clamp control is a property of an API, a lot like gl_rasterization_rules. The state should be set according to the API being implemented, for example: OpenGL Compatibility: enabled by default OpenGL Core: disabled by default D3D11: always disabled This patch also changes the way ARB_color_buffer_float is advertised. If no SNORM or FLOAT render target is supported, fragment color clamping is not required.
* st/mesa: choose an appropriate texture format for DrawPixelsMarek Olšák2011-03-291-3/+49
|
* gallium: add EXT_texture_snorm supportMarek Olšák2011-03-292-2/+236
|
* gallium: implement clamping controls (ARB_color_buffer_float)Luca Barbieri2011-03-297-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BTW this changes the gallium interface. Some rather cosmetic changes by Marek. Squashed commit of the following: commit 513b37d484f0318311e84bb86ed4c93cdff71f13 Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 18:17:54 2010 +0200 mesa/st: respect fragment clamping in st_DrawPixels commit 546a31e42cad459d7a7a10ebf77fc5ffcf89e9b8 Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 18:17:28 2010 +0200 mesa/st: support fragment and vertex color clamping commit c406514a1fbee6891da4cf9ac3eebe4e4407ec13 Author: Luca Barbieri <[email protected]> Date: Tue Aug 24 21:56:37 2010 +0200 mesa/st: expose ARB_color_buffer_float if unclamping is supported commit d0c5ea11b6f75f3da2f4ca989115f150ebc7cf8d Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 17:53:41 2010 +0200 mesa/st: use unclamped colors This assumes that Gallium is to be interpreted as given drivers the responsibility to clamp these colors if necessary. commit aef5c3c6be6edd076e955e37c80905bc447f8a82 Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 18:12:34 2010 +0200 mesa, mesa/st: handle read color clamping properly We set IMAGE_CLAMP_BIT in the caller based on _ClampReadColor, where the operation mandates it. (see the removed XXX comment. -Marek) TODO: did I get the set of operations mandating it right? commit 76bdfcfe3ff4145a1818e6cb6e227b730a5f12d8 Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 18:18:25 2010 +0200 gallium: add color clamping to the interface
* st/mesa: Validate state before doing blits.Henri Verbeet2011-03-271-0/+3
| | | | | | | Specifically, this ensures things like the front buffer actually exist. This fixes piglt fbo/fbo-sys-blit and fd.o bug 35483. Signed-off-by: Henri Verbeet <[email protected]>
* st/mesa: use BITFIELD64_BIT() macro in a few more placesBrian Paul2011-03-153-4/+4
|
* gallium: add texture barrier support to the interface and st/mesa (v2)Marek Olšák2011-03-154-0/+103
| | | | v2: change the gallium entry point to texture_barrier.
* st/mesa: Make use of the new PIPE_TRANSFER_DISCARD_* for buffer object.Mathias Fröhlich2011-03-151-5/+9
| | | | | | | | 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 <[email protected]>
* gallium: Delay the creation of simple helper shadersJakob Bornecrantz2011-03-121-16/+38
|
* u_blitter: Do blits in linear color space.Henri Verbeet2011-03-121-1/+1
| | | | | Blits between sRGB and linear formats should happen in linear color space. This fixes piglit fbo/fbo-srgb-blit.
* gallium: remove flags from the flush functionMarek Olšák2011-03-114-8/+8
| | | | | | | | | | 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.
* gallium: remove the geom_flags param from is_format_supportedMarek Olšák2011-03-118-160/+119
|
* gallium: cleanup fence_signalled and fence_finishMarek Olšák2011-03-112-3/+3
| | | | So that they don't have the driver-specific param and return type.
* st/mesa: remove unnecessary flushesMarek Olšák2011-03-111-3/+0
| | | | | | | The framebuffer cache flush should be implicit when calling set_framebuffer_state. There is no need to flush the command stream either.
* gallium: add timeout parameter to fence_finishMarek Olšák2011-03-082-3/+4
| | | | | This is a follow-up to the ARB_sync patch for st/mesa and completes the ARB_sync implementation.
* st/mesa: implement ARB_syncMarek Olšák2011-03-084-0/+166
| | | | | | The ServerWaitSync implementation matches Intel's driver. The extension is advertised when pipe_screen::fence_finish is set.
* st/mesa: cleanup checking for signed compressed formats in generate_mipmapsMarek Olšák2011-03-081-8/+4
|
* st/mesa: add LATC and 3DC supportMarek Olšák2011-03-083-3/+76
| | | | softpipe passes all tests.
* st/mesa: Fix an incorrect user vertex buffer referenceThomas Hellstrom2011-03-081-4/+2
| | | | | | | | 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 <[email protected]>
* st/mesa: fail to alloc a renderbuffer if st_choose_renderbuffer_format failsMarek Olšák2011-03-071-1/+5
| | | | | | This fixes: state_tracker/st_format.c:401:st_pipe_format_to_mesa_format: Assertion `0' failed.
* st/mesa: fix incorrect version checking codeBrian Paul2011-03-071-2/+3
|
* gallium: split CAP_INSTANCE_DRAWING into INSTANCEID and INSTANCE_DIVISORMarek Olšák2011-03-051-1/+3
| | | | | | | | 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.
* st/mesa: set PIPE_BIND_RENDER_TARGET for sRGB formats if UNORM is supportedMarek Olšák2011-03-041-2/+9
| | | | | | | | 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.
* mesa/st: fix softpipe npot compressed mipmaps.Dave Airlie2011-03-021-2/+2
| | | | | | | | | | 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 <[email protected]>
* mesa/st: fix generate mipmap for signed compressed formats.Dave Airlie2011-03-021-32/+63
| | | | | | | | 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 <[email protected]>
* st/mesa: use RGTC for GL_COMPRESSED_RED/RG if possibleMarek Olšák2011-03-021-2/+8
| | | | With proper fallback formats.