summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* 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]>
* 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]>
* nir: handle some 64-bit integer conversionsDave Airlie2017-02-161-7/+19
| | | | | | | | These are enough for the spir-v generator to handle UConvert and SConvert operations, and fix the 4 tests in CTS. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nir: handle 64-bit integer types in glsl->nir type conversion.Dave Airlie2017-02-161-0/+6
| | | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* spirv: handle SpvOpUConvert in proper place.Dave Airlie2017-02-161-1/+1
| | | | | | | | This was falling into the quantizetof16 path. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* spirv: add support for Int64 capabilityDave Airlie2017-02-162-1/+4
| | | | | | | | This just adds the support at the spirv->nir level for the Int64 cap. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* spirv/nir: add support for int64Dave Airlie2017-02-162-2/+32
| | | | | | | This adds the spirv->nir conversion for int64 types. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nir/types: add C accessors for 64-bit integer types.Dave Airlie2017-02-162-0/+14
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add fast color clear for b10g11r11Dave Airlie2017-02-161-0/+5
| | | | | | | This is used in DOOM, so provide the fast clear path for it. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: retain gl_shader_programs after glDeleteProgram if they are in useTimothy Arceri2017-02-165-9/+17
| | | | | | | | | | | | | | Fixes regressions from c505d6d852220f4aaaee161465dd2c579647e672. Switching from using gl_shader_program to gl_program for the pipline objects CurrentProgram array meant we were freeing gl_shader_programs immediately after glDeleteProgram was called, but the spec states the program should only get deleted once it is no longer in use. To work around this we add a new ReferencedPrograms array to track gl_shader_programs in use. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: remove tabs in dri xmlconfig.cTimothy Arceri2017-02-161-362/+362
| | | | Acked-by: Nicolai Hähnle <[email protected]>
* mesa: style fixes for dri xmlconfig.cTimothy Arceri2017-02-161-37/+94
| | | | Acked-by: Nicolai Hähnle <[email protected]>
* i965: Do not use purged bo after calling glObjectUnpurgeableChris Wilson2017-02-151-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | If the buffer has been freed by the kernel under memory pressure, it is invalid to try and access the backing storage for that buffer in the future - the backing storage is not recreated automatically. As such we need to mark the GL object as being freed for unretained buffers and so recreate the object on next use. Futhermore from the GL_APPLE_object_purgeable: "In contrast, by calling ObjectUnpurgeableAPPLE with an <option> of UNDEFINED_APPLE, the application is indicating that it intends to recreate the contents of the storage from scratch. Further, the application is is stating that it would like the GL to do only the minimal amount of work set PURGEABLE_APPLE to FALSE. If ObjectUnpurgeableAPPLE is called with the <option> set to UNDEFINED_APPLE, then ObjectUnpurgeableAPPLE will return the value UNDEFINED_APPLE." we must always report GL_UNDEFINED_APPLE when called with glObjectUnpurgeable(GL_UNDEFINED_APPLE). Testcase: piglit/object_purgeable-api-* Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Revert "i915: Always enable GL 2.0 support."Matt Turner2017-02-152-4/+25
| | | | | | | | | | This partially reverts commit 97217a40f97cdeae0304798b607f704deb0c3558. It leaves ES 2.0 support in place per Ian's suggestion, because ES 2.0 is designed to work on hardware like i915. Chrome only uses the GPU if you have GL >= 2.0, and using i915 (and prog_execute) actually hurt performance compared with the software paths.
* anv: Use build-id for pipeline cache UUID.Matt Turner2017-02-152-21/+8
| | | | | | | | The --build-id=... ld flag has been present since binutils-2.18, released 28 Aug 2007. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* util: Add utility build-id code.Matt Turner2017-02-153-0/+149
| | | | | | | | Provides the ability to read the .note.gnu.build-id section of ELF binaries, which is inserted by the --build-id=... flag to ld. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* radv: Add support for shaderStorageImageReadWithoutFormat.Bas Nieuwenhuizen2017-02-152-1/+2
| | | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* spirv: Add support for SpvCapabilityStorageImageReadWithoutFormat.Bas Nieuwenhuizen2017-02-152-1/+5
| | | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Add support for shaderStorageImageWriteWithoutFormat.Bas Nieuwenhuizen2017-02-152-2/+3
| | | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* getteximage: Return correct error value when texure object is not foundEduardo Lima Mitev2017-02-151-2/+4
| | | | | | | | | | | | | | | | | | | | | glGetTextureSubImage() and glGetCompressedTextureSubImage() are currently returning INVALID_OPERATION error when the passed texture argument does not correspond to an existing texture object. However, the error should be INVALID_VALUE instead. From OpenGL 4.5 spec PDF, section '8.11. Texture Queries', page 236: "An INVALID_VALUE error is generated if texture is not the name of an existing texture object." Same wording applies to the compressed version. The INVALID_OPERATION error is coming from the call to _mesa_lookup_texture_err(). This patch uses _mesa_lookup_texture() instead and emits the correct error in the caller. Fixes: GL45-CTS.get_texture_sub_image.errors_test Reviewed-by: Nicolai Hähnle <[email protected]>
* util: Fix a typo in Makefile.sourcesJason Ekstrand2017-02-151-1/+1
| | | | Reviewed-by: Eric Engestrom <[email protected]>
* i965: define default allow_higher_compat_version valueLionel Landwerlin2017-02-151-0/+1
| | | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Matt Turner <[email protected]> Fixes: 9d16f3903e2 ("driconf: add allow_higher_compat_version option")
* drirc: add allow_higher_compat_version for Tropico 5Samuel Pitoiset2017-02-151-0/+4
| | | | | | | | | v2: s/force_compat_profile/allow_higher_compat_version Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* drirc: add allow_higher_compat_version for Crookz - The Big HeistSamuel Pitoiset2017-02-151-0/+4
| | | | | | | | | v2: s/force_compat_profile/allow_higher_compat_version Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* drirc: add allow_higher_compat_version for Worms WMDSamuel Pitoiset2017-02-151-0/+4
| | | | | | | | | v2: s/force_compat_profile/allow_higher_compat_version Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* driconf: add allow_higher_compat_version optionSamuel Pitoiset2017-02-157-2/+25
| | | | | | | | | | | | | | | | | | | Mesa currently doesn't allow to create 3.1+ compatibility profiles mainly because various features are unimplemented and bugs can happen. However, some buggy apps request a compat profile without using any old features unimplemented in mesa, and they fail to start. This option should help some games to run but it's not enough for all (eg. Dying Light). v2: - s/force_compat_profile/allow_higher_compat_version Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: add a HUD query for monitoring the CS thread activityMarek Olšák2017-02-155-1/+29
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* anv: wsi: report presentation error per image requestLionel Landwerlin2017-02-151-8/+15
| | | | | | | | | | | | | | | | vkQueuePresentKHR() takes VkPresentInfoKHR pointer and includes a pResults fields which must holds the results of all the images requested to be presented. Currently we're not filling this field. Also as a side effect we probably want to go through all the images rather than stopping on the first error. This commit also makes the QueuePresentKHR() implementation return the first error encountered. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: "17.0" <[email protected]>
* egl: remove duplicate 0 assignmentEric Engestrom2017-02-151-3/+0
| | | | | | | The memset on the line before already takes care of this. Reviewed-by: Tapani Pälli <[email protected]> Signed-off-by: Eric Engestrom <[email protected]>
* glx/glvnd: Fix GLXdispatchIndex sortingHans de Goede2017-02-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Commit 8bca8d89ef3b ("glx/glvnd: Fix dispatch function names and indices") fixed the sorting of the array initializers in g_glxglvnddispatchfuncs.c because FindGLXFunction's binary search needs these to be sorted alphabetically. That commit also mostly fixed the sorting of the DI_foo defines in g_glxglvnddispatchindices.h, which is what actually matters as the arrays are initialized using "[DI_foo] = glXfoo," but a small error crept in which at least causes glXGetVisualFromFBConfigSGIX to not resolve, breaking games such as "The Binding of Isaac: Rebirth" and "Crypt of the NecroDancer" from Steam not working and possible causes other problems too. This commit fixes the last of the sorting errors, fixing these mentioned games not working. Fixes: 8bca8d89ef3b ("glx/glvnd: Fix dispatch function names and indices") Cc: "13.0" <[email protected]> Cc: "17.0" <[email protected]> Cc: Adam Jackson <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* radv: also fixup event emission to not get culled.Dave Airlie2017-02-151-0/+1
| | | | | | | This is possibly a bad idea, I might have to consider a better one. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* anv: Use vk_foreach_struct for handling extension structsJason Ekstrand2017-02-143-27/+21
| | | | Reviewed-by: Dave Airlie <[email protected]>
* util: Add helpers for iterating over Vulkan extension structsJason Ekstrand2017-02-142-1/+45
| | | | Reviewed-by: Dave Airlie <[email protected]>
* radv: query cmds should mark a cmd buffer as having draws.Dave Airlie2017-02-151-0/+4
| | | | | | | | This fixes a regression with the remove non-draw cmd buffers in queries. Fixes: 8b47b97215a radv: detect command buffers that do no work and drop them (v2) Signed-off-by: Dave Airlie <[email protected]>
* glsl: Handle packed_type == ivec4[] in lower_packed_varyings().Kenneth Graunke2017-02-141-1/+2
| | | | | | | | | | For GS input arrays, we may turn a packed_type of ivec4 into an array of ivec4s. We still want flat qualification. Found by inspection. Not known to help anything. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* anv: Implement the Skylake stencil PMA optimizationJason Ekstrand2017-02-143-6/+158
| | | | | | | | | | Unfortunately, this doesn't substantially improve the performance of any known apps. With Dota 2 on my Sky Lake gt4, it seems help by somewhere between 0% and 1% but there's enough noise that it's hard to get a clear picture. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* genxml: Add the CACHE_MODE_0 register on gen9Jason Ekstrand2017-02-141-0/+28
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/pipeline: Be smarter about depth/stencil stateJason Ekstrand2017-02-141-34/+141
| | | | | | | | | It's a bit hard to measure because it almost gets lost in the noise, but this seemed to help Dota 2 by a percent or two on my Broadwell GT3e desktop. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* anv/pipeline: Make a copy of VkPipelineDepthStencilStateCreateinfoJason Ekstrand2017-02-141-16/+18
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* anv: Add support for the PMA fix on BroadwellJason Ekstrand2017-02-149-2/+221
| | | | | | | | | | This helps Dota 2 on Broadwell by 8-9%. I also hacked up the driver and used the Sascha "shadowmapping" demo to get some results. Setting uses_kill to true dropped the framerate on the demo by 25-30%. Enabling the PMA fix brought it back up to around 90% of the original framerate. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Nanley Chery <[email protected]>