Skip to content
  1. Oct 30, 2018
    • Kenneth Graunke's avatar
      i965: Always use dual source RT writes if src1 blend factors are enabled · 33987ebd
      Kenneth Graunke authored
      Kabylake hardware appears to hang when BLEND_STATE references SRC1 blend
      factors, but the shader issues regular render target write messages
      rather than dual source RT writes.  Presumably, the hardware needs it to
      provide both colors.
      
      This can happen in broken applications that leave blending enabled with
      SRC1 factors, but don't properly call glBindFragDataLocationIndexed or
      set index = 1 in their shader.  The results are undefined in this case,
      but we'd like to avoid crashing the GPU.
      
      To fix this, we introduce NOS in the shader key - if dual source blend
      factors are enabled, we force the use of dual source RT write messages.
      (In fact, we already had a bit for Unigine shader workarounds, so we
      reuse and rename that.)  If no secondary color is defined (index > 0),
      we look for location = 1 for maximum compatibility with broken apps
      (as other drivers appear to do this), and finally just reuse color 0
      for both outputs.
      
      We guess the key based on the existence of a shader variable marked
      with index = 1.  This may cause recompiles if the index is specified
      via glBindFragDataLocationIndexed rather than a layout qualifier in
      the shader.
      33987ebd
  2. Oct 29, 2018
    • Kenneth Graunke's avatar
      i965: Respect GL_TEXTURE_SRGB_DECODE_EXT in GenerateMipmaps() · 064198cb
      Kenneth Graunke authored
      Apparently, we're supposed to look at the texture object's built-in
      sampler object's sRGB decode setting in order to decide whether to
      decode/downsample/re-encode, or simply downsample as-is.  Previously,
      I had always done the decoding/encoding.
      
      Fixes SKQP's Skia_Unit_Tests.SRGBMipMaps test.
      064198cb
  3. Oct 28, 2018
    • Rob Clark's avatar
      freedreno: don't flush when new and old pfb is identical · a61952e7
      Rob Clark authored
      
      
      In the 'inorder' case (ie. FD_MESA_DEBUG=inorder, or old kernel), if the
      u_blitter clear path is used (a3xx, a4xx, and some fallback cases on
      newer gens), util_blitter_restore_fb_state() will set_framebuffer_state()
      to something that is identical to the current fb state, which triggers
      an unnecessary flush, and then eventually an assert:
      
        (gdb) bt
        #0  0x0000007fbf24a078 in kill () from /lib64/libc.so.6
        #1  0x0000007fbe061278 in _debug_assert_fail (expr=0x7fbe93a820 "!batch->flushed", file=0x7fbe93a628 "../src/gallium/drivers/freedreno/freedreno_batch.c", line=491, function=0x7fbe93a990 <__func__.17380> "fd_batch_check_size") at ../src/gallium/auxiliary/util/u_debug.c:322
        #2  0x0000007fbe1ccb8c in fd_batch_check_size (batch=0x55556d5a70) at ../src/gallium/drivers/freedreno/freedreno_batch.c:491
        #3  0x0000007fbe1d0e08 in fd_clear (pctx=0x55555c61e0, buffers=5, color=0x55556e388c, depth=1, stencil=0) at ../src/gallium/drivers/freedreno/freedreno_draw.c:463
        #4  0x0000007fbe57afa4 in st_Clear (ctx=0x55556e17b0, mask=18) at ../src/mesa/state_tracker/st_cb_clear.c:452
      
      The assert was introduced in 4b847b38, so from a functionality
      standpoint this patch fixes that commit.  But it should also avoid an
      unnecessary flush in the 'inorder' case, fixing a performance bug.
      
      Fixes: 4b847b38 freedreno: make fd_batch a one-shot thing
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      a61952e7
    • Rob Clark's avatar
      freedreno: dependency tracking for z/s depends on ZSA state · 32dd75b9
      Rob Clark authored
      
      
      ZSA state can change whether depth or stencil is enabled
      
      This plus previous patch fix stk, and various things w/
      FD_MESA_DEBUG=inorder
      
      Fixes: ec717fc6 freedreno: reduce resource dependency tracking overhead
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      32dd75b9
    • Rob Clark's avatar
      freedreno: mark all state dirty after switching batch · 05e86892
      Rob Clark authored
      
      
      The problem isn't directly with ec717fc6 but rather that commit
      exposes the problem.  When we switch batch we cannot assume previous
      state is clean so we should mark all state dirty.
      
      Fixes: ec717fc6 freedreno: reduce resource dependency tracking overhead
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      05e86892
  4. Oct 27, 2018
  5. Oct 26, 2018
Loading