summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Flag _NEW_BUFFERS when unbinding an attachment on glDeleteTextures.Eric Anholt2011-06-181-0/+2
| | | | | | | | | | | The _ColorDrawBuffers[] wouldn't get updated despite us having updated what it depends on (Attachments[]->Renderbuffer). Other callers of _mesa_remove_attachment are already flagging _NEW_BUFFERS for other reasons. The specific bug report that led to this fix (and the fbo-finish-deleted testcase) was fixed by 23b6f9606dc247488835745668b3686218612536, though. Reviewed-by: Brian Paul <[email protected]>
* i965: Don't try to continue space before the start of a VBO.Eric Anholt2011-06-181-0/+2
| | | | | | | | | | | This loop is trying to see if all the buffers to be uploaded happen to be the same increment from the start of the 3DSTATE_VERTEX_BUFFERS currently loaded in the hardware. However, we might be at a smaller offset than the previous set of VERTEX_BUFFERS, so we can't reuse because that packet made the first entry be its starting offset (you can't access outside the given bounds). Fixes piglit ARB_vertex_buffer_object/elements-negative-offset.
* i965: Add missing state flag for vertex elements on current VS program.Eric Anholt2011-06-181-1/+2
| | | | Fixes a missing 3DSTATE_VERTEX_ELEMENTS on topogun.trace.
* mesa: allow depth texture arraysBrian Paul2011-06-171-1/+5
| | | | | | | The GL_EXT_texture_array spec allows this (Section 3.8.1). Fixes failing piglit fbo-depth-array test. NOTE: This is a candidate for the 7.10 branch.
* 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
|
* mesa: use helper functions to distinguish between user/winsys FBOsBrian Paul2011-06-161-18/+42
| | | | And replace IS_CUBE_FACE() macro w/ inline function.
* mesa: refactor, create _mesa_update_draw_buffers() helperBrian Paul2011-06-163-11/+27
| | | | | Move this code out of _mesa_make_current() and put it into a helper function.
* mesa: updated comments in _make_current()Brian Paul2011-06-161-8/+5
|
* intel: Fix typo in intel_offset_S8 commentsChad Versace2011-06-151-1/+1
| | | | Signed-off-by: Chad Versace <[email protected]>
* i965/gen5,6: Fix hang when emitting hiz buffer without stencil bufferChad Versace2011-06-151-18/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When emitting either a hiz or stencil buffer, the 'separate stencil enable' and 'hiz enable' bits are set in 3DSTATE_DEPTH_BUFFER. Therefore we must emit both 3DSTATE_HIER_DEPTH_BUFFER and 3DSTATE_STENCIL_BUFFER. Even if there is no stencil buffer, 3DSTATE_STENCIL_BUFFER must be emitted; failure to do so causes a hang on gen5 and a stall on gen6. This also fixes a silly, obvious segfault that occured when a hiz buffer xor separate stencil buffer existed. Fixes the piglit tests below on Gen5 when hiz and separate stencil are manually enabled: fbo-alphatest-nocolor fbo-depth-sample-compare fbo hiz-depth-read-fbo-d24-s0 hiz-depth-stencil-test-fbo-d24-s0 hiz-depth-test-fbo-d24-s0 hiz-stencil-read-fbo-d0-s8 hiz-stencil-test-fbo-d0-s8 fbo-missing-attachment-clear fbo-clear-formats fbo-depth-* Changes piglit test result from crash to fail: hiz-depth-stencil-test-fbo-d0-s8 Signed-off-by: Chad Versace <[email protected]>
* 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.
* r600c: add tiling support for evergreen+Alex Deucher2011-06-141-45/+95
| | | | Signed-off-by: Alex Deucher <[email protected]>
* mesa: Switch generate_mipmaps_compressed() to using TexImage2D to upload.Eric Anholt2011-06-144-69/+52
| | | | | | | | | | | | | The code was playing fast and loose with rowstrides, which meant that if a driver chose anything different for its alignment requirements, the generated mipmaps came out garbage. Unlike the uncompressed case, we can't generate mipmaps directly into image->Data, so by using TexImage2D we cut out most of the weird logic that existed to generate in-place into ->Data. The up/downside is that the driver recovery code for the fact that _mesa_generate_mipmaps whacked ->Data has to be turned off for compressed now. Fixes 6 piglit tests about compressed mipmap gen.
* mesa: Remove uncompressed code from generate_mipmaps_compressed().Eric Anholt2011-06-141-100/+77
|
* mesa: Remove compressed code from generate_mipmaps_uncompressed().Eric Anholt2011-06-141-114/+4
|
* mesa: Split _mesa_generate_mipmap along compressed/uncompressed lines.Eric Anholt2011-06-141-26/+225
| | | | | | | | | | The path taken is wildly different based on this (do we generate from a temporary image, or from level-1's data), and we appear to have stride bugs in the compressed case that are tough to disentangle. This just duplicates the code for the moment, the followon commit will do the actual changes. Only real code change here is handling maxLevel in one common place.
* intel: Fix miptree height alignment for compressed NPOT textures.Eric Anholt2011-06-141-4/+2
| | | | | | This is effectively just "round up when dividing by 4" compared to the previous code. Fixes the broken stripe at the top of fbo-generatemipmap-formats GL_EXT_texture_compression_rgtc.
* intel: Drop dead preinitialization of align_w, align_h.Eric Anholt2011-06-141-1/+1
|
* intel: Drop the cpp argument to intel_miptree_create().Eric Anholt2011-06-145-22/+5
|
* intel: Calculate compress_byte in intel_miptree_create.Eric Anholt2011-06-145-26/+18
| | | | One less argument and thing to get wrong.
* intel: Use the gl_format to get the base_format for miptree create.Eric Anholt2011-06-145-5/+1
| | | | One less argument to this insanely long function call.
* intel: Drop the internal_format field of the mipmap tree.Eric Anholt2011-06-145-15/+4
| | | | This has been replaced with the gl_format now.
* intel: Make the intel_miptree_match_image format check more specific.Eric Anholt2011-06-142-12/+3
| | | | | | | | We don't care just about the internalFormat/cpp/compressed, but about the specific format chosen. We have no support for format translations as part of texture validation, and furthermore it has restrictions in the GL specification. However, we should be making consistent decisions for this check anyway.
* i915: Drop dead argument to translate_texture_format().Eric Anholt2011-06-142-6/+3
|
* intel: Add block alignment for RGTC textures.Eric Anholt2011-06-144-32/+18
| | | | | We were using the default 4x2 alignment instead of the 4x4 required for RGTC textures.
* intel: Add the MESA_FORMAT as a field of the miptree.Eric Anholt2011-06-145-4/+14
| | | | | We only had internal_format before, which is way more irritating to work with.
* intel: Fix 2x2 and 1x1 compressed teximages from _mesa_generate_mipmap()Eric Anholt2011-06-141-5/+12
| | | | | | | | | | Generally image uploads to a the region occur at TexImage time, but that's not the case for fallback _mesa_generate_mipmap(), and in this path we were forgetting to align the width when dividing height. We were just leaving out parts of the compressed block at 2x2 and 1x1 levels. Fixes gen-compressed-teximage.
* meta: Fix glCopyTexImage(GL_LUMINANCE) from non-GL_LUMINANCE source.Eric Anholt2011-06-131-0/+14
| | | | | | | glReadPixels() was performing RGB -> L conversion differently from the glTexImage() style conversion appropriate for glCopyTexImage(). Fixes gles2conform copy_texture.
* intel: Fix mipmap and format handling of blit glCopyPixels().Eric Anholt2011-06-131-45/+53
| | | | Fixes fbo-mipmap-copypix.
* intel: Do the drawable x/y offset in intel_renderbuffer_map() for spans.Eric Anholt2011-06-131-64/+27
| | | | | | | | | | | We were mapping the renderbuffer once, then walking over all the buffers to map just the texture ones using the other texture mapping function that handled the x/y offset to the image in the region. But then we would go and overwrite *those* mappings with the original mappings for depth/stencil, which was wrong. Instead, just walk over the attachments once and map the attachments. Wasn't that easy?
* intel: Use rb->Data and rb->RowStride to handle spans Y flipping.Eric Anholt2011-06-131-7/+4
| | | | | | | | This is already pointing at 0 or Height - 1 and with an appropriate pitch, so no need to recompute those values per customization of the spans code. Cuts 3 out of 21kb of the compiled size. Reviewed-by: Chad Versace <[email protected]>
* intel: Clean up intel_render_texture with a rename and a helper function.Eric Anholt2011-06-131-10/+6
| | | | | | | | | | The "newImage" isn't particularly new -- it might be the same texture that was attached to the same attachment point before. This function also gets called when just rebinding back to an FBO with a texture attachment. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* intel: Move the draw_x/draw_y to the renderbuffer where it belongs.Eric Anholt2011-06-1312-80/+97
| | | | | | | | | | | | | | | | It was originally located in the region because the tracking of depth/color buffers was on the regions, and getting back to the irb would have been tricky. Now, we're keying off of the renderbuffer in more places, which means we can move these fields where they belong. This could fix potential rendering failure with a single texture having multiple images attached to different renderbuffers across shareCtx (as far as I can tell, this was the only failure we could cause, since anything else should trigger intel_render_texture in between, for example a BindFramebuffer). Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* dri: include swrast.h, not s_texrender.hBrian Paul2011-06-132-2/+2
|
* mesa: move texrender.c to swrastBrian Paul2011-06-138-44/+35
| | | | | | | This stuff is really for software rendering, it's not core Mesa. A small step toward pushing the FetchTexel() stuff down into swrast. Reviewed-by: Eric Anholt <[email protected]>
* vbo: minor simplification in print_draw_arrays() debug functionBrian Paul2011-06-131-4/+4
|
* mesa: move invariant code out of loop in get_tex_rgba()Brian Paul2011-06-131-14/+14
|
* 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]>
* i965: Add support for GL_FIXED vertex attributes.Eric Anholt2011-06-104-1/+41
| | | | | | | | | This sadly requires work in the VS to rescale them, because the hardware doesn't support this format natively. Fixes arb_es2_compatibility-fixed-type and gtf/fixed_data_type. Reviewed-by: Ian Romanick <[email protected]>
* Fix format not a string literal error with -Werror=format-securityEugeni Dodonov2011-06-101-1/+1
| | | | | | | A trivial fix for error: format not a string literal and no format arguments with compiling with -Werror=format-security flags. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/brw: Fix emit_depthbuffer() when packed depth/stencil texture is attachedChad Versace2011-06-101-11/+5
| | | | | | | | | | | | | If either depth or stencil buffer has packed depth/stencil format, then do not use separate stencil. Before this commit, emit_depthbuffer() incorrectly assumed that the texture's stencil renderbuffer wrapper was a *separate* stencil buffer, because the depth and stencil renderbuffer wrappers are distinct for depth/stencil textures (that is, depth_irb != stencil_irb). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38134 Signed-off-by: Chad Versace <[email protected]>
* i965/gen6: Add support for gl_PointCoord.Eric Anholt2011-06-091-0/+3
| | | | | | | | | This is just like PointSprite overrides, but it's always on for that attribute. Fixes glsl-fs-pointcoord, gtf/point_sprites. Acked-by: Kenneth Graunke <[email protected]>
* i965/gen6: Fix point sprite texture coordinate overrides.Eric Anholt2011-06-091-7/+7
| | | | | | | | We were assuming that the input attribute n to the FS was FRAG_ATTRIB_TEXn, which happened to be true often enough for our testcases. Acked-by: Kenneth Graunke <[email protected]>
* i965/gen6: Refactor SF setup a bit to handle overrides in one place.Eric Anholt2011-06-091-19/+24
| | | | Acked-by: Kenneth Graunke <[email protected]>