summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* st: use _mesa_is_bufferobj()Brian Paul2011-06-081-3/+4
|
* st/mesa: fix renderbuffer internal format for accum bufferBrian Paul2011-06-061-1/+2
| | | | | Fixes an accum buffer regression since switching to the table-based format selection code.
* st/mesa: add GL_R11F_G11F_B10F to format tableBrian Paul2011-06-021-0/+4
| | | | Fixes http://bugs.freedesktop.org/show_bug.cgi?id=37839
* st/mesa: add format table entry for GL_RGB9_E5Brian Paul2011-06-011-0/+4
| | | | Fixes http://bugs.freedesktop.org/show_bug.cgi?id=37839
* st/mesa: don't use resource_copy_region for CopyPixels with conditional renderMarek Olšák2011-05-301-1/+2
| | | | | | | | | | | | The conditional rendering should be able to kill CopyPixels. I assume the render condition has no effect on resource_copy_region. This fixes piglit: - NV_conditional_render/copypixels NOTE: This is a candidate for the 7.10 branch. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: conditional rendering should not kill texture decompression via blitMarek Olšák2011-05-301-0/+11
| | | | | | NOTE: This is a candidate for the 7.10 branch. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: CopyTex(Sub)Image should not be killed by conditional renderingMarek Olšák2011-05-301-0/+12
| | | | | | NOTE: This is a candidate for the 7.10 branch. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: BlitFramebuffer should not be killed by conditional renderingMarek Olšák2011-05-301-1/+13
| | | | | | NOTE: This is a candidate for the 7.10 branch. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: GenerateMipmap should not be killed by conditional renderingMarek Olšák2011-05-303-2/+22
| | | | | | NOTE: This is a candidate for the 7.10 branch. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix typos and add some format fallbacks in format_mapMarek Olšák2011-05-301-11/+11
| | | | | | | | | | | | Always default to DEFAULT_*_FORMATS for mandatory GL formats. (st_choose_format must not fail for those) Use DEFAULT_RGBA when alpha is required instead of RGB. Use DEFAULT_RGB otherwise. These are more or less the remaining differences between the old code and the new one. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: consolidate listing of depth formatsMarek Olšák2011-05-301-11/+12
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: add GL_DEPTH_COMPONENT32 fallback formatsMarek Olšák2011-05-301-1/+4
| | | | | | This makes D32 work again on chipsets which can't do it. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix changing internal format via RenderbufferStorageMarek Olšák2011-05-301-5/+2
| | | | | | | | | | | | | | | | The problem is: The second time the function is called with a new internal format, strb->format is usually not PIPE_FORMAT_NONE. RenderbufferStorage(... GL_RGBA8 ...); RenderbufferStorage(... GL_RGBA16 ...); // had no effect on the format Broken with: fd6f2d6e5783d8810d0ab88e1c470958fd5eb2eb Test: piglit/fbo-storage-completeness NOTE: This is a candidate for the 7.10 branch. (if fd6f2d6e5783d8810d0ab88e1c470958fd5eb2eb is cherry-picked as well) Reviewed-by: Brian Paul <[email protected]>
* st/mesa: simplify some st_context(ctx)->pipe codeBrian Paul2011-05-256-10/+9
|
* st/mesa: fix incorrect texture level/face/slice accessesBrian Paul2011-05-252-12/+21
| | | | | | | | | | If we use FBOs to access mipmap levels with glRead/Draw/CopyPixels() we need to be sure to access the correct mipmap level/face/slice. Before, we were just passing zero in quite a few places. This fixes the new piglit fbo-mipmap-copypix test. NOTE: This is a candidate for the 7.10 branch.
* st/mesa: prefer formats without stencil for DEPTH_COMPONENTBrian Paul2011-05-241-4/+6
| | | | | | | for fast Z clears to be used more often. Original patch by Marek Olšák. Rebased to table-driven st_choose_format() by Brian Paul.
* st/mesa: rewrite st_choose_format() to be table drivenBrian Paul2011-05-241-905/+549
| | | | | | | | | | | Instead of using a giant switch statement with lots of code, use a table to convert GL format enums to pipe formats. Tested by running the old code next to the new and asserting that the return value was the same for piglit tests. We're doing a linear search, but if that ever appears to be too slow the table could easily be sorted or hashed.
* st/mesa: assign renderbuffer's format field when allocating storagepepp2011-05-211-0/+1
| | | | | | | | See http://bugs.freedesktop.org/show_bug.cgi?id=36173 NOTE: This is a candidate for the 7.10 branch. Signed-off-by: Brian Paul <[email protected]>
* mesa/st: split updating vertex and fragment shader stages.Dave Airlie2011-05-183-8/+12
| | | | | | | this seems like a logical thing to do and sets the correct st flags for vertex textures. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: only memset sampler when about to use it.Dave Airlie2011-05-181-3/+2
| | | | | | | | | | | This function was taking a lot more CPU than required due to it memsetting a bunch of memory that didn't require it from what I can see. We should only memset here when we are about to fill out the sampler, otherwise we end up doing a bunch of memsets for everytime this function is called, basically setting 0 memory to 0. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: overhaul vertex/fragment sampler and sampler views.Dave Airlie2011-05-164-154/+225
| | | | | | | | | | | | | | | | | | | This fixes piglits fragment-and-vertex-texturing test on llvmpipe for me. I've no idea if someone had another plan for this that is smarter than what I've done here, but what I've basically done is split fragment and vertex sampler and sampler_view setup function, factor out the common chunks of both. side-cleanups: drop st->state.sampler_list - unused don't update border color if we have no border color. should fix https://bugs.freedesktop.org/show_bug.cgi?id=35849 Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: set correct baseInternalFormat for _mesa_texstore in DrawPixelsMarek Olšák2011-05-141-3/+4
| | | | | | | | | GL_RGBA was always used for baseInternalFormat regardless of the chosen texture internal format. https://bugs.freedesktop.org/show_bug.cgi?id=37154 Reviewed-by: Brian Paul <[email protected]>
* st/mesa: expose ARB_shader_texture_lod if SM3 is supportedMarek Olšák2011-05-131-0/+4
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium: implement seamless cubemap extensionsMarek Olšák2011-05-062-0/+11
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa,st/mesa: fix WPOS adjustmentChristoph Bumiller2011-05-031-39/+71
| | | | Tested-by: Marek Olšák <[email protected]>
* st/mesa: remove set-but-unused variablesMarek Olšák2011-05-012-12/+0
|
* st/mesa: expose ARB_ES2_compatibility if GL_FIXED vertex format is supportedMarek Olšák2011-04-301-0/+6
| | | | | | Tested with softpipe and llvmpipe. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: support EXT_packed_floatMarek Olšák2011-04-293-0/+22
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: support EXT_texture_shared_exponentMarek Olšák2011-04-293-0/+23
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: raise shader MaxParameters if driver supports moreBrian Paul2011-04-271-0/+2
| | | | | | | The default value is 64 but drivers usually advertise more, like 4096. Allows ARB vp/fp programs to use more parameters. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: choose 3-component float formats before 4-component formatsBrian Paul2011-04-271-2/+21
| | | | | | | | If GL_RGB16F or GL_RGB32F is specified let's try the 3-component float texture formats before trying the 4-component ones. Before this, GL_RGB16/32F were treated the same as GL_RGBA16/32F. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: whitespace fixesBrian Paul2011-04-271-3/+3
|
* st/mesa: fix warning: ‘user_memory’ may be used uninitialized in this ↵Marek Olšák2011-04-271-1/+1
| | | | | | | function It's initialized later in a conditional the condition of which is always true the first time it's evaluated.
* st/mesa: fix regression since a22aba4eae9b29db731487bce90e8292f7e82c72Dave Airlie2011-04-251-2/+2
| | | | | | | | | | "st/mesa: check image size before copy_image_data_to_texture()" caused a regression in piglit fbo-generatemipmap-formats test on all gallium drivers. Level 0 for NPOT textures will not match minified values, so don't do this check for level 0. Signed-off-by: Dave Airlie <[email protected]>
* 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.