summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: s/tex_usage/bindings/ in st_format.hBrian Paul2011-06-291-1/+1
| | | | Just be consistent with the .c file.
* st/mesa: Use correct internal targetEmil Velikov2011-06-291-2/+2
| | | | | | | | | | | Commit 1a339b6c(st/mesa: prefer native texture formats when possible) introduced two new arguments to the st_choose_format() functions. This patch fixes the order and passes the correct internal_target rather than GL_NONE NOTE: This is a candidate for the 7.11 branch Signed-off-by: Emil Velikov <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* st/mesa: fix overwriting gl_format with pipe_format since 9d380f48Andre Maasikas2011-06-291-2/+2
| | | | | | fixes assert later on in texcompress2/r600g Signed-off-by: Brian Paul <[email protected]>
* st-api: Rework how drawables are invalidated v3.Thomas Hellstrom2011-06-293-50/+73
| | | | | | | | | | | | | | | The api and the state tracker manager code as well as the state tracker code assumed that only a single context could be bound to a drawable. That is not a valid assumption, since multiple contexts can bind to the same drawable. Fix this by making it the state tracker's responsibility to update all contexts binding to a drawable Note that the state trackers themselves don't use atomic stamps on frame-buffers. Multiple context rendering to the same drawable should be protected by the application. Signed-off-by: Thomas Hellstrom <[email protected]>
* st/mesa: add PIPE_FORMAT_R8G8B8A8_UNORM as the first RGBA format.Stéphane Marchesin2011-06-241-1/+1
| | | | | | | Otherwise we can end up creating RGBA render targets (which are BGRA on the hardware), and then we bind them as RGBA textures (which are RGBA on the hardware). This generates software fallbacks every time we bind the frame as a texture.
* st/mesa: fix pipe_get_transfer() call in fallback_copy_texsubimage()Brian Paul2011-06-241-1/+2
| | | | | | | | | | | | | Commit 1a339b6c71ebab6e1a64f05b2e133022d3bbcd15 caused us to take a different path through the glCopyTexSubImage() code. The pipe_get_transfer() call neglected to pass the texture's level, face and slice info. So we were always transferring from the 0th mipmap level even when the source renderbuffer was a non-zero mipmap level in a texture. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=38649 NOTE: This is a candidate for the 7.10 branch.
* st/mesa: fix all_varyings_in_vbos() regressionBrian Paul2011-06-241-1/+17
| | | | | Fixes regression from d631c19db47181129811080bfa772b210d762d4d. See http://bugs.freedesktop.org/show_bug.cgi?id=38626
* st/mesa: fix format selection regressionBrian Paul2011-06-231-3/+7
| | | | | | | Note all gallium formats are supported by Mesa so disable them. Fixes regression from 1a339b6c71ebab6e1a64f05b2e133022d3bbcd15. See https://bugs.freedesktop.org/show_bug.cgi?id=38602
* st/mesa: use a helper for st_framebuffer creationChia-I Wu2011-06-231-18/+29
| | | | | | In st_api_make_current, we would like to reuse the exising st_framebuffer if possible. Use a helper function to make the code clearer.
* st/mesa: prefer native texture formats when possible.Stéphane Marchesin2011-06-224-8/+101
| | | | | | If possible, we want to match the hardware format to what the app uses. By doing so, we avoid the need for pixel conversions and therefore greatly speed up texture uploads.
* st/mesa: Invalidate drawables on context switchBenjamin Franzke2011-06-211-9/+13
|
* st/mesa: Remove unneeded texture format terminators.Stéphane Marchesin2011-06-201-2/+2
| | | | Signed-off-by: Brian Paul <[email protected]>
* st/mesa: put const qualifer on format_map tableBrian Paul2011-06-201-1/+1
|
* st/mesa: remove unneeded test for GL_TRUEBrian Paul2011-06-171-1/+1
|
* st/mesa: remove redundant _mesa_is_depth_format() callBrian Paul2011-06-171-2/+1
| | | | | The _mesa_is_depth_or_stencil_format() call covers all depth format cases too.
* st/mesa: remove trailing whitespace in st_format.cBrian Paul2011-06-171-2/+2
|
* st/mesa: move comment for ChooseTextureFormat() to right placeBrian Paul2011-06-171-3/+4
|
* st/mesa: fix indentation, whitespaceBrian Paul2011-06-141-69/+74
|
* st/mesa: replace st->ctx with ctxBrian Paul2011-06-147-69/+80
|
* st/mesa: fix comments, whitespaceBrian Paul2011-06-141-3/+4
|
* st/mesa: improved is_interleaved_arrays() checkingBrian Paul2011-06-141-31/+19
| | | | | | | | | | | | | | Check that the difference in array pointers/offsets from the 0th array are less than the stride, for both VBOs and user-space arrays. Previously, we were only doing this for the later. This tightens up the interleaved array test and fixes a problem with the llvmpipe driver where we were creating way too many vertex fetch variants only because the pipe_vertex_element::src_offset values were changing frequently. This change results in a 5x speed-up for one of the viewperf tests. Also, clean up the function to make it easier to understand.
* st/mesa: rebind vertex arrays if _NEW_BUFFER_OBJECT is dirtyMarek Olšák2011-06-131-1/+2
| | | | | | This fixes piglit/vbo-bufferdata. It's a regression in 7.11. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: more helpful debug message in destroy_program_variants_cb()Brian Paul2011-06-081-2/+2
|
* 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]>