summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_texcombine.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't cast the return value of malloc/reallocMatt Turner2012-09-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has been generated by the following Coccinelle semantic patch: // Don't cast the return value of malloc/realloc. // // Casting the return value of malloc/realloc only stands to hide // errors. @@ type T; expression E1, E2; @@ - (T) ( _mesa_align_calloc(E1, E2) | _mesa_align_malloc(E1, E2) | calloc(E1, E2) | malloc(E1) | realloc(E1, E2) )
* mesa: s/MALLOC/malloc/Brian Paul2012-09-011-1/+1
| | | | | | | v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* swrast: Support sampler object for texture fetching statePauli Nieminen2012-08-011-19/+23
| | | | | | | | | | | | 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-4/+4
| | | | We'll get rid of MAX_WIDTH, MAX_HEIGHT soon.
* swrast: fix unmatched span->array->ChanTypeYuanhan Liu2011-11-211-0/+4
| | | | | | | | | | | texture_combine converts the result rgba to CHAN_TYPE from FLOAT. At the same time, make sure the span->array->ChanType is changed, too. v2: pick a nicer comment from Brian Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* swrast: simplify the prototype of function texture_combineYuanhan Liu2011-11-211-10/+9
| | | | | | | | | | | | Parameter n and rgbaChan are both from structure span, thus using span as paramter to simplify the prototype. Function texture_combine is only used by _swrast_texture_span, so I guess it's safe to do so. This patch is mainly for the next patch. Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* swrast: Fix memory leak in out-of-memory path.Vinson Lee2011-10-251-0/+1
| | | | | | Fixes Coverity resource leak defect. Reviewed-by: Brian Paul <[email protected]>
* swrast: fix delayed texel buffer allocation regressionBrian Paul2011-10-031-20/+20
| | | | | | | | Commit 617cdcd4c7b1cffb584c829c35bdf9c9bf04627b delayed the texel buffer allocation until texture_combine() is called. But the texel buffer is needed sooner in _swrast_texture_span() at line 649. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=41433
* mesa: Delay s_texcombine.c memory allocation until it's used.Eric Anholt2011-10-011-0/+20
| | | | | | Generally we're using fragment programs in all our drivers, so wasting 4MB for code that's never called is pretty lame. Reduces i965 memory allocation for a short shader program from 21,932,128B to 17,737,816B.
* 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: initial multi-threaded span renderingAndreas Fänger2011-08-111-0/+4
| | | | | | | | Optional parallel rendering of spans using OpenMP. Initial implementation for aa triangles. A new option for scons is also provided to activate the openmp support (off by default). Signed-off-by: Brian Paul <[email protected]>
* swrast: anisotropic filtering extensionAndreas Faenger2011-05-181-0/+12
| | | | | | | | | 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]>
* mesa: move sampler state into new gl_sampler_object typeBrian Paul2011-04-101-10/+12
| | | | | | 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().
* mesa: remove GL_SGI_texture_color_table supportBrian Paul2011-02-281-5/+0
| | | | | | It was only implemented in the swrast driver and probably not used by any applications. A modern app would use a dependent/chained texture lookup in the fragment shader.
* swrast: avoid large stack allocations in tex combine codeBrian Paul2010-12-021-6/+39
|
* mesa: split up the image.c fileBrian Paul2010-10-231-1/+1
| | | | | | New files: pack.c - image/row packing/unpacking functions pixeltransfer.c - pixel scale/bias/lookup functions
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-2/+2
|
* mesa: rename src/mesa/shader/ to src/mesa/program/Brian Paul2010-06-101-1/+1
|
* mesa: Fix compiler warningsKarl Schultz2010-02-131-1/+1
| | | | | Add explicit casts, fix constant types, fix variable types. Fixes about 340 warnings in MSFT Visual Studio.
* swrast: silence double->float assignment warningsBrian Paul2010-01-271-10/+10
| | | | Reported by Karl Schultz.
* swrast: Remove unnecessary header from s_texcombine.c.Vinson Lee2010-01-121-1/+0
|
* swrast: fix pointer arithmetic error in get_texel_array()Brian Paul2009-04-201-2/+1
| | | | This came from commit 1b2ab023673261b4b942e1126c0b599d02fbd4a0
* swrast: remove some unneeded CHAN_TYPE!=GL_FLOAT codeBrian Paul2009-04-091-7/+0
|
* swrast: more texcombine clean-upsBrian Paul2009-04-061-21/+10
|
* swrast: asst. clean-ups in texcombine codeBrian Paul2009-04-061-26/+19
|
* swrast: fix incorrect arithmetic for GL_ADD_SIGNED/GL_COMBINE4_NV modeBrian Paul2009-04-061-6/+6
|
* swrast: remove old texture_apply() code; always use texture combine codeBrian Paul2009-04-011-396/+5
|
* swrast: fix bad optimization checkBrian Paul2009-04-011-1/+2
|
* swrast: remove unused parameterBrian Paul2009-04-011-6/+1
|
* swrast: minor improvements, clean-ups in texcombine codeBrian Paul2009-04-011-9/+8
|
* swrast: use float4_array typedef to simplify the code a bitBrian Paul2009-04-011-54/+71
|
* mesa: texture combine clean-upsBrian Paul2009-04-011-72/+68
| | | | | | Use MAX_COMBINER_TERMS instead of 4. Rename some vars. Update comments.
* swrast: general clean-up of texture combine codeBrian Paul2009-04-011-246/+161
|
* swrast: do texture sampling/combining in floating pointBrian Paul2009-04-011-513/+314
| | | | | The code's cleaner and a step toward supporting float-valued texture sampling. Some optimizations for common cases can be added and re-enabled...
* mesa: add support for ATI_envmap_bumpmapRoland Scheidegger2009-03-121-1/+94
| | | | | | | | add new entrypoints, new texture format, etc translate in texenvprogram.c for drivers using the mesa-generated tex env fragment program also handled in swrast, but not tested (cannot work due to negative texel results not handled correctly)
* swrast: replace macro with inline functionBrian Paul2009-01-301-1/+1
|
* mesa: implement texture swizzling in swrastBrian Paul2009-01-281-0/+39
| | | | And enable GL_EXT_texture_swizzle for software drivers.
* swrast: updates for GL_NV_texture_env_combine4Brian Paul2009-01-231-16/+115
|
* mesa: include needed headerBrian Paul2008-10-101-0/+1
|
* mesa: prefix a bunch of #include lines with "main/".Brian Paul2008-09-181-6/+6
| | | | | This is another step toward removing a whole bunch of -I flags from the cc commands. Still need to address driver code...
* Overhaul/simplify SWvertex and SWspan attribute handling.Brian2007-05-201-1/+0
| | | | | Instead of separate fog/specular/texcoord/varying code, just treat all of them as generic attributes. Simplifies the point/line/triangle functions.
* New SWspanarrays attribs[] array.Brian2007-02-011-2/+4
| | | | | | | Replace texcoord[], varying[], etc. arrays with single attribs[] array, indexed by FRAG_ATTRIB_* values. Eliminates need to copy data into fragment program machine input registers. Will lead to future clean-ups.
* Revamp color table code.Brian Paul2006-10-131-1/+7
| | | | Always store all color tables as both float and ubyte.
* New SWspan and SWspanarrays typedefs.Brian Paul2006-10-011-1/+1
|
* minor simplificationBrian Paul2006-05-181-4/+1
|
* texture EnvColor needs to be converted to GLchan, not GLintBrian Paul2006-05-181-8/+8
|
* fixes for CHAN_BITS!=8Brian Paul2006-04-271-18/+23
|
* In gl_texture_image replace IntFormat with InternalFormat and Format withBrian Paul2005-10-051-1/+1
| | | | _BaseFormat to be consistant with gl_renderbuffer.
* GL_EXT_packed_depth_stencil changesBrian Paul2005-10-011-1/+1
|
* Rework the texture filtering functions a bit.Brian Paul2005-09-161-2/+2
| | | | No need to pass the texture unit number as an argument.