1. 15 Apr, 2021 12 commits
  2. 14 Apr, 2021 6 commits
  3. 13 Apr, 2021 3 commits
    • Adam Jackson's avatar
      glx: Lift sending the MakeCurrent request to top-level code · 80b67a3b
      Adam Jackson authored
      Somewhat terrifyingly, we never sent this for direct contexts, which
      means the server never knew the context/drawable bindings. To handle
      this sanely, pull the request code up out of the indirect backend, and
      rewrite the context switch path to call it as appropriate.  This
      attempts to preserve the existing behavior of not calling unbind() on
      the context if its refcount would not drop to zero.
      Of course, you can't just do this indiscriminately, because this is GLX
      and extant X servers have bugs and everything is terrible. To wit:
      - For 1.20.x prior to 1.20.6, you can bind a direct context once, but
      the second time you try to modify the context's binding you will get
      GLXBadContextTag. This includes unbinding the context. And "deleting"
      the context will leak memory, because it will still appear to be
      - For 1.19 and earlier, glXMakeCurrent(dpy, None, ctx) should be legal
      for GL 3.0+ contexts, but the server will throw BadMatch.
      To guard against this, we only send the request for indirect contexts
      unless the server is known good, and only mention one context at a time
      in such a request; if switching between contexts, we first unbind the
      old, and then bind the new. Note that the second VendorRelease() version
      is to catch XFree86 4.x and Xorg [67].x, which almost certainly have the
      above bugs. Other servers might report different version numbers here,
      but we can't do direct rendering against them, so this should be safe.
      Fixes: mesa/mesa#4418
      Acked-By: Mike Blumenkrantz's avatarMike Blumenkrantz <michael.blumenkrantz@gmail.com>
      Part-of: <mesa/mesa!9992>
    • Juan A. Suárez's avatar
      v3dv: fix assertion · cbb1e2dc
      Juan A. Suárez authored
      Ensure subpass_idx has a valid value; we use "-1" as invalid one.
      Fixes CID#1468096 "Macro compares unsigned to 0 (NO_EFFECT)"
      Reviewed-by: Iago Toral's avatarIago Toral Quiroga <itoral@igalia.com>
      Signed-off-by: Juan A. Suárez's avatarJuan A. Suarez Romero <jasuarez@igalia.com>
      Part-of: <mesa/mesa!10203>
    • Juan A. Suárez's avatar
      broadcom/compiler: use VPM offsets in GS load_per_vertex input · 64943f20
      Juan A. Suárez authored
      Vertex Shader has a store_out lowering pass that converts gallium driver
      locations in offsets inside the VPM.
      One of the consequences is that these offsets are consecutives; that is,
      if the VS stores VARYING_SLOT_VAR0.xyz and VARYING_SLOT_VAR1.xyzw, there
      isn't a hole in the VPM offsets for the un-stored VARYING_SLOT_VAR0.w.
      Thus we need to change how the VPM offset is computed in the Geometry
      Shader when loading the inputs.
      This bug is exposed by !9050.
      v2 (Iago):
       - Include explanatory comment.
       - Use assert.
      Reviewed-by: Iago Toral's avatarIago Toral Quiroga <itoral@igalia.com>
      Signed-off-by: Juan A. Suárez's avatarJuan A. Suarez Romero <jasuarez@igalia.com>
      Part-of: <mesa/mesa!10129>
  4. 12 Apr, 2021 2 commits
  5. 09 Apr, 2021 6 commits
    • Iago Toral's avatar
      broadcom/compiler: rename unifa tracking fields · 0a3bfaca
      Iago Toral authored
      The term 'last' may be misleading because the offset represents
      the current unifa offset, which is the offset used by the last
      load plus 4 bytes, so rename these to use the term 'current'
      Reviewed-by: Alejandro Piñeiro's avatarAlejandro Piñeiro <apinheiro@igalia.com>
      Part-of: <mesa/mesa!10100>
    • Iago Toral's avatar
      broadcom/compiler: sort constant UBO loads by index and offset · 8998666d
      Iago Toral authored
      This implements a NIR pass that groups together constant UBO loads
      for the same UBO index in order of increasing offset when the distance
      between them is small enough that it enables the "skip unifa write"
      This may increase register pressure because it can move UBO loads
      earlier, so we also add a compiler strategy fallback to disable the
      optimization if we need to drop thread count to compile the shader
      with this optimization enabled.
      total instructions in shared programs: 13557555 -> 13550300 (-0.05%)
      instructions in affected programs: 814684 -> 807429 (-0.89%)
      helped: 4485
      HURT: 2377
      Instructions are helped.
      total uniforms in shared programs: 3777243 -> 3760990 (-0.43%)
      uniforms in affected programs: 112554 -> 96301 (-14.44%)
      helped: 7226
      HURT: 36
      Uniforms are helped.
      total max-temps in shared programs: 2318133 -> 2333761 (0.67%)
      max-temps in affected programs: 63230 -> 78858 (24.72%)
      helped: 23
      HURT: 3044
      Max-temps are HURT.
      total sfu-stalls in shared programs: 32245 -> 32567 (1.00%)
      sfu-stalls in affected programs: 389 -> 711 (82.78%)
      helped: 139
      HURT: 451
      Inconclusive result.
      total inst-and-stalls in shared programs: 13589800 -> 13582867 (-0.05%)
      inst-and-stalls in affected programs: 817738 -> 810805 (-0.85%)
      helped: 4478
      HURT: 2395
      Inst-and-stalls are helped.
      total nops in shared programs: 354365 -> 342202 (-3.43%)
      nops in affected programs: 31000 -> 18837 (-39.24%)
      helped: 4405
      HURT: 265
      Nops are helped.
      Reviewed-by: Alejandro Piñeiro's avatarAlejandro Piñeiro <apinheiro@igalia.com>
      Part-of: <mesa/mesa!10100>
    • Iago Toral's avatar
      broadcom/compiler: allow compilation strategies to limit minimum thread count · fb2214a4
      Iago Toral authored
      This adds a minimum thread count parameter to each compilation strategy with
      the intention to limit the minimum allowed thread count that can be used to
      register allocate with that strategy.
      For now all strategies allow the minimum thread count supported by the
      hardware, but we will be using this infrastructure to impose a more
      strict limit in an upcoming optimization.
      Reviewed-by: Alejandro Piñeiro's avatarAlejandro Piñeiro <apinheiro@igalia.com>
      Part-of: <mesa/mesa!10100>
    • Iago Toral's avatar
      broadcom/compiler: add a definition for the unifa skip distance · 4b244dc6
      Iago Toral authored
      We will be using this distance to setup another optimization in a
      follow-up patch.
      Reviewed-by: Alejandro Piñeiro's avatarAlejandro Piñeiro <apinheiro@igalia.com>
      x# Please enter the commit message for your changes. Lines starting
      Part-of: <mesa/mesa!10100>
    • Iago Toral's avatar
      v3dv: fix index buffer binding · a45ab465
      Iago Toral authored
      This can be called outside a render pass so we should not expect to have
      a job available. Also, we should not be emitting state here, instead we
      should do in the pre-draw handler with all the other draw call state.
      Fixes cases of crashes in RenderDoc when selecting elements in the
      Event Browser.
      Reviewed-by: Alejandro Piñeiro's avatarAlejandro Piñeiro <apinheiro@igalia.com>
      Part-of: <mesa/mesa!10130>
    • Juan A. Suárez's avatar
      broadcom/compiler: fix first_component assertion · cc8d4cd1
      Juan A. Suárez authored
      first_component is an uint, and thus if it takes value 0 we can't know
      if it is because writemask has its first bit to 1, or all bits to 0.
      As we want to ensure that at least one bit is set, apply the assertion
      in writemask.
      Fixes CID#1472829 "Macro compares unsigned to 0 (NO_EFFECT)".
       - Restore "first_component <= last_component" assertion (Iago)
      Reviewed-by: Iago Toral's avatarIago Toral Quiroga <itoral@igalia.com>
      Signed-off-by: Juan A. Suárez's avatarJuan A. Suarez Romero <jasuarez@igalia.com>
      Part-of: <!10103>
  6. 08 Apr, 2021 2 commits
  7. 07 Apr, 2021 1 commit
  8. 05 Apr, 2021 4 commits
  9. 03 Apr, 2021 1 commit
  10. 02 Apr, 2021 1 commit
  11. 01 Apr, 2021 2 commits