aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* util/disk_cache: allow drivers to pass a directory structureTimothy Arceri2017-02-173-16/+36
| | | | | | | | | | | | | | In order to avoid costly fallback recompiles when cache items are created with an old version of Mesa or for a different gpu on the same system we want to create directories that look like this: ./{TIMESTAMP}_{LLVM_TIMESTAMP}/{GPU_ID} Note: The disk cache util will take a single timestamp string, it is up to the backend to concatenate the llvm string with the mesa string if applicable. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: remove cache creation from _mesa_initialize_context()Timothy Arceri2017-02-171-5/+0
| | | | | | | We will change the way we create the cache directory in the following patches. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa/glsl: build string of dri options and use as input to building sha ↵Timothy Arceri2017-02-176-0/+66
| | | | | | for shaders Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: reserve parameter storage on cache restoreTimothy Arceri2017-02-171-0/+1
| | | | | | | Since we know how big the list will be we can allocate the storage upfront. Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: don't try to load/store buffer object values in the cacheTimothy Arceri2017-02-171-2/+11
| | | | | | Also add an assert to catch buffer overflows. Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: don't reprocess or clear UBOs on cache fallbackTimothy Arceri2017-02-172-36/+42
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: skip more uniform initialisation when doing fallback linkingTimothy Arceri2017-02-172-11/+17
| | | | | | | We already pull these values from the metadata cache so no need to recreate them. Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: don't lose uniform values when falling back to full compileTimothy Arceri2017-02-172-10/+25
| | | | | | | | | Here we skip the recreation of uniform storage if we are relinking after a cache miss. This is improtant because uniform values may have already been set by the application and we don't want to reset them. Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: don't reference shader prog data during cache fallbackTimothy Arceri2017-02-172-2/+4
| | | | | | We already have a reference. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/glsl: add cache_fallback flag to gl_shader_program_dataTimothy Arceri2017-02-172-1/+3
| | | | | | | | | | | This will allow us to skip certain things when falling back to a full recompile on a cache miss such as avoiding reinitialising uniforms. In this change we use it to avoid reading the program metadata from the cache and skipping linking during a fallback. Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: add api and glsl version to hash generation for shadersTimothy Arceri2017-02-171-0/+8
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: cache uniform valuesTimothy Arceri2017-02-171-0/+33
| | | | | | | These may be lowered constant arrays or uniform values that we set before linking so we need to cache the actual uniform values. Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: make uniform values helper available for use elsewhereTimothy Arceri2017-02-172-1/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: cache some more image metadataTimothy Arceri2017-02-171-0/+10
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: add support for caching atomic buffersTimothy Arceri2017-02-171-0/+89
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: add shader cache support for buffer blocksTimothy Arceri2017-02-171-0/+163
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: store subroutine remap table in shader cacheTimothy Arceri2017-02-171-6/+42
| | | | | | V2: use new helpers to store/restore table entries. Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: add support for caching subroutinesTimothy Arceri2017-02-171-0/+107
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: add support for caching shaders with xfb qualifiersTimothy Arceri2017-02-172-1/+121
| | | | | | | | For now this disables the shader cache when transform feedback is enabled via the GL API as we don't currently allow for it when generating the sha for the shader. Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: add shader cache support for samplersTimothy Arceri2017-02-171-0/+18
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: add basic support for resource list to shader cacheTimothy Arceri2017-02-171-0/+121
| | | | | | This initially adds support for simple uniforms and varyings. Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: fix uniform remap table cache when explicit locations usedTimothy Arceri2017-02-171-7/+49
| | | | | | | | V2: don't store pointers use an enum instead to flag what should be restored. Also do the work in a helper that we will later use for the subroutine remap table. Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: Serialize three additional hash tables with program metadataCarl Worth2017-02-171-0/+74
| | | | | | | | | | | | | | | | The three additional tables are AttributeBindings, FragDataBindings, and FragDataIndexBindings. The first table (AttributeBindings) was identified as missing by trying to test the shader cache with a program that called glGetAttribLocation. Many thanks to Tapani Pälli <[email protected]>, as it was review of related work that he had done previously that pointed me to the necessity to also save and restore FragDataBindings and FragDataIndexBindings. Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: use correct shader source in case of cache fallbackTimothy Arceri2017-02-174-4/+25
| | | | | | | | | | | | | | | | | The scenario is: glShaderSource glCompileShader <-- deferred due to cache hit of shader glShaderSource <-- with new source code glAttachShader glLinkProgram <-- no cache hit for program At this point we need to compile the original source when we fallback. Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: make use of on disk shader cacheTimothy Arceri2017-02-173-0/+29
| | | | | | | | | | | | | | | The hash key for glsl metadata is a hash of the hashes of each GLSL source string. This commit uses the put_key/get_key support in the cache put the SHA-1 hash of the source string for each successfully compiled shader into the cache. This allows for early, optimistic returns from glCompileShader (if the identical source string had been successfully compiled in the past), in the hope that the final, linked shader will be found in the cache. This is based on the intial patch by Carl. Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: add initial implementation of shader cacheTimothy Arceri2017-02-174-1/+633
| | | | | | | | | | | | | | | | | | | | | | | | | | | This uses disk_cache.c to write out a serialization of various state that's required in order to successfully load and use a binary written out by a drivers backend, this state is referred to as "metadata" throughout the implementation. This initial version is intended to work with all stages beside compute. This patch is based on the initial work done by Carl. V2: extend the file's doxygen comment to cover some of the design decisions. V3: - skip cache for fixed function shaders - add int64 support - fix glsl IR program parameter caching/restore and cache the parameter values which are used by gallium backends. - use new link status enum V4: - add compute program support Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: use shared emit_umsb helper.Dave Airlie2017-02-161-22/+2
| | | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: use shared umsb helper.Dave Airlie2017-02-161-17/+1
| | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeon/ac: add emit umsb shared code.Dave Airlie2017-02-162-0/+29
| | | | | | | | Since we shared imsb, makes sense to share umsb. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeon/ac: use llvm.amdgcn.sffbh intrinsic instead of AMDGPU.flbit.i32Dave Airlie2017-02-161-1/+2
| | | | | | | | Use the newer intrinsic. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi: use shared emit imsb code.Dave Airlie2017-02-161-25/+3
| | | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: use shader imsb emission code.Dave Airlie2017-02-161-17/+1
| | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeon/ac: add ac_emit_imsb helper.Dave Airlie2017-02-162-0/+28
| | | | | | | | | We want to use a different intrinsic on newer llvm, so move this code to a shared area. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* egl: _eglFilterArray's filter is always non-nullEmil Velikov2017-02-161-18/+9
| | | | | | | Drop the extra handling and assert() if things change in the future. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* docs: add hyperlink to the releasing documentationEmil Velikov2017-02-161-0/+1
| | | | | | | | Other files such as xlibdriver.html and versions.html explicitly left out, for now. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* util/disk_cache: do not allow space in MESA_GLSL_CACHE_MAX_SIZEEmil Velikov2017-02-161-2/+0
| | | | | | | No other env var used in mesa allows for space in the variable contents. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Timothy Arceri <[email protected]>
* configure.ac: remove unneeded trailing semicolonEmil Velikov2017-02-161-11/+11
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* r100: use correct libdrm_radeon macroEmil Velikov2017-02-161-6/+2
| | | | | | | | | | Remove local definition of RADEON_INFO_TILE_CONFIG and use the correct macro provided by libdrm_radeon RADEON_INFO_TILING_CONFIG. Latter was present as of libdrm 2.4.22, sirca 2010. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* winsys/radeon: remove fall-back definesEmil Velikov2017-02-163-47/+0
| | | | | | | Provided by libdrm as of last commit. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* configure.ac: bump LIBDRM_RADEON requirement to 2.4.71Emil Velikov2017-02-161-1/+1
| | | | | | | | Such that we can remove all the local fall-back definitions and use the official UABI ones. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* bin/get-fixes-pick-list.sh: add new scriptEmil Velikov2017-02-161-0/+61
| | | | | | | | | The script parses the "Fixes" tags and nominates respective commit if applicable. Cc: "13.0 17.0" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* bin/get-pick-list.sh: remove ancient way of nominating patchesEmil Velikov2017-02-161-1/+1
| | | | | | | | | The old way of nominating patches [NOTE: .*[Cc]andidate] was deprecated and has been unused for approx. 3 years. Cc: "13.0 17.0" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* bin/get-pick-list.sh: limit `git grep ...' only as neededEmil Velikov2017-02-161-2/+5
| | | | | | | | Analogous to previous commit. Cc: "13.0 17.0" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* bin/get-typod-pick-list.sh: limit `git grep ...' to only as neededEmil Velikov2017-02-161-2/+5
| | | | | | | | | | | | | | The currently used range HEAD..origin/master is far too broad. It looks for nominations within the already_landed list (branchpoint..HEAD). Similarly we look for already_landed whiting the [possible] nominations Rand branchpoint..origin/master. Improve things by limiting the look ups to the branch point. Cc: "13.0 17.0" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* bin/get-extra-pick-list: rework to use already_picked listEmil Velikov2017-02-161-8/+11
| | | | | | | | | | | | Currently we loop (git log --grep) to check if the fix has landed. We can simplify and make things faster by storing the already_picked list and grep ping through it. Slim down the message while we're here. Cc: "13.0 17.0" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* bin/get-extra-pick-list: use git merge-base to get the branchpointEmil Velikov2017-02-161-2/+1
| | | | | | | | | | Since mesa development history is linear and the only diversion is at the branchpoint. Thus we can drop the ad-hoc parsing and use git merge-base to retrieve it. Cc: "13.0 17.0" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* docs: provide some tips where to obtain Mesa binariesEmil Velikov2017-02-161-2/+8
| | | | | | | | | Mention the generic channels (PPA, Corp, other) as well as give a couple of examples. Even if the latter became out of date the former should a be good guide. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* docs/submittingpatches: assorted grammar fixesEmil Velikov2017-02-161-5/+5
| | | | | | | Cc: Ben Crocker <[email protected]> Suggested-by: Ben Crocker <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* docs/releasing: update the website sectionEmil Velikov2017-02-161-15/+2
| | | | | | | | | | Things are automated via git hooks. Cc: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> --- Guys, let me know when things are in place.
* docs/releasing: tweak the glxinfo/glxgear/etc. command linesEmil Velikov2017-02-161-12/+16
| | | | | | | | | | Print only the information needed. Namely: *info: the DRI module picked and the vendor/renderer strings *gears: everything but the "...configuration file..." line(s) v2: (Eric) Use "2>&1 |" over "|&", properly escape &. Signed-off-by: Emil Velikov <[email protected]>