Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

Building enhancement #115

Closed
wants to merge 27 commits into from
Closed

Building enhancement #115

wants to merge 27 commits into from

Commits on May 23, 2019

  1. UPSTREAM: android: add liblog to libmesa_intel_common build

    Signed-off-by: Tapani Pälli <[email protected]>
    Reviewed-by: Jordan Justen <[email protected]>
    (cherry picked from commit a3c366c)
    tpalli authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    982383e View commit details
    Browse the repository at this point in the history
  2. UPSTREAM: android: make libbacktrace optional on USE_LIBBACKTRACE

    Otherwise with VNDK enabled we fail linking:
       src/gallium/targets/dri/Android.mk: error: gallium_dri (native:vendor)
       should not link to libbacktrace.vendor (native:vndk_private)
    
    Option makes it possible to use libbacktrace only when VNDK is not
    enabled.
    
    Signed-off-by: Tapani Pälli <[email protected]>
    Reviewed-by: Jordan Justen <[email protected]>
    (cherry picked from commit 5e52184)
    tpalli authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    91c07ca View commit details
    Browse the repository at this point in the history
  3. UPSTREAM: android: Build fixes for OMR1

    Some of the header file locations are changed between Android
    versions (when VNDK is used), patch makes sure we get all the
    required headers.
    
    v2: cleanups, put SDK version checks in all places (Tapani)
    
    Signed-off-by: Tapani Pälli <[email protected]>
    Signed-off-by: Chen Lin Z <[email protected]>
    Tested-by: Clayton Craft <[email protected]>
    Acked-by: Eric Engestrom <[email protected]>
    (cherry picked from commit 791198a)
    tpalli authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    68e7173 View commit details
    Browse the repository at this point in the history
  4. UPSTREAM: android: static link with libexpat with Android O+

    In Android O, MESA needs to statically link libexpat so that
    it's in same VNDK namespace.
    
    v2: apply change also to anv driver (Tapani)
    v3: use += in anv change (Eric Engestrom)
    
    Change-Id: I82b0be5c817c21e734dfdf5bfb6a9aa1d414ab33
    Signed-off-by: Kishore Kadiyala <[email protected]>
    Signed-off-by: Tapani Pälli <[email protected]>
    Reviewed-by: Eric Engestrom <[email protected]>
    (cherry picked from commit e1d8057)
    Kishore409 authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    7964125 View commit details
    Browse the repository at this point in the history
  5. INTERNAL: Adds support for gralloc1.0.

    munish-b authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    09fe74b View commit details
    Browse the repository at this point in the history
  6. INTERNAL: ignore some compile warning on android.

    Signed-off-by: Qiming Shi <[email protected]>
    Signed-off-by: Mingwei Wang <[email protected]>
    Signed-off-by: jenny.q.cao <[email protected]>
    Signed-off-by: Kishore Kadiyala <[email protected]>
    Signed-off-by: Chen Lin Z <[email protected]>
    jennycao authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    4252199 View commit details
    Browse the repository at this point in the history
  7. INTERNAL: enable O3 for Mesa compilation.

    Improves performance of graphics tests significantly.
    
    Signed-off-by: Yogesh Marathe <[email protected]>
    Acked-by: Tapani Pälli <[email protected]>
    yogesh-marathe authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    dcc18d1 View commit details
    Browse the repository at this point in the history
  8. INTERNAL: Enable sampling for imported dma_buf images

    The HWC Vulkan backend needs to be able to sample from source images, so for
    now enable that for all users of vkCreateDmaBufImageINTEL. We can revert
    this patch once we land support for VK_MESAX_external_image_dma_buf, which
    allows the application to fill the 'usage' field.
    
    Jira: IAHWC-40
    Test: Enable Vulkan backend of IA-Hardware-Composer and try kmscube.
          The cube should be visible and animated, but at this time there is
          severe flickering.
    
    Signed-off-by: Kevin Strasser <[email protected]>
    Acked-by: Tapani Pälli <[email protected]>
    strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    9b02fdd View commit details
    Browse the repository at this point in the history
  9. UPSTREAM: SQUASH: Add P0x formats

    UPSTREAM: nir: add option to use scaling factor when sampling planes YUV lowering
    
    Patch adds nir_lower_tex_options as parameter to sample_plane so that
    we don't need to extend nir_tex_instr for this.
    
    Signed-off-by: Tapani Pälli <[email protected]>
    Reviewed-by: Lionel Landwerlin <[email protected]>
    Reviewed-by: Jason Ekstrand <[email protected]>
    (cherry picked from commit 19a85a7)
    
    UPSTREAM: dri: add P010, P012, P016 for 10bit/12bit/16bit YUV420 formats
    
    Signed-off-by: Tapani Pälli <[email protected]>
    Signed-off-by: Lin Johnson <[email protected]>
    Reviewed-by: Lionel Landwerlin <[email protected]>
    (cherry picked from commit 722f96b)
    
    UPSTREAM: intel/compiler: add scale_factors to sampler_prog_key_data
    
    Patch propagates given scale_factors to lowering options.
    
    Signed-off-by: Tapani Pälli <[email protected]>
    Reviewed-by: Lionel Landwerlin <[email protected]>
    Reviewed-by: Jason Ekstrand <[email protected]>
    (cherry picked from commit 3da858a)
    
    UPSTREAM: i965: add P0x formats and propagate required scaling factors
    
    Signed-off-by: Tapani Pälli <[email protected]>
    Signed-off-by: Lin Johnson <[email protected]>
    Reviewed-by: Lionel Landwerlin <[email protected]>
    (cherry picked from commit 2a2e69f)
    
    UPSTREAM: i965: remove scaling factors from P010, P012
    
    Patch removes scaling factors introduced in 2a2e69f but leaves
    option to use scaling in place as it could be useful with other upcoming
    YUV formats.
    
    We did this scaling because ffmpeg was shifting channel bits down, however
    it seems this is not the right place as compositor wants to flip same
    buffers directly to display as well and therefore bitshifting needs to be
    done by the client when receiving frame from ffmpeg.
    
    Now P0x formats are treated the same, e.g. P010 is same as P016 but with
    lower 6 bits set to zeros.
    
    Fixes: 2a2e69f "i965: add P0x formats and propagate required scaling factors"
    Signed-off-by: Tapani Pälli <[email protected]>
    Reviewed-by: Lionel Landwerlin <[email protected]>
    (cherry picked from commit 3b41175)
    tpalli authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    bf741e0 View commit details
    Browse the repository at this point in the history
  10. INTERNAL: Add format P010 etc for 10bit/12bit/16bit YUV420 formats

    Add those definition in dri2_interface.h and in intel_screen.c
    This will make P010 formats be sampleable in OpenGL
    
    Signed-off-by: Lin Johnson <[email protected]>
    [strassek: Paired down as much of the patch has gone upstream]
    Signed-off-by: Kevin Strasser <[email protected]>
    js0701 authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    6fd71fa View commit details
    Browse the repository at this point in the history
  11. INTERNAL: Relax permissions when we export prime handle for GEM.

    This is needed in case we want to use mmap with dma-buf and
    write into the buffer in CPU side. This is useful when
    layers are rendered using software and we will either
    need to scan or texture from these layers.
    Check: https://patchwork.freedesktop.org/patch/56380/
    
    Signed-off-by: Kalyan Kondapally <[email protected]>
    kalyankondapally authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    da1eacc View commit details
    Browse the repository at this point in the history
  12. INTERNAL: CHROMIUM: egl: automatically call eglReleaseThread on threa…

    …d termination
    
    EGL thread cleanup conformance tests could run out of memory as the contexts
    were not freed even though the application requested to have them deleted.
    This was caused by the fact that the contexts were still current on their
    threads when delete was called and (in order not to block any potential
    pending renders) they were just marked for delete.
    Fix this by calling eglReleaseThread on thread termination. This is safe to
    do even if this was already called by the application since, according to the
    EGL 1.5 spec, eglReleaseThread can be called multiple times without error.
    Fixes:
    dEQP-EGL.functional.thread_cleanup.multi_context_*
    dEQP-EGL.functional.robustness.create_context.query_robust_access
    Iosif Antochi authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    5ce5100 View commit details
    Browse the repository at this point in the history
  13. INTERNAL: prevent deadlock in droid_query_buffer_age

    To avoid blocking other EGL calls, release the display mutex before
    calling update_buffers(), which will call droid_window_dequeue_buffer().
    
    This patch fixes some failure cases in android graphics cts test.
    
    Signed-off-by: Min He <[email protected]>
    Signed-off-by: Chenglei Ren <[email protected]>
    Min He authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    28e27d4 View commit details
    Browse the repository at this point in the history
  14. FROMLIST: Check if the window is non-NULL before setting swap interval.

    This fixes crash due to NULL window when swap interval is set
    for pbuffer surface.
    
    Jira: 61995
    Test: CtsDisplayTestCases pass
    
    Signed-off-by: samiuddi <[email protected]>
    
    (am from https://patchwork.freedesktop.org/patch/235697/)
    samiuddi authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    d5c63f6 View commit details
    Browse the repository at this point in the history
  15. INTERNAL: Add ReadMe file.

    Signed-off-by: Kalyan Kondapally <[email protected]>
    kalyankondapally authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    53a093e View commit details
    Browse the repository at this point in the history
  16. INTERNAL: glcpp: Hack to handle expressions in #line directives.

    GLSL ES 320 technically allows #line to have arbitrary expression trees
    rather than integer literal constants, unlike the C and C++ preprocessor.
    This is likely a completely unused feature that does not make sense.
    
    However, Android irritatingly mandates this useless behavior, so this
    patch implements a hack to try and support it.
    
    We handle a single expression:
    
        #line <line number expression>
    
    but we avoid handling the double expression:
    
        #line <line number expression> <source string expression>
    
    because this is an ambiguous grammar.  Instead, we handle the case that
    wraps both in parenthesis, which is actually well defined:
    
        #line (<line number expression>) (<source string expression>)
    
    With this change following tests pass:
    
       dEQP-GLES3.functional.shaders.preprocessor.builtin.line_expression_vertex
       dEQP-GLES3.functional.shaders.preprocessor.builtin.line_expression_fragment
       dEQP-GLES3.functional.shaders.preprocessor.builtin.line_and_file_expression_vertex
       dEQP-GLES3.functional.shaders.preprocessor.builtin.line_and_file_expression_fragment
    
    Signed-off-by: Tapani Pälli <[email protected]>
    Signed-off-by: Kenneth Graunke <[email protected]>
    
    BUG=b:33352633
    BUG=b:33247335
    TEST=affected tests passing on CTS 7.1_r1 sentry
    
    Change-Id: I7afbbb386bd4a582e3f241014a83eaccad1d50d9
    Reviewed-on: https://chromium-review.googlesource.com/427305
    Tested-by: Haixia Shi <[email protected]>
    Reviewed-by: Ilja H. Friedel <[email protected]>
    Commit-Queue: Haixia Shi <[email protected]>
    Trybot-Ready: Haixia Shi <[email protected]>
    kaydenl authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    5800142 View commit details
    Browse the repository at this point in the history
  17. REVERTME: i965: perf: implement GPA's null renderer

    GPA requires a null renderer query which disables all rendering. This
    feels fairly at odds with the spirit of the INTEL_performance_query
    extension.
    
    Note:
    
    Considering the INTEL_blackhole_render implementation(https://www.
    khronos.org/registry/OpenGL/extensions/INTEL/INTEL_blackhole_render
    .txt, https://patchwork.freedesktop.org/series/40035/)need test case
    changes, and also need time to review in upstream, we keep this patch
    firstly for urgent project milestone.
    
    Test: Pass mdapi test_GfxDrv_DriverAcceptance test case
          GfxDrv_DriverAcceptanceQuery.GL_NULL_HARDWARE and has no reg issue
    Signed-off-by: Landwerlin, Lionel <[email protected]>
    llandwerlin-intel authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    31d0f60 View commit details
    Browse the repository at this point in the history
  18. INTERNAL: anv: disable extensions for Android CTS

    This change makes following test pass:
    	dEQP-VK.api.info.device.extensions
    
    Originally-from: Tapani Pälli <[email protected]>
    Test: [CTS 9.0_r8] dEQP-VK.api.info.device.extensions
    Signed-off-by: Kevin Strasser <[email protected]>
    strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    bc8d447 View commit details
    Browse the repository at this point in the history
  19. FROMLIST: SQUASH: i965: SIMD32 selection heuristics

    (cover letter https://patchwork.freedesktop.org/series/51006/)
    
    FROMLIST: i965: SIMD32 heuristics debug flag
    
    Added a new DEBUG_HEUR32 flag to INTEL_DEBUG flags for enabling SIMD32
    selection heuristics.
    
    (am from https://patchwork.freedesktop.org/patch/256764/)
    
    FROMLIST: i965: SIMD32 heuristics control data
    
    Added a new structure for holding SIMD32 heuristics control data. The
    control data itself will be fetched from drirc.
    
    (am from https://patchwork.freedesktop.org/patch/256806/)
    
    FROMLIST: i965: SIMD32 heuristics control data from drirc
    
    To be able to test the heuristics with different parameters, they can be
    controlled via environment variables through drirc.
    
    (am from https://patchwork.freedesktop.org/patch/256788/)
    
    FROMLIST: mesa: Helper functions for counting set bits in a mask
    
    (am from https://patchwork.freedesktop.org/patch/256765/)
    
    FROMLIST: i965/fs: Save the instruction count of each dispatch width
    
    The SIMD32 selection heuristics will use this information for deciding whether
    SIMD32 shaders should be used.
    
    (am from https://patchwork.freedesktop.org/patch/256793/)
    
    FROMLIST: i965/fs: SIMD32 selection heuristic based on grouped texture fetches
    
    The function goes through the compiled shader and checks how many grouped
    texture fetches there are. This is a simple heuristic which gets rid of most
    of the regressions when enabling SIMD32 shaders but still retains some of
    the benefits.
    
    (am from https://patchwork.freedesktop.org/patch/256798/)
    
    FROMLIST: i965/fs: Enable all SIMD32 heuristics
    
    There are three simple heuristics for SIMD32 shader enabling:
    
    - How many MRTs does the shader write into?
    - How many grouped texture fetches does the shader have?
    - How many instructions does the SIMD32 shader have compared to the SIMD16
       shader?
    
    For testing purposes, the heuristics can be controlled via these environment
    variables:
    
    simd32_heuristic_mrt_check
    - Enables MRT write check
    - Default: true
    
    simd32_heuristic_max_mrts
    - How many MRT writes the heuristic allows
    - Default: 1
    
    simd32_heuristic_grouped_check
    - Enables grouped texture fetch check
    - Default: true
    
    simd32_heuristic_grouped_sends
    - How many grouped texture fetches the heuristic allows
    - Default: 6
    
    simd32_heuristic_inst_check
    - Enables SIMD32 vs. SIMD16 instruction count check
    - Default: true
    
    simd32_heuristic_inst_ratio
    - SIMD32 vs. SIMD16 instruction count ratio the heuristic allows
    - Default: 2.3
    
    SIMD32 shaders will not be compiled also when SIMD16 compilation fails or
    spills.
    
    (am from https://patchwork.freedesktop.org/patch/256766/)
    Toni Lönnberg authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    4e3aa37 View commit details
    Browse the repository at this point in the history
  20. FROMLIST: glsl: fix a binding points assignment for ssbo/ubo arrays

    This is needed to be in agreement with spec requirements:
    KhronosGroup/OpenGL-API#46
    
    Piers Daniell:
       "We discussed this in the OpenGL/ES working group meeting
        and agreed that eliminating unused elements from the interface
        block array is not desirable. There is no statement in the spec
        that this takes place and it would be highly implementation
        dependent if it happens. If the application has an "interface"
        in the shader they need to match up with the API it would be
        quite confusing to have the binding point get compacted.
        So the answer is no, the binding points aren't affected by
        unused elements in the interface block array."
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109532
    Reported-By: Ilia Mirkin <[email protected]>
    Signed-off-by: Andrii Simiklit <[email protected]>
    
    TEST=[CTS 9.0r6} dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers#18
    (am from https://gitlab.freedesktop.org/mesa/mesa/merge_requests/332)
    Signed-off-by: Kevin Strasser <[email protected]>
    asimiklit authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    d16da8d View commit details
    Browse the repository at this point in the history
  21. FROMLIST: glsl: fix an incorrect max_array_access after optimization …

    …of ssbo/ubo
    
    This is needed to fix these tests:
    piglit.spec.arb_shader_storage_buffer_object.compiler.unused-array-element_frag
    piglit.spec.arb_shader_storage_buffer_object.compiler.unused-array-element_comp
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109532
    Reported-By: Ilia Mirkin <[email protected]>
    Signed-off-by: Andrii Simiklit <[email protected]>
    
    TEST=[CTS 9.0r6} dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers#18
    (am from https://gitlab.freedesktop.org/mesa/mesa/merge_requests/332)
    Signed-off-by: Kevin Strasser <[email protected]>
    asimiklit authored and strassek committed May 23, 2019
    Configuration menu
    Copy the full SHA
    73918cd View commit details
    Browse the repository at this point in the history

Commits on May 28, 2019

  1. UPSTREAM: anv/android: fix missing dependencies issue during parallel…

    … build
    
    The libmesa_anv_gen* modules require anv_extensions.h, patch makes sure
    it gets generated as a dependency before building them.
    
    Signed-off-by: Chenglei Ren <[email protected]>
    Reviewed-by: Tapani Pälli <[email protected]>
    Cc: <[email protected]>
    (cherry picked from commit 13b38ca)
    renchenglei authored and strassek committed May 28, 2019
    Configuration menu
    Copy the full SHA
    31938ce View commit details
    Browse the repository at this point in the history

Commits on May 31, 2019

  1. Add prebuilt-intermediates for xmlpool

    The AOSP master build system has started to police the use of
    non-hermetic tools from the system PATH. The Mesa project was using
    xgettext and other tools which are not part of the standard Android host
    build tools, and are therefore not allowed. This ban is now being
    enforced.
    
    To work around this problem, introduce prebuilt-intermediates for
    xmlpool based on the current source tree.
    
    Bug: 116125577
    Change-Id: Ica53192b4c5495550ce5d6b49510b5984cedd4be
    Signed-off-by: Alistair Strachan <[email protected]>
    renchenglei committed May 31, 2019
    Configuration menu
    Copy the full SHA
    bdf98e2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9077a85 View commit details
    Browse the repository at this point in the history
  3. mesa3d: dragonboards: add format_srgb.c to prebuilts

    While building Android for dragonboards, the build fails since it
    can't find the generated file format_srgb.c.
    
    To work around this problem, introduce prebuilt-intermediates for
    format_srgb.c from the current source tree.
    
    Change-Id: I4c96e040f6b7c633ccf7f3b34c742a7fb6ee6592
    Signed-off-by: Sumit Semwal <[email protected]>
    renchenglei committed May 31, 2019
    Configuration menu
    Copy the full SHA
    4f8362b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6e421e2 View commit details
    Browse the repository at this point in the history
  5. Add xmlpool/options.h back in the list of intermediate prebuilt sourc…

    …e files
    
    commit 092675ffa035 ("mesa3d: dragonboards: add format_srgb.c
    to prebuilts") overrides the list of locally generated source
    files(LOCAL_GENERATED_SOURCES) and we run into following build
    error:
    
    external/mesa3d/src/util/xmlpool.h:103:10: fatal error: 'xmlpool/options.h' file not found
    
    Currently in src/util/Android.mk, LOCAL_GENERATED_SOURCES list
    is populated as -->
    LOCAL_GENERATED_SOURCES := $(UTIL_GENERATED_SOURCES)
    LOCAL_GENERATED_SOURCES += $(MESA_DRI_OPTIONS_H)
    LOCAL_GENERATED_SOURCES := $(MESA_FORMAT_SRGB_C)
    
    The last assignment ":=" effectively overrides the existing
    LOCAL_GENERATED_SOURCES list including MESA_DRI_OPTIONS_H,
    hence causing xmlpool/options.h file not found build error.
    
    We fix the build by populating the LOCAL_GENERATED_SOURCES as:
    LOCAL_GENERATED_SOURCES := $(UTIL_GENERATED_SOURCES)
    LOCAL_GENERATED_SOURCES := $(MESA_DRI_OPTIONS_H)
    LOCAL_GENERATED_SOURCES += $(MESA_FORMAT_SRGB_C)
    
    As for UTIL_GENERATED_SOURCES, since AOSP master build system
    has started to police the use of non-hermetic tools from the
    system PATH, see commit 5e0738226596 ("Add prebuilt-intermediates
    for xmlpool) for reference, it is highly unlikely that we are
    going to use UTIL_GENERATED_SOURCES ever agin. So it is safe to
    assume and keep overriding the list of those util generated
    source files, at least for now.
    
    Change-Id: I173037f9303c849533037ac0abd09faf9544ce80
    Signed-off-by: Amit Pundir <[email protected]>
    renchenglei committed May 31, 2019
    Configuration menu
    Copy the full SHA
    525b9b6 View commit details
    Browse the repository at this point in the history