Skip to content
Snippets Groups Projects
  1. Aug 19, 2021
  2. Aug 18, 2021
  3. Aug 17, 2021
  4. Aug 16, 2021
    • Alyssa Rosenzweig's avatar
      panfrost: Rewrite the clear colour packing code · 1bfddefa
      Alyssa Rosenzweig authored and Dylan Baker's avatar Dylan Baker committed
      
      At the beginning of a render pass, the hardware will fill the tilebuffer
      with an arbitrary 128-bit word. To implement colour clears, the driver
      must pack the API-specific clear colour according to the 128-bit layout
      of the tilebuffer. This layout depends only on the render target format.
      
      The existing code to handle this was based on loose guesswork. It works
      for the format / clear colour combinations tested in dEQP-GLES3, but it
      is severely deficient in the general case.  It works by matching on the
      PIPE format of the render target (not the layout of the tilebuffer). For
      special cased PIPE formats, it open codes a buggy pack routine.
      Otherwise, it defaults to util_pack_color in the hope that will work.
      Since util_pack_color doesn't know anything about Mali tilebuffer
      layouts, that means it's defaulting to wrong behaviour.
      
      Now that we understand internal tilebuffer layouts, let's rewrite the
      packing code. Instead of matching PIPE formats, map the PIPE format to
      the internal tilebuffer layout using the common table, ensuring the
      mapping remains in sync with the render target descriptor. Then for
      blendable tilebuffer formats, pack using a common float -> fixed point
      path supporting optional sRGB translation. Raw formats use
      util_pack_color as before.
      
      For formats with less than 8 bits per channel, the new code uses the
      fractional bits of the fixed-point representation. This is required for
      correct dithering if the clear colour is not exactly representable in
      the final low precision format.
      
      In summary, at least the following bugs in the old code are fixed:
      
         * Swapped R/B channels with sRGB
         * Swapped R/B channels with some missing formats
         * Incorrect dithering with RGB565, RGB5_A1
      
      Fixes the following test cases:
      
         dEQP-EGL.functional.wide_color.window_8888_colorspace_srgb
         dEQP-EGL.functional.wide_color.pbuffer_8888_colorspace_srgb
         dEQP-EGL.functional.wide_color.window_888_colorspace_srgb
         dEQP-EGL.functional.wide_color.pbuffer_888_colorspace_srgb
      
      Later in the series, unit tests are added for the new implementation.
      
      Signed-off-by: default avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Cc: mesa-stable
      Part-of: <mesa/mesa!12365>
      (cherry picked from commit b9c095cc)
      
      Conflicts:
      	src/panfrost/lib/pan_util.h
      1bfddefa
    • Icecream95's avatar
      panfrost: Only allow colour blit shaders to be killed · 8d5da6b0
      Icecream95 authored and Dylan Baker's avatar Dylan Baker committed
      Fixes timeouts in SuperTuxKart with the advanced rendering pipeline.
      
      Fixes: d0344619 ("panfrost: Set allow_forward_pixel_to_be_killed for blit")
      Part-of: <mesa/mesa!12267>
      (cherry picked from commit 0624346a)
      8d5da6b0
    • Alyssa Rosenzweig's avatar
      panfrost: Fix leak of render node fd · 4637f20a
      Alyssa Rosenzweig authored and Dylan Baker's avatar Dylan Baker committed
      
      Transfer ownership of the render node fd to the panfrost_device (minor
      change to panvk), and then close the file descriptor for the render node
      bound to the panfrost_device when destroying the panfrost_device. Of all
      the users of panfrost_open_device, panvk is the only one that correctly
      closed the fd before. Accordingly, this fixes an fd leak in the Gallium
      driver (and performance counter utilities).
      
      This fix still applies to the Gallium driver when renderonly is in use--
      although renderonly closes its own fd, the fd is _duplicated_ in
      panfrost_drm_winsys.c, so renderonly and panfrost must _both_ close
      their respective fd to fix the leak.
      
      This fixes a crash when running dEQP-EGL for more than two hours.
      dEQP-EGL creates a new screen for every test case and then immediately
      destroys it. If destroying a screen leaks the fd, this causes the number
      of open file descriptors to increase monotonically until the process
      ends. This will eventually hit the system limit for number of open files
      and abort the process.
      
      This bug was identified while attempting to run the OpenGL ES
      conformance tests via cts-runner, and then confirmed with `lsof`. With
      the fix, the number of file descriptors reported by `lsof | wc -l` is
      now constant while running dEQP-EGL as expected.
      
      Signed-off-by: default avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Cc: mesa-stable
      Part-of: <mesa/mesa!12346>
      (cherry picked from commit 76377de9)
      4637f20a
    • Roman Stratiienko's avatar
      AOSP: Update timestamps of target binaries · b8ec9da9
      Roman Stratiienko authored and Dylan Baker's avatar Dylan Baker committed
      
      Fixes warning during the build and unnecessary rule execution:
      ***
      ninja: Missing `restat`? An output file is older than the most recent input:
      ***
      
      Fixes: 8621bd8d ("android: Add scripts to build using meson")
      Signed-off-by: default avatarRoman Stratiienko <r.stratiienko@gmail.com>
      Tested-by: default avatarMauro Rossi <issor.oruam@gmail.com>
      Part-of: <mesa/mesa!12304>
      (cherry picked from commit 21de7855)
      b8ec9da9
    • Roman Stratiienko's avatar
      AOSP: Extract version from libdrm instead of hardcoding it. · 0702cd06
      Roman Stratiienko authored and Dylan Baker's avatar Dylan Baker committed
      
      mesa3d require up-to-date version of libdrm.
      Hardcoding it to 2.4.105 is wrong.
      
      Fixes: 8621bd8d ("android: Add scripts to build using meson")
      Signed-off-by: default avatarRoman Stratiienko <r.stratiienko@gmail.com>
      Tested-by: default avatarMauro Rossi <issor.oruam@gmail.com>
      Part-of: <mesa/mesa!12304>
      (cherry picked from commit a70ff21e)
      0702cd06
    • Eric Engestrom's avatar
      isl: drop left-over comment · 50c489f2
      Eric Engestrom authored and Dylan Baker's avatar Dylan Baker committed
      
      Fixes: cf9ff082 ("isl: Bring back isl_format_layout::bpb")
      Signed-off-by: Eric Engestrom's avatarEric Engestrom <eric@engestrom.ch>
      Reviewed-by: default avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Reviewed-by: default avatarDylan Baker <dylan@pnwbakers.com>
      Part-of: <mesa/mesa!3674>
      (cherry picked from commit 773a70f9)
      50c489f2
    • Eric Engestrom's avatar
      Revert "python: Explicitly add the 'L' suffix on Python 3" · 533a3ebd
      Eric Engestrom authored and Dylan Baker's avatar Dylan Baker committed
      
      This reverts commit ad363913.
      
      This code was added to be able to compare the output file while porting
      the script from python2 to python3, but this has long been finished and
      the extra complexity is not needed anymore.
      
      Signed-off-by: Eric Engestrom's avatarEric Engestrom <eric@engestrom.ch>
      Reviewed-by: default avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Reviewed-by: default avatarDylan Baker <dylan@pnwbakers.com>
      Part-of: <mesa/mesa!3674>
      (cherry picked from commit 93cb3aca)
      533a3ebd
    • Alyssa Rosenzweig's avatar
      drm-shim: Support kernels with >4k pages · ca9ab792
      Alyssa Rosenzweig authored and Dylan Baker's avatar Dylan Baker committed
      
      mmap requires its offset is page aligned, but the current code only
      guarantees 4k alignment, causing drm-shim to break badly on kernels with
      >4k page sizes. This fixes drm-shim on my Apple M1, running bare metal
      Linux with 16k pages. It probably also fixes exotic PowerPC systems with
      64k pages.
      
      Signed-off-by: default avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Reviewed-by: default avatarZoltan Boszormenyi <zboszor@gmail.com>
      Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      Reviewed-by: Emma Anholt's avatarEmma Anholt <emma@anholt.net>
      Cc: mesa-stable
      Part-of: <mesa/mesa!12347>
      (cherry picked from commit 38f39cc1)
      ca9ab792
    • Dylan Baker's avatar
      .pick_status.json: Update to 441e490f · 568dc081
      Dylan Baker authored
      568dc081
  5. Aug 13, 2021
  6. Aug 12, 2021
  7. Aug 11, 2021
Loading