summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_stencil.c
Commit message (Collapse)AuthorAgeFilesLines
* swrast: remove MAX_WIDTH arrays in stencil codeBrian Paul2012-02-241-4/+11
| | | | Use some per-context temporary arrays instead.
* swrast: use swrast_renderbuffer instead of gl_renderbufferBrian Paul2012-01-241-2/+3
|
* swrast: use stencil packing function in s_stencil.cBrian Paul2012-01-241-1/+3
|
* swrast: use gl_renderbuffer::StrideInBytes in depth/stencil codeBrian Paul2012-01-241-2/+2
|
* swrast: use _swrast_pixel_address() in more placesBrian Paul2012-01-241-1/+1
|
* 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 _swrast_pixel_address() helper functionBrian Paul2011-12-241-18/+4
| | | | 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: 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: replace GetRow() call with _mesa_unpack_ubyte_stencil_row()Brian Paul2011-12-241-1/+5
| | | | Reviewed-by: Eric Anholt <[email protected]>
* swrast: do depth/stencil clearing with Map/UnmapRenderbuffer()Brian Paul2011-12-241-84/+70
| | | | | | | | 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]>
* mesa: replace GLstencil with GLubyteBrian Paul2011-11-151-93/+91
|
* mesa: s/INLINE/inline/Brian Paul2011-10-011-1/+1
| | | | | | | INLINE is still seen in some files (some generated files, etc) but this is a good start. Acked-by: Kenneth Graunke <[email protected]>
* swrast: don't try to do depth testing if there's no depth bufferBrian Paul2011-08-111-1/+2
| | | | | | | Fixes piglit hiz-depth-stencil-test-fbo-d0-s8 crash. See http://bugs.freedesktop.org/show_bug.cgi?id=37907 NOTE: This is a candidate for the 7.11 branch.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-10/+10
|
* Remove _mesa_memset in favor of plain memset.Kenneth Graunke2010-02-191-2/+2
| | | | This may break the SUNOS4 build, but it's no longer relevant.
* Remove _mesa_memcpy in favor of plain memcpy.Kenneth Graunke2010-02-191-4/+4
| | | | This may break the SUNOS4 build, but it's no longer relevant.
* swrast: minor code consolidationBrian Paul2009-08-301-7/+2
|
* Track two sets of back-face stencil stateIan Romanick2009-01-231-2/+4
| | | | | | | | | | | | Track separate back-face stencil state for OpenGL 2.0 / GL_ATI_separate_stencil and GL_EXT_stencil_two_side. This allows all three to be enabled in a driver. One set of state is set via the 2.0 or ATI functions and is used when STENCIL_TEST_TWO_SIDE_EXT is disabled. The other is set by StencilFunc and StencilOp when the active stencil face is set to BACK. The GL_EXT_stencil_two_side spec has more details. http://opengl.org/registry/specs/EXT/stencil_two_side.txt
* mesa: prefix a bunch of #include lines with "main/".Brian Paul2008-09-181-3/+3
| | | | | This is another step toward removing a whole bunch of -I flags from the cc commands. Still need to address driver code...
* mesa: Always use the original mask to update stencil bufferXiang, Haihao2007-09-181-2/+5
| | | | in stencil_and_ztest_pixels. fix #12263
* clean-up of stencil codeBrian2007-07-111-50/+35
|
* Remove the !rb->Data check that was added a few months ago.Brian2007-04-211-1/+1
| | | | | Was changed while debugging #7205. Broke the shadowtext demo. Revisit this if the problem w/ bug 7205 returns...
* remove invalid assertion (span->facing may be set because of polygonmode)Brian2007-04-191-2/+0
|
* add some rb->Data null ptr checks (bug 7205)Brian2007-03-151-1/+1
|
* silence C++ warningsBrian2007-01-231-5/+7
|
* New SWspan and SWspanarrays typedefs.Brian Paul2006-10-011-3/+3
|
* C++ fixes, mostly casts (Stephane Conversy)Brian Paul2005-12-061-5/+5
|
* Use new gl_framebuffer _Depth/_StencilBuffer fields instead ofBrian Paul2005-11-161-5/+5
| | | | | Attachment[BUFFER_DEPTH/STENCIL].Renderbuffer. The former may be wrappers around combined depth/stencil renderbuffers attached at the later points.
* Fix problem in stencil_and_ztest_span() when using h/w stencil buffer.Brian Paul2005-11-151-4/+6
| | | | | Fix a comment typo. Remove some unneeded #includes.
* glDraw/CopyPixels of stencil data didn't obey the stencil write mask. Fixed.Brian Paul2005-09-261-2/+18
|
* Replace gl_renderbuffer.ComponentSizes[] with separate RedBits, GreenBits,Brian Paul2005-09-221-1/+1
| | | | BlueBits, etc fields.
* changed a renderbuffer checkBrian Paul2005-09-221-2/+1
|
* remove STENCIL_MAXBrian Paul2005-09-201-4/+6
|
* Fix potential segfault when trying to read pixels outside renderbuffer bounds.Brian Paul2005-09-161-4/+6
| | | | Use _swrast_get_values() which does clipping.
* OpenGL 2.0's two-sided stencil feature wasn't implemented correctly.Brian Paul2005-09-131-1/+1
| | | | | See comment near top of stencil.c for info about OpenGL 2.0 vs. GL_EXT_stencil_two_side.
* Clear either 8 or 16-bit stencil buffers.Brian Paul2005-09-131-27/+66
|
* Major check-in of changes for GL_EXT_framebuffer_object extension.Brian Paul2005-05-041-272/+145
| | | | | | | Main driver impacts: - new code for creating the Mesa GLframebuffer - new span/pixel read/write code Some drivers not yet updated/tested.
* new comments and assertionsBrian Paul2004-11-271-0/+2
|
* fix stencil index bug (#964704)Brian Paul2004-06-021-4/+3
|
* Removed all RCS / CVS tags (Id, Header, Date, etc.) from everything.Ian Romanick2003-06-051-1/+0
|
* replace _mesa_ prefix with _swrast_, remove s_histogram.[ch]Brian Paul2003-03-251-10/+10
|
* Header file clean-up:Brian Paul2002-10-241-2/+2
| | | | | | | | 1. Remove all.h and PC_HEADER junk. 2. Rolled mem.c and mem.h into imports.c and imports.h 3. Include imports.h instead of mem.h Restore _mesa_create/initialize_context() to be like they were in 4.0.4 New wrappers for a few std C functions: _mesa_atoi(), _mesa_strstr(), etc.
* finished up GL_EXT_stencil_two_sideBrian Paul2002-10-021-4/+6
|
* GL_EXT_stencil_two_side extension, not 100% complete yet.Brian Paul2002-09-061-73/+83
|
* struct sw_span is again allocated on the stack, but the arrays of spanBrian Paul2002-08-071-5/+5
| | | | | | | data are broken out into a new struct span_arrays which is allocated per-context (to avoid huge stack allocations - a problem on Windows). This lets us use span.redStep instead of span->redStep (for example) to hopefully get slightly better performance in the triangle functions.
* fixed Width/Height cut&paste typoBrian Paul2002-04-201-3/+3
|
* casts to fix GLint/GLuint mismatchesBrian Paul2002-04-191-9/+12
|