summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/cso_cache/cso_cache.c
Commit message (Collapse)AuthorAgeFilesLines
* cso: don't release sampler states that are boundMarek Olšák2016-12-141-1/+3
| | | | | | | | | | | | | | | This fixes random radeonsi GPU hangs in Batman Arkham: Origins (Wine) and probably many other games too. cso_cache deletes sampler states when the cache size is too big and doesn't check which sampler states are bound, causing use-after-free in drivers. Because of that, radeonsi uploaded garbage sampler states and the hardware went bananas. Other drivers may have experienced similar issues. Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net> (cherry picked from commit 6dc96de303290e8d1fc294da478c4f370be98dea)
* gallium/auxiliary: Sanitize NULL checks into canonical formEdward O'Callaghan2015-12-061-1/+1
| | | | | | | | | | Use NULL tests of the form `if (ptr)' or `if (!ptr)'. They do not depend on the definition of the symbol NULL. Further, they provide the opportunity for the accidental assignment, are clear and succinct. Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* gallium: replace INLINE with inlineIlia Mirkin2015-07-211-4/+4
| | | | | | | | | | | | | | | | Generated by running: git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g' git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g' git checkout src/gallium/state_trackers/clover/Doxyfile and manual edits to src/gallium/include/pipe/p_compiler.h src/gallium/README.portability to remove mentions of the inline define. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Marek Olšák <marek.olsak@amd.com>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/alanh@tungstengraphics.com/alanh@vmware.com/ s/jens@tungstengraphics.com/jowen@vmware.com/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g s/keithw\?@tungstengraphics.com/keithw@vmware.com/g s/michel@tungstengraphics.com/daenzer@vmware.com/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/zack@tungstengraphics.com/zackr@vmware.com/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/cso: kill off non-functional shader cachingMarek Olšák2012-02-211-24/+0
| | | | | | | | | Suggested by José. We don't provide shader caching in CSO. Most of the time the api provides object semantics for shaders anyway, and the cases where it doesn't (eg mesa's internall-generated texenv programs), it will be up to the state tracker to implement their own specialized caching.
* cso: move cso hashes to a more table driven schemeDave Airlie2011-06-031-81/+17
| | | | | | this removes a bad branch pain in the hash table lookup fn. Signed-off-by: Dave Airlie <airlied@redhat.com>
* gallium: use cso state handling for pipe_vertex_element stateRoland Scheidegger2010-02-181-0/+21
|
* gallium: fix blend state csoRoland Scheidegger2010-01-301-22/+1
| | | | | | | if independent blend state was disabled, only the data from first rt was stored, however the comparison used the full state, hence there never was a match and always a new object was created. Fixes a huge performance drop with llvmpipe due to recompilation.
* cso: possible null pointer dereferenceZack Rusin2009-07-061-0/+4
| | | | reported by clang static analyzer
* util: Move p_debug.h into util module.José Fonseca2009-02-181-1/+1
| | | | | The debug functions depend on several util function for os abstractions, and these depend on debug functions, so a seperate module is not possible.
* gallium: refactor/replace p_util.h with util/u_memory.h and util/u_math.hBrian Paul2008-08-241-1/+2
| | | | Also, rename p_tile.[ch] to u_tile.[ch]
* try to fix the deleting of the bound cso during cleanup of the hashZack Rusin2008-04-301-8/+32
|
* fix the simple hash finding function and use itZack Rusin2008-04-231-2/+2
|
* In case the 'func' is deleting the state move the iterator beforeZack Rusin2008-04-221-1/+1
| | | | calling it.
* cso: propogate one easy error - many moreKeith Whitwell2008-04-211-0/+2
|
* gallium: Fix memory leak.José Fonseca2008-03-231-19/+22
| | | | | | pipe cso's were being destroyed, but the hash elements themselves not. proper fix is IMHO add a destructor callback to cso_hash.
* fix double deletionZack Rusin2008-03-101-1/+4
| | | | | plus, if the current hash is bigger than max size make sure we delete enough from it
* gallium: Fix build on Windows.Michal Krol2008-02-261-1/+1
|
* implement cache limits for csoZack Rusin2008-02-261-42/+102
| | | | by default set to 4096, which might be on the large side
* add an explicit callback decleration and use it to silence warningsZack Rusin2008-02-261-1/+1
|
* hide cso cache definition and add some initial code for size limitingZack Rusin2008-02-261-0/+22
| | | | the caches
* implement deleting of driver side cached state in cso'sZack Rusin2008-02-261-0/+88
|
* Replace standand library functions by portable ones.José Fonseca2008-02-251-2/+4
|
* gallium: Add cso convenience routine (from Keith's patch).José Fonseca2008-02-231-0/+20
|
* Code reorganization: s/aux/auxiliary/.José Fonseca2008-02-151-0/+181
"aux" is a reserved name on Windows (X_X)