summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* intel/isl: Remove 'inline' keywordsMatt Turner2017-08-293-4/+4
| | | | | | | | | | | | | | | | | | | Unless you have data, the compiler knows better than you whether a function should be inlined. Unlike all other cases in this series, the removal of the inline keyword from isl_format_has_channel_type actually changes the resulting binary with gcc-6.3.0: text data bss dec hex filename 7831116 346384 420648 8598148 833284 i965_dri.so before 7830716 346384 420648 8597748 8330f4 i965_dri.so after I think this is likely an improvement. No difference in the resulting binary with clang-4.0. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* anv: Mark functions used conditionally as UNUSEDMatt Turner2017-08-294-6/+6
| | | | | | | | The functions we're marking as UNUSED in genX_pipeline.c are used only when compiling for particular generations. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* anv: Explicitly cast between different enumsMatt Turner2017-08-292-4/+4
| | | | | | | | | | | | | Fixes warnings like warning: implicit conversion from enumeration type 'enum isl_format' to different enumeration type 'enum GEN10_SURFACE_FORMAT' [-Wenum-conversion] .SourceElementFormat = ISL_FORMAT_R32_UINT, ^~~~~~~~~~~~~~~~~~~ Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* anv: Remove 'inline' keywordsMatt Turner2017-08-298-19/+19
| | | | | | | | | | Unless you have data, the compiler knows better than you whether a function should be inlined. No difference in the resulting binary with gcc-6.3.0 or clang-4.0. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* anv: Use GNU C empty brace initializerMatt Turner2017-08-292-11/+11
| | | | | | | | | Avoids Clang's warning about the current code: warning: suggest braces around initialization of subobject Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* i965: Add $(WNO_OVERRIDE_INIT) to AM_CFLAGSMatt Turner2017-08-291-0/+1
| | | | | | | | brw_surface_formats.c and genX_blorp_exec.c do this a lot, causing lots of warnings from clang. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* i965: Mark functions used conditionally as UNUSEDMatt Turner2017-08-292-3/+3
| | | | | | | | The functions we're marking as UNUSED in genX_state_upload.c are used only when compiling for particular generations. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* i965: Explicitly cast between different enumsMatt Turner2017-08-291-4/+4
| | | | | | | | | | | | | Fixes warnings like warning: implicit conversion from enumeration type 'enum isl_format' to different enumeration type 'enum GEN10_SURFACE_FORMAT' [-Wenum-conversion] .SourceElementFormat = ISL_FORMAT_R32_UINT, ^~~~~~~~~~~~~~~~~~~ Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* i965: Drop unnecessary conditionalMatt Turner2017-08-291-4/+4
| | | | | | | | Clang doesn't realize that 0 and 1 are the only possibilities, a thinks lots of variables might be uninitialized. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* i965: Remove some 'inline' keywordsMatt Turner2017-08-291-7/+7
| | | | | | | | | brw_texture_view_sane() is only used by an assert()... No difference in the resulting binary with gcc-6.3.0 or clang-4.0. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* nir: Remove series of unnecessary conversionsMatt Turner2017-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | Clang warns: warning: absolute value function 'fabsf' given an argument of type 'const float64_t' (aka 'const double') but has parameter of type 'float' which may cause truncation of value [-Wabsolute-value] float64_t dst = bit_size == 64 ? fabs(src0) : fabsf(src0); The type of the ternary expression will be the common type of fabs() and fabsf(): double. So fabsf(src0) will be implicitly converted to double. We may as well just convert src0 to double before a call to fabs() and remove the needless complexity, à la float64_t dst = fabs(src0); Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* nir/spirv: Use unreachable("...") rather than assert(!"...")Matt Turner2017-08-292-13/+13
| | | | | | | | Quiets a number of uninitialized variable warnings in clang. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* compiler: Add $(WNO_OVERRIDE_INIT) to AM_CFLAGSMatt Turner2017-08-291-0/+1
| | | | | | | nir_intrinsics.h does this a lot, causing lots of warnings from clang. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* configure: Test for -Wno-initializer-overridesMatt Turner2017-08-291-1/+1
| | | | | | | | Clang has "-Wno-initializer-overrides", while gcc has "-Wno-override-init". Quiets a lot of warnings with clang. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* radv: Add trace ids for secondary buffers.Bas Nieuwenhuizen2017-08-294-4/+6
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* ac/debug: Support multiple trace ids for nested IBs.Bas Nieuwenhuizen2017-08-294-33/+52
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/amdgpu: Enable dumping of all IBs with RADV_DEBUG=allbos.Bas Nieuwenhuizen2017-08-291-0/+13
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* egl/wayland: make sure HAS_$FORMAT is set for wl_dmabufEmil Velikov2017-08-291-0/+3
| | | | | | | | | Otherwise eglCreateWaylandBufferFromImageWL will fail, since we have no "supported" format. Fixes: 02cc35937277 ("egl/wayland: Use linux-dmabuf interface for buffers") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl/wayland: group wl_win specific code togetherEmil Velikov2017-08-291-4/+3
| | | | | | | | | Make the code a bit easier to follow. There should be no functional change since none of the bits set are accessible until the eglCreateWindowSurface call is complete. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl/wayland: remove dri2_surf width/height double init.Emil Velikov2017-08-291-3/+0
| | | | | | | | | | | The dimensions are already set [to 0 or the value provided by the attributes list] by the _eglInitSurface() call further up. The values are updated, as the DRI driver calls the DRI2/IMAGE_LOADER' get_buffers, shortly before making use of the values. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Daniel Stone <[email protected]>
* egl/wayland: set correct format with wl_dmabuf as wl_drm is missingEmil Velikov2017-08-291-1/+1
| | | | | | | | | | For most/all cases today, we have wl_drm available alongside wl_dmabuf. Yet in the long run, we want to make sure the latter can operate without any traces of the former. Fixes: 02cc35937277 ("egl/wayland: Use linux-dmabuf interface for buffers") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl/wayland: update comment to reflect wl_dmabuf presenceEmil Velikov2017-08-291-1/+1
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl/wayland: polish object teardown in dri2_wl_destroy_surfaceEmil Velikov2017-08-291-2/+2
| | | | | | | | | | The wl_drm wrapper is created before the wl display/surface ones. Thus make sure we destroy it after them. In reality it should not make any difference either way. Fixes: 03dd9a88b0b ("egl/wayland: Use per-surface event queues") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl/wayland: plug leaks in dri2_wl_create_window_surface() error pathEmil Velikov2017-08-291-2/+6
| | | | | | | | We forgot to teardown the wl display/surface wrappers. Fixes: 03dd9a88b0b ("egl/wayland: Use per-surface event queues") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl: simplify refcounting after screen creationEmil Velikov2017-08-291-9/+5
| | | | | | | | | | If the specific initialize was successfull, dri2_egl_display() will return a non NULL pointer. Thus we can drop the check and flatten the codeflow. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Acked-by: Daniel Stone <[email protected]>
* util: move string_to_uint_map to glslEmil Velikov2017-08-2915-13/+492
| | | | | | | | | | | | | | | | | | The functionality is used by glsl and mesa. With the latter already depending on the former. With this in place the src/util/ static library libmesautil.la no longer has a C++ dependency. Thus objects which use it (like libEGL) don't need the C++ link. Cc: "17.2" <[email protected]> Fixes: 02cc35937277 ("egl/wayland: Use linux-dmabuf interface for buffers") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101851 Signed-off-by: Emil Velikov <[email protected]> Suggested-by: Jason Ekstrand <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Tested-by: Mike Lothian <[email protected]> Tested-by: James Harvey <[email protected]>
* st/mesa: fix XPD lowering - don't read dstMarek Olšák2017-08-291-3/+6
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102461 Reviewed-by: Brian Paul <[email protected]>
* anv: Add support for the SYNC_FD handle type for fencesJason Ekstrand2017-08-284-11/+87
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Implement VK_KHR_external_fenceJason Ekstrand2017-08-283-5/+161
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Use DRM sync objects to back fences whenever possibleJason Ekstrand2017-08-284-9/+139
| | | | | | | | | In order to implement VK_KHR_external_fence, we need to back our fences with something that's shareable. Since the kernel wait interface for sync objects already supports waiting for multiple fences in one go, it makes anv_WaitForFences much simpler if we only have one type of fence. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/gem: Add support for syncobj wait and resetJason Ekstrand2017-08-283-0/+87
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/gem: Add a flags parameter to syncobj_createJason Ekstrand2017-08-284-5/+5
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan/util: Add a vk_zalloc helperJason Ekstrand2017-08-281-0/+14
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Rename anv_fence_state to anv_bo_fence_stateJason Ekstrand2017-08-283-18/+18
| | | | | | It only applies to legacy BO fences. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Pull the guts of anv_fence into anv_fence_implJason Ekstrand2017-08-283-49/+159
| | | | | | | This is just a refactor, similar to what we did for semaphores, in preparation for handling VK_KHR_external_fence. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/wsi: Use QueueSubmit to trigger the fence in AcquireNextImageJason Ekstrand2017-08-281-3/+6
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Rework fences to work more like BO semaphoresJason Ekstrand2017-08-283-68/+51
| | | | | | | | | | This commit changes fences to work a bit more like BO semaphores. Instead of the fence being a batch, it's simply a BO that gets added to the validation list for the last execbuf call in the QueueSubmit operation. It's a bit annoying finding the last submit in the execbuf but this allows us to avoid the dummy execbuf. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/queue: Allow temporary import of SYNC_FD semaphoresJason Ekstrand2017-08-281-3/+0
| | | | | | | | | | | | | | | | | | | | We didn't allow them before because it didn't look like the spec allowed it. It certainly doesn't make much sense. However, there are CTS tests that apparently hit this. What the spec actually says is: "Importing a payload using handle types with copy transference creates a duplicate copy of the payload at the time of import, but makes no further reference to it. Fence signaling, waiting, and resetting operations performed on the target of copy imports must not affect any other fence or payload." A SYNC_FD has copy transference but the import may be temporary or permanent. If you do a permanent import of something with copy transference, I guess it's supposed to work and end up resetting the permanent state. In any case, there seems to be no real harm in allowing it, so why not. Reviewed-by: Lionel Landwerlin <[email protected]>
* i965: Fix whitespace issues in intel_buffer_objects.c.Kenneth Graunke2017-08-281-31/+29
| | | | Convert tabs to spaces and rewrap one long line.
* radeonsi: stop leaking nirTimothy Arceri2017-08-291-0/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* ac/nir: remove misleading conditionGrazvydas Ignotas2017-08-291-1/+1
| | | | | | | | | location is never set to INTERP_SAMPLE, and Nicolai comments: "... that part is misleading. location refers to the base location, not the final location of the sample, and it can never be INTERP_SAMPLE." Suggested-by: Nicolai Hähnle <[email protected]> Signed-off-by: Grazvydas Ignotas <[email protected]>
* ac/nir: silence maybe-uninitialized warningsGrazvydas Ignotas2017-08-291-6/+9
| | | | | | | | | | These are likely false positives, but are also annoying because they show up on every "make install", which causes ac_nir_to_llvm to be rebuilt here. Initializing those variables to NULL should be harmless even when unnecessary. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radv: clear dynamic_shader_stages on createGrazvydas Ignotas2017-08-291-0/+1
| | | | | | | | Valgrind reports it's being used uninitialized. Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* amd: add .editorconfigGrazvydas Ignotas2017-08-292-0/+6
| | | | | | | | | amd/common/ and amd/vulkan/ are using tabs for indent, which doesn't match the settings in root .editorconfig, so let's override. Signed-off-by: Grazvydas Ignotas <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: rewrite late alloc VS limit computationMarek Olšák2017-08-281-12/+25
| | | | | | This is still very simple, but it's better than before. Loosely ported from Vulkan.
* gallium/radeon: set EVENT_WRITE_EOP.INT_SEL = wait for write confirmationMarek Olšák2017-08-282-3/+12
| | | | | | | Ported from Vulkan. Not sure what this is good for.. maybe write confirmation from L2 flushes? Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/u_threaded: rename IGNORE_VALID_RANGE -> NO_INFER_UNSYNCHRONIZEDMarek Olšák2017-08-283-5/+5
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/u_threaded: disallow discard_range if map_buffer is unsynchronizedMarek Olšák2017-08-281-1/+3
| | | | | | | The discard range codepath takes precedence, so if we get both unsynchronized and discard_range, choose unsynchronized. Reviewed-by: Nicolai Hähnle <[email protected]>
* nir: Fix system_value_from_intrinsic for subgroupsJason Ekstrand2017-08-281-4/+4
| | | | | | | A couple of the cases were backwards Reviewed-by: Matt Turner <[email protected]> Cc: [email protected]
* nir: Fix some whatespaceJason Ekstrand2017-08-281-5/+5
| | | | | | Somehow tabs got in there... Reviewed-by: Matt Turner <[email protected]>