summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* llvmpipe: initialize llvmpipe->dirty with LP_NEW_SCISSORBrian Paul2017-08-291-0/+6
| | | | | | | | | | | | | | If llvmpipe_set_scissor_states() is never called, we still need to be sure that derived scissor/clip state is updated. As of commit 743ad599a97d09b1 that function might not be called. Fixes regressed Piglit gl-1.0-scissor-offscreen -fbo -auto test. Reviewed-by: Roland Scheidegger <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101709 Fixes: 743ad599a97 ("st/mesa: don't set 16 scissors and 16 viewports if they're unused") Cc: "17.2" <[email protected]>
* i965: Bump the initial program cache size from 4kB to 16kB.Kenneth Graunke2017-08-291-1/+1
| | | | | | | | | | | | | | | | Our initial size of 4kB is way too small to do anything useful, so we end up growing it at least a few times. We may as well start it larger. Some data points: - Dinoshade (from Mesa Demos): hit 8kB. - Chromium 60: hit 16kB after browsing a few things in Google Docs. - GFXBench4 TRex/Manhattan 3.1: hit 128kB - Unigine Valley 1.0: hit 512kB It might make sense to start it even larger. Acked-by: Matt Turner <[email protected]>
* i965: Issue performance warnings when growing the program cacheKenneth Graunke2017-08-291-0/+3
| | | | | | | This involves a bunch of unnecessary copying, a batch flush, and state re-emission. Reviewed-by: Matt Turner <[email protected]>
* i965: add 2xMSAA and 16xMSAA to DRI configs for Gen9.Kevin Rogovin2017-08-291-3/+10
| | | | | | | | | Special thanks to Eero Tamminen for reporting rasterizer numbers being twice what it should be for 2xMSAA under a benchmark. Signed-off-by: Kevin Rogovin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: define YY_NO_INPUT to prevent unused symbol warningsMatt Turner2017-08-291-0/+1
| | | | | | | | | | | | Otherwise clang warns: glsl/glsl_lexer.cpp:3507:16: warning: function 'yyinput' is not needed and will not be emitted [-Wunneeded-internal-declaration] static int yyinput (yyscan_t yyscanner) ^ Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* blorp: Explicitly cast between different enumsMatt Turner2017-08-291-5/+5
| | | | | | | | | | | | | 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]>
* intel/isl: Mark functions used conditionally as UNUSEDMatt Turner2017-08-291-1/+1
| | | | | | | | The functions we're marking as UNUSED in isl_surface_state.c are used only when compiling for particular generations. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* intel/isl: Explicitly cast between different enumsMatt Turner2017-08-291-8/+9
| | | | | | | | | | | | | 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]>
* 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-292-1/+5
| | | | | | | | 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]>
* configure: Add and use AX_CHECK_COMPILE_FLAGMatt Turner2017-08-292-72/+111
| | | | | | | | This makes it a lot clearer what's happening (at least I think so), and will make future additions much simpler. 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]>
* drm-uapi: Update headers from drm-nextJason Ekstrand2017-08-285-9/+124
| | | | 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]>