summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
Commit message (Collapse)AuthorAgeFilesLines
* swrast: Remove dead code in _swrast_clear_depth_buffer()Paul Berry2012-01-021-9/+0
| | | | | | | | This code was generating the gcc warning: variable ‘clearValue’ set but not used [-Wunused-but-set-variable] Reviewed-by: Brian Paul <[email protected]>
* swrast: assert _swrast_map_teximage() x, y is multiple of block sizeBrian Paul2011-12-261-0/+3
|
* swrast: replace assertion with conditional in _swrast_map_teximage()Brian Paul2011-12-261-2/+6
| | | | | Just in case we ran out of memory when trying to allocate the texture memory.
* swrast: rewrite glDrawPixels(GL_DEPTH) with zoomBrian Paul2011-12-243-69/+28
| | | | | | | This gets rid of another renderbuffer->PutRow() call and _DepthBuffer usage. We always work with 32-bit uint Z values now. Reviewed-by: Eric Anholt <[email protected]>
* swrast: stop using _DepthBuffer in triangle codeBrian Paul2011-12-241-16/+11
| | | | | The only consequence is we can only use the occlusion_zless_16_triangle() function with MESA_FORMAT_Z16.
* mesa: remove gl_renderbuffer::PutRowRGB()Brian Paul2011-12-244-175/+0
| | | | | | No longer used anywhere. Reviewed-by: Eric Anholt <[email protected]>
* swrast: stop using PutRowRGB() in triangle codeBrian Paul2011-12-241-10/+12
| | | | Reviewed-by: Eric Anholt <[email protected]>
* swrast: refactor/rewrite fast_draw_rgba_pixels()Brian Paul2011-12-241-234/+167
| | | | | | | | | Use Map/UnmapRenderbuffer() for the special, optimized cases we care about. Note that we're dropping some seldom-used cases in the new fast-path code: as CI->RGB conversion and zooming. Reviewed-by: Eric Anholt <[email protected]>
* swrast: move swrast_render_start/finish() call in drawpixels codeBrian Paul2011-12-241-10/+24
| | | | | | | | We don't want to call these functions where we'll be using Map/UnmapRenderbuffer(). So push them further down in the drawpixels cases so that we can switch over to Map/UnmapRenderbuffer() step by step. Reviewed-by: Eric Anholt <[email protected]>
* swrast: new fast_draw_depth_stencil() for glDrawPixels(GL_DEPTH_STENCIL)Brian Paul2011-12-241-16/+40
| | | | | | | | Stop using deprecated renderbuffer PutRow() function. Note that we aren't using Map/UnmapRenderbuffer() yet because this call is inside a swrast_render_start/finish() pair. v2: use _mesa_pack_uint_24_8_depth_stencil_row(), per Eric.
* swrast: remove the copy_depth_stencil_pixels() functionBrian Paul2011-12-241-178/+3
| | | | | | | | | Hopefully glCopyPixels(GL_DEPTH_STENCIL) will be handled by the fast copy function. Otherwise, just do the copy with separate depth + stencil copies. That's effectively what the removed code did anyway. Reviewed-by: Eric Anholt <[email protected]>
* swrast: stop using depth/stencil wrappers in CopyPixels codeBrian Paul2011-12-241-8/+21
| | | | | | | | | | | The functions that read depth/stencil values understand all (packed) depth/stencil buffer formats now so there's no reason to use the wrappers. Also, improve the format checks in fast_copy_pixels() to catch mismatched depth/stencil cases. v2: fix the test for combined depth+stencil buffers, per Eric.
* swrast: remove needless assignment in draw_depth_stencil_pixels()Brian Paul2011-12-241-1/+0
| | | | Reviewed-by: Eric Anholt <[email protected]>
* swast: replace renderbuffer->GetPointer() with _swrast_pixel_address()Brian Paul2011-12-243-4/+4
| | | | Reviewed-by: Eric Anholt <[email protected]>
* swrast: use _swrast_pixel_address() helper functionBrian Paul2011-12-243-32/+20
| | | | Reviewed-by: Eric Anholt <[email protected]>
* swrast: rewrite stencil test codeBrian Paul2011-12-241-858/+259
| | | | | | | | Stop using the deprecated renderbuffer Get/Put Row/Values functions. Consolidate code paths, etc. The file is nearly half the size it used to be! Reviewed-by: Eric Anholt <[email protected]>
* swrast: remove dead code in s_stencil.cBrian Paul2011-12-241-33/+0
| | | | Reviewed-by: Eric Anholt <[email protected]>
* swrast: rewrite _swrast_read_stencil_span()Brian Paul2011-12-241-5/+26
| | | | | | | | | Use format pack/unpack functions instead of deprecated renderbuffer GetRow/PutRow functions. v2: use get_stencil_address(), s/destVals/newVals/ Reviewed-by: Eric Anholt <[email protected]>
* swrast: rewrite _swrast_read_depth_span_float()Brian Paul2011-12-241-25/+4
| | | | | | Stop using the deprecated renderbuffer GetRow() function. Reviewed-by: Eric Anholt <[email protected]>
* mesa: rewrite _swrast_depth_bounds_test()Brian Paul2011-12-241-82/+21
| | | | | | Stop using the deprecated renderbuffer functions. Reviewed-by: Eric Anholt <[email protected]>
* swrast: rewrite depth-testing codeBrian Paul2011-12-241-1019/+208
| | | | | | | Consolidate code, stop using the deprecateted renderbuffer Put/Get Row/Values() functions. Reviewed-by: Eric Anholt <[email protected]>
* swrast: stop using _swrast_get_values() in z/depth codeBrian Paul2011-12-241-6/+75
| | | | Reviewed-by: Eric Anholt <[email protected]>
* swrast: stop using _swrast_get_values() in stencil codeBrian Paul2011-12-241-1/+30
| | | | | | That function will go a way in the future. Reviewed-by: Eric Anholt <[email protected]>
* swrast: do fast_copy_pixels() with Map/UnmapRenderbuffer()Brian Paul2011-12-241-43/+89
| | | | | | v2: use memmove() instead of memcpy() in case of overlap Reviewed-by: Eric Anholt <[email protected]>
* swrast: replace GetRow() call with _mesa_unpack_ubyte_stencil_row()Brian Paul2011-12-241-1/+5
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove gl_renderbufer::PutMonoRow() and PutMonoValues()Brian Paul2011-12-244-822/+1
| | | | | | | The former was only used for clearing buffers. The later wasn't used anywhere! Remove them and all implementations of those functions. Reviewed-by: Eric Anholt <[email protected]>
* swrast: rewrite color buffer clearing to use Map/UnmapRenderbuffer()Brian Paul2011-12-241-112/+113
| | | | | | v2: use _mesa_pack_colormask() helper and fix incorrect masking arithmetic Reviewed-by: José Fonseca <[email protected]>
* swrast: do depth/stencil clearing with Map/UnmapRenderbuffer()Brian Paul2011-12-245-140/+305
| | | | | | | | Another step toward getting rid of the renderbuffer PutRow/etc functions. v2: fix assorted depth/stencil clear bugs found by Eric Reviewed-by: José Fonseca <[email protected]>
* swrast: Add a note about overlapping support for framebuffer blit.Eric Anholt2011-12-141-1/+9
| | | | Reviewed-by: Brian Paul <[email protected]>
* swrast: Don't do Z24S8 drawpixels fast-paths with Z32_X24S8 input data.Eric Anholt2011-12-141-2/+4
| | | | | | | | | | The cool part was that in the "fbo-depthstencil -drawpixels GL_DEPTH24_STENCIL8 32F_24_8_REV" testcase, the shifting happened to end up with a value awfully close to the expected value, except for every other pixel being 0 (the stencil value, shifted away to nothing). Reviewed-by: Brian Paul <[email protected]>
* swrast: add debug code to test combined depth/stencil buffersBrian Paul2011-12-131-7/+47
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: move depth/stencil buffer validation to swrastBrian Paul2011-12-131-0/+23
| | | | | | | | | Since gl_framebuffer::_DepthBuffer and _StencilBuffer are only used by swrast, do the validation of those fields in swrast too. The main/depthstencil.[ch] code is no longer used and will be removed next. Reviewed-by: Eric Anholt <[email protected]>
* swrast: update depth/stencil wrapper sizesBrian Paul2011-12-131-2/+6
| | | | Reviewed-by: Eric Anholt <[email protected]>
* swrast: add new s_depthstencil.[ch] filesBrian Paul2011-12-132-0/+1072
| | | | | | | These files are copies of main/depthstencil.[ch] with s/mesa/swrast/. The main/depthstencil.[ch] will go away soon. Reviewed-by: Eric Anholt <[email protected]>
* swrast: add missing state validation calls for Blit, ClearBrian Paul2011-12-132-0/+6
|
* mesa: fix possible precision issues in pack/unpack/fetch functionsMarek Olšák2011-12-121-2/+2
| | | | | | | | | | | | | | | | | GLfloat doesn't have enough precision to exactly represent 0xffffff and 0xffffffff. (and a reciprocal of those, if I am not mistaken) If -ffast-math is enabled, using GLfloat causes assertion failures in: - fbo-blit-d24s8 - fbo-depth-sample-compare - fbo-readpixels-depth-formats - glean/depthStencil For example: fbo-depth-sample-compare: main/format_unpack.c:1769: unpack_float_z_Z24_X8: Assertion `dst[i] <= 1.0F' failed. Reviewed-by: Brian Paul <[email protected]>
* swrast: use malloc instead of MAX_WIDTH arrays in glCopyPixels, zoom codeBrian Paul2011-12-082-2/+18
| | | | | Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* swrast: remove core renderbuffer functions from s_renderbuffer.[ch]Brian Paul2011-12-082-267/+49
| | | | | | | We'll use the functions that live in main/ Plus, rename the remaining functions with "swrast_" prefix. Reviewed-by: Eric Anholt <[email protected]>
* swrast: add s_renderbuffer.[ch], copied from main/renderbuffer.[ch]Brian Paul2011-12-082-0/+2318
| | | | | | | Copying these files is the first step in moving the software buffer code from main/renderbuffer.c to swrast/s_renderbuffer.c Reviewed-by: Eric Anholt <[email protected]>
* swrast: remove dead accum buffer context fieldsBrian Paul2011-12-082-10/+1
|
* mesa: remove dead swrast and state tracker accum buffer codeBrian Paul2011-12-083-639/+0
|
* mesa: rewrite accum buffer supportBrian Paul2011-12-081-3/+2
| | | | | | | | | | | | | Implemented in terms of renderbuffer mapping/unmapping and format packing/unpacking functions. The swrast and state tracker code for implementing accumulation are unused and will be removed in the next commit. v2: don't use memcpy() in _mesa_clear_accum_buffer() v3: don't allocate MAX_WIDTH arrays, be more careful with mapping flags Reviewed-by: Eric Anholt <[email protected]>
* swrast: Add depth cube map support.Anuj Phogat2011-12-051-4/+14
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: rename MESA_FORMAT_RG88_REV to MESA_FORMAT_RG88Brian Paul2011-12-022-8/+8
| | | | R is in the high byte, G in the low byte.
* mesa: rename MESA_FORMAT_RG88 to MESA_FORMAT_GR88Brian Paul2011-12-022-8/+8
| | | | | To better reflect the component ordering and be consistent with other format names.
* mesa: fix unpacking of RG88_REV texelsBrian Paul2011-12-021-3/+3
| | | | R should be in the high byte and G in the low byte for this format.
* mesa: add support for GL_OES_compressed_ETC1_RGB8_textureChia-I Wu2011-12-021-0/+8
| | | | | | | | | | | Add support for GL_OES_compressed_ETC1_RGB8_texture to core mesa. There is no driver support yet. Unlike desktop GL compressed texture formats, GLES compressed texture formats usually can only be used with glCompressedTexImage2D. All other gl*Tex*Image* functions are updated to check for that. Reviewed-by: Brian Paul <[email protected]>
* swrast: use STATIC_ASSERT to make sure texfetch table isn't missing entriesBrian Paul2011-11-301-1/+2
| | | | | | | When new MESA_FORMAT_x enums are added we need to add a new entry in the table of texture fetch functions. In the past this has been missed if swrast isn't actually tested. Using a static assertion should help with that.
* swrast: Fix some static analysis warningsChad Versace2011-11-291-0/+9
| | | | | | | | | | | To each switch statement in s_texfilter.c, add a break statement to the default case. Eliminates the Eclipse static analysis warning: No break at the end of this case. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* swrast: add missing texfetch table entry for MESA_FORMAT_ARGB2101010_UINTBrian Paul2011-11-281-0/+7
| | | | | | | | | | As with the other integer-valued formats, use NULL until we support integer textures. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=43316 Tested-by: Vinson Lee <[email protected]> Signed-off-by: Brian Paul <[email protected]>