summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_span.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: replace VP/FP/ATIfs _Enabled flags with helper functionsMarek Olšák2017-06-221-6/+7
| | | | | | | | These are only used in the GL compatibility profile. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: replace _mesa_update_stencil() with helper functionsMarek Olšák2017-06-221-2/+3
| | | | | | | | | | | | | The idea is to remove the dependency on _mesa_update_state_locked, so that st/mesa can skip it for stencil state updates, and then stop setting _NEW_STENCIL in mesa/main if the driver is st/mesa. The main motivation is to stop invoking _mesa_update_state_locked for certain state groups. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* r200/glsl/st/mesa: use common outputs written fieldTimothy Arceri2016-10-261-1/+1
| | | | | | | | | And set outputs written directly in shader_info. st/mesa changes where: Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* st/mesa/r200/i915/i965: eliminate gl_fragment_programTimothy Arceri2016-10-261-2/+2
| | | | | | | | | | Here we move OriginUpperLeft and PixelCenterInteger into gl_program all other fields have been replace by shader_info. V2: Don't use anonymous union/structs to hold vertex/fragment fields suggested by Ian. Reviewed-by: Jason Ekstrand <[email protected]>
* swrast: Avoid double promotion.Matt Turner2015-07-291-5/+5
| | | | Reviewed-by: Iago Toral Quiroga <[email protected]>
* swrast: replace __FUNCTION__ with __func__Marius Predut2015-04-141-1/+1
| | | | | | | | | | | Consistently just use C99's __func__ everywhere. The patch was verified with Microsoft Visual studio 2013 redistributable package(RTM version number: 18.0.21005.1) Next MSVC versions intends to support __func__. No functional changes. Acked-by: Matt Turner <[email protected]> Signed-off-by: Marius Predut <[email protected]>
* swrast: remove unneeded #include of colormac.hBrian Paul2015-04-011-1/+0
| | | | | Acked-by: Matt Turner <[email protected]> Reviewed-by: Mark Janes <[email protected]>
* swrast: Use BITFIELD64_BIT for arrayAttribs.Jose Fonseca2015-03-181-1/+1
| | | | | | | | | As VARYING_SLOT_MAX can be bigger than 32. I'll probably stop building swrast with MSVC in the near future, but this seems a real bug regardless. Reviewed-by: Brian Paul <[email protected]>
* mesa: replace FABSF with fabsfBrian Paul2015-02-241-4/+5
| | | | Reviewed-by: Matt Turner <[email protected]>
* swrast: fix a few release build warningsBrian Paul2015-02-241-0/+1
|
* mesa: Use assert() instead of ASSERT wrapper.Matt Turner2015-02-231-30/+30
| | | | Acked-by: Eric Anholt <[email protected]>
* swrast: fix multiple color buffer writingBrian Paul2015-02-191-11/+14
| | | | | | | | | | If a fragment program wrote to more than one color buffer, the first fragment color got replicated to all dest buffers. This fixes 5 piglit FBO tests, including fbo-drawbuffers-arbfp. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45348 Cc: "10.4, 10.5" <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* swrast: use new _mesa_base_tex_image() helperBrian Paul2015-01-051-1/+2
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke2013-04-231-3/+4
| | | | | | | | | | | | | | The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <[email protected]>
* mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <[email protected]>
* mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | | Generated automatically be the following shell command: $ git grep 'BRIAN PAUL BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/BRIAN PAUL/THE AUTHORS/' {} The intention here is to protect all authors, not just Brian Paul. I believe that was already the sensible interpretation, but spelling it out is probably better. More practically, it also prevents people from accidentally copy & pasting the license into a new file which says Brian is not liable when he isn't even one of the authors. Reviewed-by: Brian Paul <[email protected]>
* Replace gl_frag_attrib enum with gl_varying_slot.Paul Berry2013-03-151-56/+56
| | | | | | | | | | | | This patch makes the following search-and-replace changes: gl_frag_attrib -> gl_varying_slot FRAG_ATTRIB_* -> VARYING_SLOT_* FRAG_BIT_* -> VARYING_BIT_* Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Brian Paul <[email protected]>
* mesa: remove SQRTF, use sqrtf. Convert INV_SQRT() to inline function.Brian Paul2012-09-031-2/+2
| | | | | | | We were already defining sqrtf where we don't have the C99 version. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* swrast: Support sampler object for texture fetching statePauli Nieminen2012-08-011-3/+5
| | | | | | | | | | | | swrast needs to pass sampler object into all texture fetching functions to use correct sampling state when sampler object is bound to the unit. The changes were made using half manual regular expression replace. v2: Fix NULL deref in _swrast_choose_triangle(), because the _Current values aren't set yet, so we need to look at our texObj2D. (anholt) Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: define, use SWRAST_MAX_WIDTH/HEIGHTBrian Paul2012-02-241-1/+1
| | | | We'll get rid of MAX_WIDTH, MAX_HEIGHT soon.
* swrast: remove MAX_WIDTH array in s_span.cBrian Paul2012-02-241-1/+2
|
* swrast: fix span color type selectionBrian Paul2012-02-121-7/+7
| | | | | | | | | | | | | | | | Fixes a regression from commit 660ed923ded3552e023ef8c3dd9f92e6792f1bd2. The basic idea is to look at the format of the dest renderbuffer and choose either GLubyte or GLfloat for colors. The previous code used _mesa_format_to_type_and_comps() which could return a bunch types other than ubyte/float. Determine the datatype at renderbuffer mapping time to avoid frequent calls to the format query functions. NOTE: This is a candidate for the 8.0 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45578 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45577
* mesa: Convert colors if span ChanType and renderbuffer data type don't matchIan Romanick2012-02-021-4/+15
| | | | | | | | | | | | This is a partial revert of f9874fe. It turns out that the types don't always match. Specifically, this can happen when doing glCopyPixels from a float FBO to a RGBA8 FBO. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45429 Reviewed-by: Brian Paul <[email protected]>
* swrast: Fix fixed-function fragment processingChad Versace2012-01-271-27/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On i965, _mesa_ir_link_shader is never called. As a consequence, the current fragment program (ctx->FragmentProgram->_Current) exists but is invalid because it has no instructions. Yet swrast continued to attempt to use the empty program. To avoid using the empty program, this patch 1) defines a new function, _swrast_use_fragment_program, which checks if the current fragment program exists and differs from the fixed function fragment program, and, when appropriate, 2) replaces checks of the form if (ctx->FragmentProgram->_Current == NULL) with if (_swrast_use_fragment_program(ctx)) Fixes the following oglconform regressions on i965/gen6: api-fogcoord(basic.allCases.log) api-mtexcoord(basic.allCases.log) api-seccolor(basic.allCases.log) api-texcoord(basic.allCases.log) blend-separate(basic.allCases) colorsum(basic.allCases.log) The tests were ran with the GLXFBConfig: visual x bf lv rg d st colorbuffer sr ax dp st accumbuffer ms cav id dep cl sp sz l ci b ro r g b a F gb bf th cl r g b a ns b eat ---------------------------------------------------------------------------- 0x021 24 tc 0 32 0 r y . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None (Note: I originally believed that the hunk in _swrast_update_fragment_program was unnecessary. But it is required to fix blend-separate.) Note: This is a candidate for the 8.0 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43327 Reveiwed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* swrast: silence uninitialized var warningsBrian Paul2012-01-261-2/+2
|
* swrast: fix uninitialized variable warningBrian Paul2012-01-241-1/+1
|
* swrast: use swrast_renderbuffer instead of gl_renderbufferBrian Paul2012-01-241-1/+2
|
* swrast: use color packing functions in s_span.cBrian Paul2012-01-241-4/+9
|
* mesa: remove gl_renderbuffer::DataTypeBrian Paul2012-01-241-22/+17
|
* swrast: stop using Put/GetRow/Values() in swrast codeBrian Paul2012-01-241-46/+138
| | | | | 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: make _swrast_get_values(), _swrast_get_row() staticBrian Paul2012-01-241-12/+12
| | | | They were only called from in s_span.c
* swrast: remove dstType param from _swrast_read_rgba_span()Brian Paul2012-01-241-4/+4
| | | | It was always GL_FLOAT.
* swrast: remove unused _swrast_put_row()Brian Paul2012-01-241-35/+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: use BITFIELD64_BIT() macro to fix MSVC warningsBrian Paul2012-01-121-3/+3
| | | | | | NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* swrast: s/GLbitfield/GLbitfield64/ for sw_span::arrayAttribsBrian Paul2012-01-071-2/+3
| | | | This is a bitfield of FRAG_BIT_x values so it should be 64-bits now.
* 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: update renderbuffer format assertionBrian Paul2011-10-231-1/+4
| | | | Failed when exercising i965 swrast fallback rendering.
* swrast: be a bit smarter in clip_span()Brian Paul2011-10-131-1/+4
| | | | If no pixels pass the clip test, return false.
* mesa: s/INLINE/inline/Brian Paul2011-10-011-11/+11
| | | | | | | INLINE is still seen in some files (some generated files, etc) but this is a good start. Acked-by: Kenneth Graunke <[email protected]>
* mesa: move gl_texture_image::Width/Height/DepthScale fields to swrastBrian Paul2011-09-221-2/+5
| | | | | | | These fields were only used for swrast so move them into swrast_texture_image. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Use ColorLogicOpEnabled instead of _LogicOpEnabledIan Romanick2011-09-191-1/+1
| | | | | | | | | | Since GL_EXT_blend_logic_op is removed, _LogicOpEnabled and ColorLogicOpEnabled always have the same value. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* swrast: silence unused var warningsFabio Pedretti2011-08-091-1/+1
| | | | Signed-off-by: Brian Paul <[email protected]>
* swrast: remove an unused-but-set variableMarek Olšák2011-07-151-11/+0
|
* swrast: anisotropic filtering extensionAndreas Faenger2011-05-181-0/+7
| | | | | | | | | Anisotropic filtering extension for swrast intended to be used by osmesa to create high quality renderings. Based on Higher Quality Elliptical Weighted Avarage Filter (EWA). A 2nd implementation using footprint assembly is also provided. Signed-off-by: Brian Paul <[email protected]>
* swrast: Add LUMINANCE, INTENSITY, LUMINANCE_ALPHA to span asserts.Eric Anholt2011-04-201-0/+3
| | | | | | Fixes ARB_texture_float/fbo-alphatest-formats. Reviewed-by: Brian Paul <[email protected]>
* swrast: Don't assert against glReadPixels of GL_RED and GL_RG.Eric Anholt2011-04-181-1/+4
| | | | | | | | Everything appears to already be in place for this. Fixes aborts in: ARB_texture_rg/fbo-alphatest-formats-float ARB_texture_rg/fbo-blending-formats-float. Reviewed-by: Brian Paul <[email protected]>
* mesa: move sampler state into new gl_sampler_object typeBrian Paul2011-04-101-1/+1
| | | | | | gl_texture_object contains an instance of this type for the regular texture object sampling state. glGenSamplers() generates new instances of gl_sampler_object which can override that state with glBindSampler().
* swrast: report data type in error messageBrian Paul2011-03-171-1/+2
|