llvmpipe: simple texture barrier implementation.
authorDave Airlie <airlied@redhat.com>
Thu, 26 Mar 2020 02:06:34 +0000 (12:06 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 6 May 2020 05:09:42 +0000 (15:09 +1000)
Just flush.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4774>

.gitlab-ci/piglit/quick_gl.txt
docs/features.txt
src/gallium/drivers/llvmpipe/lp_context.c
src/gallium/drivers/llvmpipe/lp_screen.c

index 2b6aeb9647e369bd4f883824482feb4f98fba950..e66ac5a3833e8eeca2b8a5210be31292e0f288bd 100644 (file)
@@ -738,150 +738,6 @@ spec/arb_stencil_texturing/glblitframebuffer corrupts state/gl_texture_2d_multis
 spec/arb_stencil_texturing/glblitframebuffer corrupts state/gl_texture_2d_multisample_array: fail
 spec/arb_tessellation_shader/arb_tessellation_shader-immediate-mode-draw-patches: skip
 spec/arb_tessellation_shader/arb_tessellation_shader-tes-gs-max-output -small -scan 1 50: fail
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 128 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 128 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 128 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 128 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 128 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 128 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 64 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 64 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 64 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 64 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 64 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 64 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 8 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 8 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 8 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 8 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 8 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 1 8 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 128 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 128 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 128 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 128 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 128 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 128 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 64 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 64 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 64 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 64 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 64 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 64 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 8 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 8 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 8 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 8 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 8 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 1 8 8 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 128 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 128 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 128 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 128 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 128 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 128 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 64 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 64 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 64 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 64 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 64 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 64 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 8 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 8 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 8 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 8 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 8 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 1 8 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 128 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 128 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 128 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 128 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 128 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 128 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 64 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 64 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 64 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 64 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 64 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 64 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 8 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 8 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 8 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 8 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 8 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 32 42 8 8 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 128 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 128 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 128 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 128 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 128 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 128 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 64 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 64 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 64 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 64 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 64 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 64 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 8 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 8 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 8 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 8 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 8 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 1 8 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 128 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 128 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 128 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 128 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 128 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 128 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 64 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 64 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 64 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 64 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 64 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 64 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 8 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 8 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 8 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 8 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 8 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 1 8 8 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 128 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 128 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 128 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 128 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 128 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 128 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 64 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 64 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 64 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 64 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 64 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 64 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 8 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 8 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 8 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 8 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 8 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 1 8 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 128 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 128 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 128 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 128 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 128 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 128 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 64 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 64 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 64 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 64 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 64 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 64 8: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 8 1: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 8 2: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 8 3: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 8 4: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 8 7: skip
-spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 8 8: skip
 spec/arb_texture_buffer_object/indexed: skip
 spec/arb_texture_buffer_object/negative-unsupported: skip
 spec/arb_texture_compression_bptc/bptc-float-modes: fail
@@ -1982,8 +1838,6 @@ spec/nv_fragment_program_option/fp-condition_codes-01: skip
 spec/nv_fragment_program_option/fp-rfl: skip
 spec/nv_fragment_program_option/fp-set-02: skip
 spec/nv_fragment_program_option/fp-unpack-01: skip
-spec/nv_texture_barrier/arb_texture_barrier-texture-halves-ping-pong-operation-chain: skip
-spec/nv_texture_barrier/blending-in-shader: skip
 spec/nv_vertex_program2_option/vp-address-03: skip
 spec/nv_vertex_program2_option/vp-address-05: skip
 spec/nv_vertex_program2_option/vp-address-06: skip
@@ -2081,10 +1935,10 @@ wgl/wgl-sanity: skip
 summary:
        name:  results
        ----  --------
-       pass:    19539
+       pass:    19685
        fail:      246
       crash:        0
-       skip:     1814
+       skip:     1668
     timeout:        0
        warn:        2
  incomplete:        0
index 62533858d9dbe3bd3989c4da8f18e03290ec972b..1d65b69117a93f05972a6816ac97f2c6e79d3560 100644 (file)
@@ -220,7 +220,7 @@ GL 4.5, GLSL 4.50 -- all DONE: nvc0, r600, radeonsi
   GL_ARB_direct_state_access                            DONE (all drivers)
   GL_ARB_get_texture_sub_image                          DONE (all drivers)
   GL_ARB_shader_texture_image_samples                   DONE (i965, nv50, virgl)
-  GL_ARB_texture_barrier                                DONE (freedreno, i965, nv50, virgl)
+  GL_ARB_texture_barrier                                DONE (freedreno, i965, nv50, llvmpipe, virgl)
   GL_KHR_context_flush_control                          DONE (all - but needs GLX/EGL extension to be useful)
   GL_KHR_robustness                                     DONE (freedreno, i965, virgl)
   GL_EXT_shader_integer_mix                             DONE (all drivers that support GLSL)
index 66d72b947e124677842beb09ded7da11f4230e57..f11d5207a7a8599c6d5e33a5dbb4124b34c5ff77 100644 (file)
@@ -131,6 +131,12 @@ llvmpipe_render_condition(struct pipe_context *pipe,
    llvmpipe->render_cond_cond = condition;
 }
 
+static void
+llvmpipe_texture_barrier(struct pipe_context *pipe, unsigned flags)
+{
+   llvmpipe_flush(pipe, NULL, __FUNCTION__);
+}
+
 struct pipe_context *
 llvmpipe_create_context(struct pipe_screen *screen, void *priv,
                         unsigned flags)
@@ -159,6 +165,7 @@ llvmpipe_create_context(struct pipe_screen *screen, void *priv,
    llvmpipe->pipe.set_framebuffer_state = llvmpipe_set_framebuffer_state;
    llvmpipe->pipe.clear = llvmpipe_clear;
    llvmpipe->pipe.flush = do_flush;
+   llvmpipe->pipe.texture_barrier = llvmpipe_texture_barrier;
 
    llvmpipe->pipe.render_condition = llvmpipe_render_condition;
 
index d6ba3e32852ebf35f36ce38f6f22f090dc394e48..072702bb6235ca9aee599e736500862a54db58ed 100644 (file)
@@ -194,9 +194,8 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_TEXEL_OFFSET:
       return 31;
    case PIPE_CAP_CONDITIONAL_RENDER:
-      return 1;
    case PIPE_CAP_TEXTURE_BARRIER:
-      return 0;
+      return 1;
    case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS:
    case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS:
       return 16*4;