aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
Commit message (Collapse)AuthorAgeFilesLines
* swrast: fix uninitialized variable warningBrian Paul2012-01-241-1/+1
|
* swrast: make rowStride variable signed in put_z32_values()Brian Paul2012-01-241-1/+1
| | | | As with commit aed5c8299fe47b8e1728f8140d069bc89d3fa947
* swrast: remove unused StoreTexel codeBrian Paul2012-01-244-1187/+183
| | | | | No longer needed since we do all rendering to texture with the buffer mapping and pixel packing functions.
* swrast: use Map/UnmapTextureImage() in framebuffer map/unmap codeBrian Paul2012-01-241-15/+13
| | | | | | | When we're actually rendering into a texture, map the texture image instead of the corresponding renderbuffer. Before, we just copied a pointer from the texture image to the renderbuffer. This change will make the code usable by hardware drivers.
* mesa: remove ctx->Driver.Map/UnmapTexture() hooksBrian Paul2012-01-241-3/+0
| | | | No longer used anywhere.
* swrast: move some renderbuffer functions to s_renderbuffer.cBrian Paul2012-01-242-121/+121
|
* swrast: remove a few extra _mesa_get_format_bytes() callsBrian Paul2012-01-241-4/+6
|
* swrast: use swrast_renderbuffer instead of gl_renderbufferBrian Paul2012-01-249-41/+62
|
* swrast: allocate swrast_renderbuffers instead of gl_renderbuffersBrian Paul2012-01-242-7/+7
|
* swrast: new swrast_renderbuffer typeBrian Paul2012-01-241-0/+25
| | | | This will let us move the swrast-specific fields out of gl_renderbuffer.
* swrast: use stencil packing function in s_stencil.cBrian Paul2012-01-241-1/+3
|
* swrast: use color packing functions in s_span.cBrian Paul2012-01-241-4/+9
|
* swrast: remove s_spantemp.hBrian Paul2012-01-241-149/+0
|
* swrast: rewrite, simplify the the render-to-texture codeBrian Paul2012-01-241-110/+30
|
* mesa: rename gl_renderbuffer::Data to BufferBrian Paul2012-01-242-12/+15
| | | | To better indicate that this pointer to the malloc'd memory.
* mesa: move freeing of software renderbuffers into swrastBrian Paul2012-01-241-0/+15
|
* mesa: remove gl_renderbuffer::DataTypeBrian Paul2012-01-245-130/+22
|
* mesa: remove gl_renderbuffer:RowStride fieldBrian Paul2012-01-244-6/+3
|
* swrast: remove Get/PutRow()-related codeBrian Paul2012-01-242-1224/+8
|
* swrast: stop using Put/GetRow/Values() in swrast codeBrian Paul2012-01-245-55/+193
| | | | | All color buffer rendering is now done by accessing mapped renderbuffer memory. We're now able to get rid of all the GetRow/PutRow stuff.
* swrast: use gl_renderbuffer::StrideInBytes in depth/stencil codeBrian Paul2012-01-242-6/+6
|
* mesa: use gl_renderbuffer::Map for all depth/stencil accessesBrian Paul2012-01-242-37/+110
| | | | | Instead of using the obsolete gl_renderbuffer::Data field. Color buffer are still accessed through GetRow/PutRow().
* swrast: flush pending rendering before unmapping buffersBrian Paul2012-01-241-2/+3
|
* swrast: new assertions in _swrast_pixel_address()Brian Paul2012-01-241-0/+8
|
* swrast: use _swrast_pixel_address() in more placesBrian Paul2012-01-242-7/+15
|
* swrast: s/Data/Map/ in swrast_texture_imageBrian Paul2012-01-245-14/+14
| | | | To indicate that it points to mapped texture memory.
* swrast: remove gl_renderbuffer::DataType check in DrawPixels()Brian Paul2012-01-241-5/+8
| | | | The field will be going away so update this code.
* swrast: remove gl_renderbuffer::DataType assertionsBrian Paul2012-01-243-3/+0
| | | | This field will go away, so remove some uses of it.
* swrast: make _swrast_get_values(), _swrast_get_row() staticBrian Paul2012-01-242-23/+12
| | | | They were only called from in s_span.c
* swrast: remove dstType param from _swrast_read_rgba_span()Brian Paul2012-01-243-7/+7
| | | | It was always GL_FLOAT.
* swrast: remove unused _swrast_put_row()Brian Paul2012-01-242-40/+0
|
* swrast: Use fixed-function processing instead _TexEnvProgram for DrawPixelsIan Romanick2012-01-241-2/+21
| | | | | | | | | | | | | | | | | | | | | | | This is a hack to work around drivers such as i965 that: - Set _MaintainTexEnvProgram to generate GLSL IR for fixed-function fragment processing. - Don't call _mesa_ir_link_shader to generate Mesa IR from the GLSL IR. - May use swrast to handle glDrawPixels. Since _mesa_ir_link_shader is never called, there is no Mesa IR to execute. Instead do regular fixed-function processing. Even on platforms that don't need this, the software fixed-function code is much faster than the software shader code. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44749
* swrast: Fix unsigned promotion in pointer arithmeticChad Versace2012-01-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | When rowstride was negatie, unsigned promotion caused a segfault here: 299│ if (rb->Format == MESA_FORMAT_S8) { 300│ const GLuint rowStride = rb->RowStride; 301│ for (i = 0; i < count; i++) { 302│ if (x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) { 303├> stencil[i] = *(map + y[i] * rowStride + x[i]); 304│ } 305│ } 306│ } Fixes segfault in oglconform separatestencil-neu(NonPolygon.BothFacesBitmapCoreAPI), though test still fails. Note: This is a candidate for the stable branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43327 Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* swrast: use BITFIELD64_BIT() macro to fix MSVC warningsBrian Paul2012-01-123-5/+5
| | | | | | NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* mesa: remove _mesa_ffs(), implement ffs() for non-GNU platformsBrian Paul2012-01-121-2/+2
| | | | | | | | | | | Call ffs() and ffsll() everywhere. Define our own ffs(), ffsll() functions when the platform doesn't have them. v2: remove #ifdef _WIN32, __IBMC__, __IBMCPP_ tests inside ffs() implementation. The #else clause was recursive. Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: Alexander von Gluck <[email protected]>
* swrast: convert blit_linear() to Map/UnmapRenderbuffer()Brian Paul2012-01-091-25/+158
| | | | Reviewed-by: Eric Anholt <[email protected]>
* swrast: fix Z testing of points/lines for 16-bit depth buffersBrian Paul2012-01-071-7/+29
| | | | | | | We were comparing 32-bit Z buffer values against 16-bit fragment values. Need to do scaling like for the 24-bit case. Triangle Z testing was OK since it didn't hit this code path.
* swrast: s/GLbitfield/GLbitfield64/ for sw_span::arrayAttribsBrian Paul2012-01-074-6/+8
| | | | This is a bitfield of FRAG_BIT_x values so it should be 64-bits now.
* swrast: s/GLint/GLuint/ to silence MSVC signed/unsigned comparison warningBrian Paul2012-01-071-2/+2
|
* swrast: remove s_depthstencil.[ch] filesBrian Paul2012-01-062-830/+0
| | | | | | The code is no longer used. Reviewed-by: Eric Anholt <[email protected]>
* swrast: remove calls to _swrast_update_depth/stencil_buffer()Brian Paul2012-01-061-23/+0
| | | | | | | These functions updated the gl_renderbuffer::_DepthBuffer and _StencilBuffer fields. But those fields are no longer used. Reviewed-by: Eric Anholt <[email protected]>
* swrast: Convert the glBlitFramebuffer(GL_NEAREST) path to MapRenderbuffer().Eric Anholt2012-01-061-39/+150
| | | | | | | | Fixes on i965: ARB_depth_buffer_float/fbo-depthstencil-GL_DEPTH32F_STENCIL8-blit ARB_depth_buffer_float/fbo-stencil-GL_DEPTH32F_STENCIL8-blit Reviewed-by: Brian Paul <[email protected]>
* swrast: Fix use of uninitialized value in rbmapping changes.Eric Anholt2012-01-061-1/+1
| | | | | | | | | I'm so surprised that gcc didn't catch this that I feel like I must be misreading. srcMap is what we initialize (along with dstMap) from this map value right after this check. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Use the fast copypixels code to implement fast glBlitFramebuffer().Eric Anholt2012-01-063-139/+46
| | | | | | | | They were meaning to do the same thing of memcpying rows, so just write the code once. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Move the check for fast_copy_pixels() ability to caller.Eric Anholt2012-01-061-9/+5
| | | | | | | | I'm going to reuse this function from glBlitFramebuffer() handling, which wants to do the same thing. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: use memmove() instead of memcpy() in the SHIFT_ARRAY macroBrian Paul2012-01-051-1/+1
| | | | | | | | | | | The src/dst arrays would overlap but dst was less than src so a simple version of memcpy() would do the right thing. But this isn't guaranteed when memcpy() is optimized. Fixes demos/copypix when the dest region was clipped by the left side of the window. Reviewed-by: Adam Jackson <[email protected]>
* 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]>