Re: [Mesa-dev] [PATCH 1/4] radv: remove remaining code related to 16 samples

2019-05-20 Thread Bas Nieuwenhuizen
r-b

On Thu, May 16, 2019 at 11:50 AM Samuel Pitoiset
 wrote:
>
> The driver only supports up to 8 samples.
>
> Signed-off-by: Samuel Pitoiset 
> ---
>  src/amd/vulkan/radv_private.h  |  1 -
>  src/amd/vulkan/si_cmd_buffer.c | 50 --
>  2 files changed, 51 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h
> index a88c0f31ad3..9563e86a680 100644
> --- a/src/amd/vulkan/radv_private.h
> +++ b/src/amd/vulkan/radv_private.h
> @@ -701,7 +701,6 @@ struct radv_device {
> float sample_locations_2x[2][2];
> float sample_locations_4x[4][2];
> float sample_locations_8x[8][2];
> -   float sample_locations_16x[16][2];
>
> /* GFX7 and later */
> uint32_t gfx_init_size_dw;
> diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c
> index 0f4bdadc3d2..b93cd88a1d1 100644
> --- a/src/amd/vulkan/si_cmd_buffer.c
> +++ b/src/amd/vulkan/si_cmd_buffer.c
> @@ -1337,26 +1337,6 @@ static const uint32_t cm_sample_locs_8x[] = {
> FILL_SREG(-5,  5, -7, -1, 3,  7,  7, -7),
>  };
>  static const unsigned cm_max_dist_8x = 8;
> -/* Cayman 16xMSAA */
> -static const uint32_t cm_sample_locs_16x[] = {
> -   FILL_SREG( 1,  1, -1, -3, -3,  2,  4, -1),
> -   FILL_SREG( 1,  1, -1, -3, -3,  2,  4, -1),
> -   FILL_SREG( 1,  1, -1, -3, -3,  2,  4, -1),
> -   FILL_SREG( 1,  1, -1, -3, -3,  2,  4, -1),
> -   FILL_SREG(-5, -2,  2,  5,  5,  3,  3, -5),
> -   FILL_SREG(-5, -2,  2,  5,  5,  3,  3, -5),
> -   FILL_SREG(-5, -2,  2,  5,  5,  3,  3, -5),
> -   FILL_SREG(-5, -2,  2,  5,  5,  3,  3, -5),
> -   FILL_SREG(-2,  6,  0, -7, -4, -6, -6,  4),
> -   FILL_SREG(-2,  6,  0, -7, -4, -6, -6,  4),
> -   FILL_SREG(-2,  6,  0, -7, -4, -6, -6,  4),
> -   FILL_SREG(-2,  6,  0, -7, -4, -6, -6,  4),
> -   FILL_SREG(-8,  0,  7, -4,  6,  7, -7, -8),
> -   FILL_SREG(-8,  0,  7, -4,  6,  7, -7, -8),
> -   FILL_SREG(-8,  0,  7, -4,  6,  7, -7, -8),
> -   FILL_SREG(-8,  0,  7, -4,  6,  7, -7, -8),
> -};
> -static const unsigned cm_max_dist_16x = 8;
>
>  unsigned radv_cayman_get_maxdist(int log_samples)
>  {
> @@ -1365,7 +1345,6 @@ unsigned radv_cayman_get_maxdist(int log_samples)
> eg_max_dist_2x,
> eg_max_dist_4x,
> cm_max_dist_8x,
> -   cm_max_dist_16x
> };
> return max_dist[log_samples];
>  }
> @@ -1409,25 +1388,6 @@ void radv_cayman_emit_msaa_sample_locs(struct 
> radeon_cmdbuf *cs, int nr_samples)
> radeon_emit(cs, cm_sample_locs_8x[3]);
> radeon_emit(cs, cm_sample_locs_8x[7]);
> break;
> -   case 16:
> -   radeon_set_context_reg_seq(cs, 
> R_028BF8_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0, 16);
> -   radeon_emit(cs, cm_sample_locs_16x[0]);
> -   radeon_emit(cs, cm_sample_locs_16x[4]);
> -   radeon_emit(cs, cm_sample_locs_16x[8]);
> -   radeon_emit(cs, cm_sample_locs_16x[12]);
> -   radeon_emit(cs, cm_sample_locs_16x[1]);
> -   radeon_emit(cs, cm_sample_locs_16x[5]);
> -   radeon_emit(cs, cm_sample_locs_16x[9]);
> -   radeon_emit(cs, cm_sample_locs_16x[13]);
> -   radeon_emit(cs, cm_sample_locs_16x[2]);
> -   radeon_emit(cs, cm_sample_locs_16x[6]);
> -   radeon_emit(cs, cm_sample_locs_16x[10]);
> -   radeon_emit(cs, cm_sample_locs_16x[14]);
> -   radeon_emit(cs, cm_sample_locs_16x[3]);
> -   radeon_emit(cs, cm_sample_locs_16x[7]);
> -   radeon_emit(cs, cm_sample_locs_16x[11]);
> -   radeon_emit(cs, cm_sample_locs_16x[15]);
> -   break;
> }
>  }
>
> @@ -1466,14 +1426,6 @@ static void radv_cayman_get_sample_position(struct 
> radv_device *device,
> val.idx = (cm_sample_locs_8x[index] >> (offset + 4)) & 0xf;
> out_value[1] = (float)(val.idx + 8) / 16.0f;
> break;
> -   case 16:
> -   offset = 4 * (sample_index % 4 * 2);
> -   index = (sample_index / 4) * 4;
> -   val.idx = (cm_sample_locs_16x[index] >> offset) & 0xf;
> -   out_value[0] = (float)(val.idx + 8) / 16.0f;
> -   val.idx = (cm_sample_locs_16x[index] >> (offset + 4)) & 0xf;
> -   out_value[1] = (float)(val.idx + 8) / 16.0f;
> -   break;
> }
>  }
>
> @@ -1488,6 +1440,4 @@ void radv_device_init_msaa(struct radv_device *device)
> radv_cayman_get_sample_position(device, 4, i, 
> device->sample_locations_4x[i]);
> for (i = 0; i < 8; i++)
> radv_cayman_get_sample_position(device, 8, i, 
> device->sample_locations_8x[i]);
> -   for (i = 0; i < 16; i++)
> -   radv_cayman_get_sample_position(device, 16, i, 
> device->sample_locations_16x[i]);
>  }
> --
> 2.21.0
>
> 

Re: [Mesa-dev] [PATCH 3/4] radv: emit correct centroid priority based on the number of samples

2019-05-20 Thread Bas Nieuwenhuizen
r-b

On Thu, May 16, 2019 at 11:51 AM Samuel Pitoiset
 wrote:
>
> Signed-off-by: Samuel Pitoiset 
> ---
>  src/amd/vulkan/si_cmd_buffer.c | 19 ---
>  1 file changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c
> index 56d7a9a3682..9f6f92a42be 100644
> --- a/src/amd/vulkan/si_cmd_buffer.c
> +++ b/src/amd/vulkan/si_cmd_buffer.c
> @@ -197,9 +197,6 @@ si_emit_graphics(struct radv_physical_device 
> *physical_device,
> radeon_set_config_reg(cs, R_008A14_PA_CL_ENHANCE, 
> S_008A14_NUM_CLIP_SEQ(3) |
>   S_008A14_CLIP_VTX_REORDER_ENA(1));
>
> -   radeon_set_context_reg(cs, R_028BD4_PA_SC_CENTROID_PRIORITY_0, 
> 0x76543210);
> -   radeon_set_context_reg(cs, R_028BD8_PA_SC_CENTROID_PRIORITY_1, 
> 0xfedcba98);
> -
> if (!physical_device->has_clear_state)
> radeon_set_context_reg(cs, R_02882C_PA_SU_PRIM_FILTER_CNTL, 
> 0);
>
> @@ -1315,16 +1312,19 @@ void si_cp_dma_wait_for_idle(struct radv_cmd_buffer 
> *cmd_buffer)
>  static const uint32_t sample_locs_1x =
> FILL_SREG(0, 0,   0, 0,   0, 0,   0, 0);
>  static const unsigned max_dist_1x = 0;
> +static const uint64_t centroid_priority_1x = 0xull;
>
>  /* 2xMSAA */
>  static const uint32_t sample_locs_2x =
> FILL_SREG(4,4,   -4, -4,   0, 0,   0, 0);
>  static const unsigned max_dist_2x = 4;
> +static const uint64_t centroid_priority_2x = 0x1010101010101010ull;
>
>  /* 4xMSAA */
>  static const uint32_t sample_locs_4x =
> FILL_SREG(-2,-6,   6, -2,   -6, 2,  2, 6);
>  static const unsigned max_dist_4x = 6;
> +static const uint64_t centroid_priority_4x = 0x3210321032103210ull;
>
>  /* 8xMSAA */
>  static const uint32_t sample_locs_8x[] = {
> @@ -1336,6 +1336,7 @@ static const uint32_t sample_locs_8x[] = {
> 0,
>  };
>  static const unsigned max_dist_8x = 8;
> +static const uint64_t centroid_priority_8x = 0x7654321076543210ull;
>
>  unsigned radv_get_default_max_sample_dist(int log_samples)
>  {
> @@ -1353,24 +1354,36 @@ void radv_emit_default_sample_locations(struct 
> radeon_cmdbuf *cs, int nr_samples
> switch (nr_samples) {
> default:
> case 1:
> +   radeon_set_context_reg_seq(cs, 
> R_028BD4_PA_SC_CENTROID_PRIORITY_0, 2);
> +   radeon_emit(cs, centroid_priority_1x);
> +   radeon_emit(cs, centroid_priority_1x >> 32);
> radeon_set_context_reg(cs, 
> R_028BF8_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0, sample_locs_1x);
> radeon_set_context_reg(cs, 
> R_028C08_PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_0, sample_locs_1x);
> radeon_set_context_reg(cs, 
> R_028C18_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_0, sample_locs_1x);
> radeon_set_context_reg(cs, 
> R_028C28_PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_0, sample_locs_1x);
> break;
> case 2:
> +   radeon_set_context_reg_seq(cs, 
> R_028BD4_PA_SC_CENTROID_PRIORITY_0, 2);
> +   radeon_emit(cs, centroid_priority_2x);
> +   radeon_emit(cs, centroid_priority_2x >> 32);
> radeon_set_context_reg(cs, 
> R_028BF8_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0, sample_locs_2x);
> radeon_set_context_reg(cs, 
> R_028C08_PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_0, sample_locs_2x);
> radeon_set_context_reg(cs, 
> R_028C18_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_0, sample_locs_2x);
> radeon_set_context_reg(cs, 
> R_028C28_PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_0, sample_locs_2x);
> break;
> case 4:
> +   radeon_set_context_reg_seq(cs, 
> R_028BD4_PA_SC_CENTROID_PRIORITY_0, 2);
> +   radeon_emit(cs, centroid_priority_4x);
> +   radeon_emit(cs, centroid_priority_4x >> 32);
> radeon_set_context_reg(cs, 
> R_028BF8_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0, sample_locs_4x);
> radeon_set_context_reg(cs, 
> R_028C08_PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_0, sample_locs_4x);
> radeon_set_context_reg(cs, 
> R_028C18_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_0, sample_locs_4x);
> radeon_set_context_reg(cs, 
> R_028C28_PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_0, sample_locs_4x);
> break;
> case 8:
> +   radeon_set_context_reg_seq(cs, 
> R_028BD4_PA_SC_CENTROID_PRIORITY_0, 2);
> +   radeon_emit(cs, centroid_priority_8x);
> +   radeon_emit(cs, centroid_priority_8x >> 32);
> radeon_set_context_reg_seq(cs, 
> R_028BF8_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0, 14);
> radeon_emit_array(cs, sample_locs_8x, 4);
> radeon_emit_array(cs, sample_locs_8x, 4);
> --
> 2.21.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-de

Re: [Mesa-dev] [PATCH 4/4] radv: fix the sample max distance value for 8x

2019-05-20 Thread Bas Nieuwenhuizen
r-b

On Thu, May 16, 2019 at 11:51 AM Samuel Pitoiset
 wrote:
>
> It should be 7, not 8.
>
> Signed-off-by: Samuel Pitoiset 
> ---
>  src/amd/vulkan/si_cmd_buffer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c
> index 9f6f92a42be..c73c6ecd65c 100644
> --- a/src/amd/vulkan/si_cmd_buffer.c
> +++ b/src/amd/vulkan/si_cmd_buffer.c
> @@ -1335,7 +1335,7 @@ static const uint32_t sample_locs_8x[] = {
> 0,
> 0,
>  };
> -static const unsigned max_dist_8x = 8;
> +static const unsigned max_dist_8x = 7;
>  static const uint64_t centroid_priority_8x = 0x7654321076543210ull;
>
>  unsigned radv_get_default_max_sample_dist(int log_samples)
> --
> 2.21.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 6/8] egl/dri: flesh out and use dri2_create_drawable()

2019-05-20 Thread Mathias Fröhlich
Hi,

I did not have time to really look into the series, but a quick retest:

wflinfo --platform=gbm -a gl

still crashes on my site.
Can you recheck that?

best

Mathias

On Thursday, 16 May 2019 19:01:38 CEST Emil Velikov wrote:
> From: Emil Velikov 
> 
> Wrap the loader->createNewDrawable() dance into a helper and use it
> throughout the codebase.
> 
> This addresses a cases like surfaceless (SL) on swrast (SL on kms_swrast
> is fine) where we'd attempt using the wrong driver and crash out.
> 
> v2: fixup quirky GBM (Mathias)
> 
> Cc: mesa-sta...@lists.freedesktop.org
> Cc: Mathias Fröhlich 
> Reviewed-by: Mathias Fröhlich  (v1)
> Reviewed-by: Marek Olšák  (v1)
> Signed-off-by: Emil Velikov 
> ---
>  src/egl/drivers/dri2/egl_dri2.c | 39 +
>  src/egl/drivers/dri2/egl_dri2.h |  5 +++
>  src/egl/drivers/dri2/platform_android.c | 12 +--
>  src/egl/drivers/dri2/platform_drm.c | 17 +
>  src/egl/drivers/dri2/platform_surfaceless.c |  7 +---
>  src/egl/drivers/dri2/platform_wayland.c | 14 +---
>  src/egl/drivers/dri2/platform_x11.c | 15 +---
>  7 files changed, 49 insertions(+), 60 deletions(-)
> 
> diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
> index 09d6315b19e..17a0176b646 100644
> --- a/src/egl/drivers/dri2/egl_dri2.c
> +++ b/src/egl/drivers/dri2/egl_dri2.c
> @@ -1425,6 +1425,45 @@ dri2_surf_update_fence_fd(_EGLContext *ctx,
> dri2_surface_set_out_fence_fd(surf, fence_fd);
>  }
>  
> +static inline _EGLDisplay *
> +dri2_display_to_egl_display(struct dri2_egl_display *dri2_dpy)
> +{
> +   const size_t offset = offsetof(_EGLDisplay, DriverData);
> +   return (_EGLDisplay *)(((void*) dri2_dpy) - offset);
> +}
> +
> +EGLBoolean
> +dri2_create_drawable(struct dri2_egl_display *dri2_dpy,
> + const __DRIconfig *config,
> + struct dri2_egl_surface *dri2_surf)
> +{
> +   __DRIcreateNewDrawableFunc createNewDrawable;
> +   _EGLDisplay *disp = dri2_display_to_egl_display(dri2_dpy);
> +   void *loaderPrivate = dri2_surf;
> +
> +   if (dri2_dpy->image_driver)
> +  createNewDrawable = dri2_dpy->image_driver->createNewDrawable;
> +   else if (dri2_dpy->dri2)
> +  createNewDrawable = dri2_dpy->dri2->createNewDrawable;
> +   else if (dri2_dpy->swrast)
> +  createNewDrawable = dri2_dpy->swrast->createNewDrawable;
> +   else
> +  return _eglError(EGL_BAD_ALLOC, "no createNewDrawable");
> +
> +   /* As always gbm is a bit special.. */
> +#ifdef HAVE_DRM_PLATFORM
> +   if (disp->Platform == _EGL_PLATFORM_DRM)
> +  loaderPrivate = dri2_surf->gbm_surf;
> +#endif
> +
> +   dri2_surf->dri_drawable = (*createNewDrawable)(dri2_dpy->dri_screen,
> +  config, loaderPrivate);
> +   if (dri2_surf->dri_drawable == NULL)
> +  return _eglError(EGL_BAD_ALLOC, "createNewDrawable");
> +
> +   return EGL_TRUE;
> +}
> +
>  /**
>   * Called via eglMakeCurrent(), drv->API.MakeCurrent().
>   */
> diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
> index 4918517b572..bcea3ab 100644
> --- a/src/egl/drivers/dri2/egl_dri2.h
> +++ b/src/egl/drivers/dri2/egl_dri2.h
> @@ -541,6 +541,11 @@ dri2_init_surface(_EGLSurface *surf, _EGLDisplay *disp, 
> EGLint type,
>  void
>  dri2_fini_surface(_EGLSurface *surf);
>  
> +EGLBoolean
> +dri2_create_drawable(struct dri2_egl_display *dri2_dpy,
> + const __DRIconfig *config,
> + struct dri2_egl_surface *dri2_surf);
> +
>  static inline uint64_t
>  combine_u32_into_u64(uint32_t hi, uint32_t lo)
>  {
> diff --git a/src/egl/drivers/dri2/platform_android.c 
> b/src/egl/drivers/dri2/platform_android.c
> index fece214d939..e7c7df7 100644
> --- a/src/egl/drivers/dri2/platform_android.c
> +++ b/src/egl/drivers/dri2/platform_android.c
> @@ -341,7 +341,6 @@ droid_create_surface(_EGLDriver *drv, _EGLDisplay *disp, 
> EGLint type,
>   _EGLConfig *conf, void *native_window,
>   const EGLint *attrib_list)
>  {
> -   __DRIcreateNewDrawableFunc createNewDrawable;
> struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
> struct dri2_egl_config *dri2_conf = dri2_egl_config(conf);
> struct dri2_egl_surface *dri2_surf;
> @@ -386,17 +385,8 @@ droid_create_surface(_EGLDriver *drv, _EGLDisplay *disp, 
> EGLint type,
>goto cleanup_surface;
> }
>  
> -   if (dri2_dpy->image_driver)
> -  createNewDrawable = dri2_dpy->image_driver->createNewDrawable;
> -   else
> -  createNewDrawable = dri2_dpy->dri2->createNewDrawable;
> -
> -   dri2_surf->dri_drawable = (*createNewDrawable)(dri2_dpy->dri_screen, 
> config,
> -  dri2_surf);
> -   if (dri2_surf->dri_drawable == NULL) {
> -  _eglError(EGL_BAD_ALLOC, "createNewDrawable");
> +   if (!dri2_create_drawable(dri2_dpy, config, dri2_surf))
>goto cleanup_surface;
> - 

Re: [Mesa-dev] [PATCH] radeonsi: allow query functions for compute-only contexts

2019-05-20 Thread Jan Vesely
On Mon, May 13, 2019 at 6:40 PM Marek Olšák  wrote:
>
> From: Marek Olšák 
>
> ---
>  src/gallium/drivers/radeonsi/si_pipe.c  | 2 +-
>  src/gallium/drivers/radeonsi/si_query.c | 7 ---
>  2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_pipe.c 
> b/src/gallium/drivers/radeonsi/si_pipe.c
> index aa7f012f071..95280675506 100644
> --- a/src/gallium/drivers/radeonsi/si_pipe.c
> +++ b/src/gallium/drivers/radeonsi/si_pipe.c
> @@ -482,29 +482,29 @@ static struct pipe_context *si_create_context(struct 
> pipe_screen *screen,
> sctx->b.set_device_reset_callback = si_set_device_reset_callback;
>
> si_init_all_descriptors(sctx);
> si_init_buffer_functions(sctx);
> si_init_clear_functions(sctx);
> si_init_blit_functions(sctx);
> si_init_compute_functions(sctx);
> si_init_compute_blit_functions(sctx);
> si_init_debug_functions(sctx);
> si_init_fence_functions(sctx);
> +   si_init_query_functions(sctx);
> si_init_state_compute_functions(sctx);
>
> if (sscreen->debug_flags & DBG(FORCE_DMA))
> sctx->b.resource_copy_region = sctx->dma_copy;
>
> /* Initialize graphics-only context functions. */
> if (sctx->has_graphics) {
> si_init_context_texture_functions(sctx);
> -   si_init_query_functions(sctx);
> si_init_msaa_functions(sctx);
> si_init_shader_functions(sctx);
> si_init_state_functions(sctx);
> si_init_streamout_functions(sctx);
> si_init_viewport_functions(sctx);
>
> sctx->blitter = util_blitter_create(&sctx->b);
> if (sctx->blitter == NULL)
> goto fail;
> sctx->blitter->skip_viewport_restore = true;
> diff --git a/src/gallium/drivers/radeonsi/si_query.c 
> b/src/gallium/drivers/radeonsi/si_query.c
> index d98bea2eeb3..3e357e8b6c0 100644
> --- a/src/gallium/drivers/radeonsi/si_query.c
> +++ b/src/gallium/drivers/radeonsi/si_query.c
> @@ -1879,23 +1879,24 @@ static int si_get_driver_query_group_info(struct 
> pipe_screen *screen,
>
>  void si_init_query_functions(struct si_context *sctx)
>  {
> sctx->b.create_query = si_create_query;
> sctx->b.create_batch_query = si_create_batch_query;
> sctx->b.destroy_query = si_destroy_query;
> sctx->b.begin_query = si_begin_query;
> sctx->b.end_query = si_end_query;
> sctx->b.get_query_result = si_get_query_result;
> sctx->b.get_query_result_resource = si_get_query_result_resource;
> -   sctx->atoms.s.render_cond.emit = si_emit_query_predication;
>
> -   if (((struct si_screen*)sctx->b.screen)->info.num_render_backends > 0)
> -   sctx->b.render_condition = si_render_condition;
> +   if (sctx->has_graphics) {
> +   sctx->atoms.s.render_cond.emit = si_emit_query_predication;
> +   sctx->b.render_condition = si_render_condition;
> +   }
>
> LIST_INITHEAD(&sctx->active_queries);
>  }
>
>  void si_init_screen_query_functions(struct si_screen *sscreen)
>  {
> sscreen->b.get_driver_query_info = si_get_driver_query_info;
> sscreen->b.get_driver_query_group_info = 
> si_get_driver_query_group_info;
>  }
> --
> 2.17.1

Hi,

this patch hangs query requests (tested on carrizo and raven).

Jan

>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 2/2] mesa: unreference current winsys buffers when unbinding winsys buffers

2019-05-20 Thread Charmaine Lee

>From: Brian Paul 
>Sent: Monday, May 20, 2019 6:39 AM
>To: Charmaine Lee; mesa-dev@lists.freedesktop.org; Neha Bhende; 
>marek.ol...@amd.com
>Subject: Re: [PATCH 2/2] mesa: unreference current winsys buffers when 
>unbinding winsys buffers

>Both look OK to me.  Do they need to be tagged with "Cc:
mesa-sta...@lists.freedesktop.org" for the stable branches?

>Reviewed-by: Brian Paul 

Yes, I will add the tag.  Thanks Brian for reviewing.

-Charmaine



>On 05/18/2019 07:46 PM, Charmaine Lee wrote:
>> This fixes surface leak when no winsys buffers are bound.
>> ---
>>   src/mesa/main/context.c | 4 
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
>> index 34da16b..04ef4d5 100644
>> --- a/src/mesa/main/context.c
>> +++ b/src/mesa/main/context.c
>> @@ -1765,6 +1765,10 @@ _mesa_make_current( struct gl_context *newCtx,
>>
>>check_init_viewport(newCtx, drawBuffer->Width, 
>> drawBuffer->Height);
>> }
>> +  else {
>> + _mesa_reference_framebuffer(&newCtx->WinSysDrawBuffer, NULL);
>> + _mesa_reference_framebuffer(&newCtx->WinSysReadBuffer, NULL);
>> +  }
>>
>> if (newCtx->FirstTimeCurrent) {
>>handle_first_current(newCtx);
>>

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [Bug 110716] SWR doesn't work with OSMesa

2019-05-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=110716

Bug ID: 110716
   Summary: SWR doesn't work with OSMesa
   Product: Mesa
   Version: unspecified
  Hardware: Other
OS: Linux (All)
Status: NEW
  Severity: blocker
  Priority: medium
 Component: Drivers/Gallium/swr
  Assignee: mesa-dev@lists.freedesktop.org
  Reporter: chuck.atk...@kitware.com
QA Contact: mesa-dev@lists.freedesktop.org

SWR triggers an assertion failure when rendering with OSMesa in the current
Meson build.  This did not happen previously with the autotools build.

Steps to reproduce:


1.  Build with meson using -Dosmesa=gallium -Dgallium-drivers=swrast,swr

2.  Use the ParaView OSMesa prebuilt binaries for 5.6.0 from
https://www.paraview.org/download/

3.  Run the benchmark with llvmpipe (success):
GALLIUM_DRIVER=llvmpipe
LD_LIBRARY_PATH=/home/khq.kitware.com/chuck.atkins/Code/mesa/install/master/lib64:$LD_LIBRARY_PATH
 ../ParaView-5.6.0-osmesa-MPI-Linux-64bit/bin/pvpython
../ParaView-5.6.0-osmesa-MPI-Linux-64bit/lib/python2.7/site-packages/paraview/benchmark/manyspheres.py
 
Generating bounding box
Generating all spheres
Assigning colors
  source 0: generating 100 spheres from 0 to 100
Repositioning initial camera
Rendering first frame
Saving frame 0 screenshot
Gathering geometry counts
Beginning benchmark loop
...
Frames / Sec: 49.29
Polys / Frame: 1612
MiPolys / Sec: 0.076
Points / Frame: 1008

4.  Run the benchmark with swr (fail):
GALLIUM_DRIVER=swr LD_LIBRARY_PATH=/path/to/mesa/install/lib64:$LD_LIBRARY_PATH
 /path/to/ParaView-5.6.0-osmesa-MPI-Linux-64bit/bin/pvpython
/path/to/ParaView-5.6.0-osmesa-MPI-Linux-64bit/lib/python2.7/site-packages/paraview/benchmark/manyspheres.py
 
Generating bounding box
Generating all spheres
Assigning colors
  source 0: generating 100 spheres from 0 to 100
Repositioning initial camera
Rendering first frame
SWR detected AVX2 instruction support (using: libswrAVX2.so).
../../source/master/src/gallium/drivers/swr/rasterizer/core/ringbuffer.h(45):
ASSERT: ((1ULL << 32) % numEntries) == 0
Init
400 is not evenly divisible into 2 ^ 32.  Wrap errors will occur!
Trace/breakpoint trap (core dumped)


Note that the same test works correctly for both llvm pipe and SWR wnen using
the gallium-xlib GLX implementation.  This only fails for swr and OSMesa

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/2] panfrost: ci: Switch to kernel 5.2-rc1

2019-05-20 Thread Alyssa Rosenzweig
Both patches are A-b, thank you! :)
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 2/2] mesa: unreference current winsys buffers when unbinding winsys buffers

2019-05-20 Thread Brian Paul
Both look OK to me.  Do they need to be tagged with "Cc: 
mesa-sta...@lists.freedesktop.org" for the stable branches?


Reviewed-by: Brian Paul 


On 05/18/2019 07:46 PM, Charmaine Lee wrote:

This fixes surface leak when no winsys buffers are bound.
---
  src/mesa/main/context.c | 4 
  1 file changed, 4 insertions(+)

diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 34da16b..04ef4d5 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1765,6 +1765,10 @@ _mesa_make_current( struct gl_context *newCtx,
  
   check_init_viewport(newCtx, drawBuffer->Width, drawBuffer->Height);

}
+  else {
+ _mesa_reference_framebuffer(&newCtx->WinSysDrawBuffer, NULL);
+ _mesa_reference_framebuffer(&newCtx->WinSysReadBuffer, NULL);
+  }
  
if (newCtx->FirstTimeCurrent) {

   handle_first_current(newCtx);



___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] nir: silence three compiler warnings seen with MinGW

2019-05-20 Thread Brian Paul
Silence two unused var warnings.  And init elem_size, elem_align to
zero to silence "maybe uninitialized" warnings.
---
 src/compiler/nir/nir_lower_int_to_float.c | 2 +-
 src/compiler/nir/nir_opt_copy_prop_vars.c | 4 +---
 src/compiler/nir_types.cpp| 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/compiler/nir/nir_lower_int_to_float.c 
b/src/compiler/nir/nir_lower_int_to_float.c
index 439afa0..66a740d9 100644
--- a/src/compiler/nir/nir_lower_int_to_float.c
+++ b/src/compiler/nir/nir_lower_int_to_float.c
@@ -28,7 +28,7 @@
 static bool
 assert_ssa_def_is_not_int(nir_ssa_def *def, void *arg)
 {
-   BITSET_WORD *int_types = arg;
+   MAYBE_UNUSED BITSET_WORD *int_types = arg;
assert(!BITSET_TEST(int_types, def->index));
return true;
 }
diff --git a/src/compiler/nir/nir_opt_copy_prop_vars.c 
b/src/compiler/nir/nir_opt_copy_prop_vars.c
index 94bc8af..0fd96b7 100644
--- a/src/compiler/nir/nir_opt_copy_prop_vars.c
+++ b/src/compiler/nir/nir_opt_copy_prop_vars.c
@@ -433,9 +433,7 @@ load_element_from_ssa_entry_value(struct 
copy_prop_var_state *state,
   nir_builder *b, nir_intrinsic_instr *intrin,
   struct value *value, unsigned index)
 {
-   const struct glsl_type *type = entry->dst->type;
-   unsigned num_components = glsl_get_vector_elements(type);
-   assert(index < num_components);
+   assert(index < glsl_get_vector_elements(entry->dst->type));
 
/* We don't have the element available, so let the instruction do the work. 
*/
if (!entry->src.ssa.def[index])
diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index 3bf93c5..e2dfc40 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -630,7 +630,7 @@ glsl_get_natural_size_align_bytes(const struct glsl_type 
*type,
   *size = 0;
   *align = 0;
   for (unsigned i = 0; i < type->length; i++) {
- unsigned elem_size, elem_align;
+ unsigned elem_size = 0, elem_align = 0;
  glsl_get_natural_size_align_bytes(type->fields.structure[i].type,
&elem_size, &elem_align);
  *align = MAX2(*align, elem_align);
-- 
2.7.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] svga: clamp max_const_buffers to SVGA_MAX_CONST_BUFS

2019-05-20 Thread Brian Paul
In case the device reports 15 (or more) buffers.
---
 src/gallium/drivers/svga/svga_screen.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/svga/svga_screen.c 
b/src/gallium/drivers/svga/svga_screen.c
index 02c1a99..b70fd85 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -1079,7 +1079,8 @@ svga_screen_create(struct svga_winsys_screen *sws)
   /* Maximum number of constant buffers */
   svgascreen->max_const_buffers =
  get_uint_cap(sws, SVGA3D_DEVCAP_DX_MAX_CONSTANT_BUFFERS, 1);
-  assert(svgascreen->max_const_buffers <= SVGA_MAX_CONST_BUFS);
+  svgascreen->max_const_buffers = MIN2(svgascreen->max_const_buffers,
+   SVGA_MAX_CONST_BUFS);
 
   screen->is_format_supported = svga_is_dx_format_supported;
}
-- 
2.7.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 2/2] radeonsi: update buffer descriptors in all contexts after buffer invalidation

2019-05-20 Thread Mike Lothian
I managed to trigger the bug remotely using that branch :(

On Mon, 20 May 2019 at 09:03, Juan A. Suarez Romero  wrote:
>
> On Sat, 2019-05-18 at 15:52 +0100, Mike Lothian wrote:
> > This patch is causing strange behaviour for me (and someone else on
> > IRC) on my Raven system
> >
>
> Are you testing with master branch? Could you try with the staging/19.1 branch
> (current HEAD is fb6cce5817d)?
>
>
> If the problem persists, I can remove that patch from the queue, unless Marek
> can provide a fix for it.
>
> Thanks!
>
> J.A.
>
> > May 18 15:31:43 quark kwin_x11[607]: qt.qpa.xcb: QXcbConnection: XCB
> > error: 3 (BadWindow), sequence: 2825, resource id: 37748896, major
> > code: 18 (ChangeProperty), minor code: 0
> > May 18 15:31:44 quark systemsettings5[839]: WARNING:
> > viewBackgroundColor is deprecated, use backgroundColor with colorSet:
> > Theme.View instead
> > May 18 15:31:44 quark systemsettings5[839]: WARNING:
> > viewBackgroundColor is deprecated, use backgroundColor with colorSet:
> > Theme.View instead
> > May 18 15:31:44 quark systemsettings5[839]:
> > file:///usr/lib64/qt5/qml/QtQuick/Controls.2/org.kde.desktop/private/MobileTextActionsToolBar.qml:49:
> > TypeError: Cannot read property 'height' of null
> > May 18 15:31:44 quark systemsettings5[839]:
> > file:///usr/lib64/qt5/qml/QtQuick/Controls.2/org.kde.desktop/private/MobileTextActionsToolBar.qml:38:
> > TypeError: Cannot read property 'width' of null
> > May 18 15:31:44 quark systemsettings5[839]: WARNING:
> > viewBackgroundColor is deprecated, use backgroundColor with colorSet:
> > Theme.View instead
> > May 18 15:31:44 quark systemsettings5[839]: WARNING:
> > viewBackgroundColor is deprecated, use backgroundColor with colorSet:
> > Theme.View instead
> > May 18 15:31:44 quark systemsettings5[839]: KActivities: Database
> > connection:  "kactivities_db_resources_140035686410368_readonly"
> >query_only:
> > QVariant(qlonglong, 1)
> >journal_mode:
> > QVariant(QString, "wal")
> >wal_autocheckpoint:
> > QVariant(qlonglong, 100)
> >synchronous:
> > QVariant(qlonglong, 0)
> > May 18 15:31:44 quark systemsettings5[839]: Nothing to load - the
> > client id is empty
> > May 18 15:31:44 quark systemsettings5[839]: Nothing to load - the
> > client id is empty
> > May 18 15:31:44 quark systemsettings5[839]: WARNING:
> > viewBackgroundColor is deprecated, use backgroundColor with colorSet:
> > Theme.View instead
> > May 18 15:31:44 quark systemsettings5[839]: WARNING:
> > viewBackgroundColor is deprecated, use backgroundColor with colorSet:
> > Theme.View instead
> > May 18 15:31:44 quark kernel: amdgpu :08:00.0: [gfxhub] retry page
> > fault (src_id:0 ring:0 vmid:5 pasid:32769, for process systemsettings5
> > pid 839 thread systemsett:cs0 pid 842)
> > May 18 15:31:44 quark kernel: amdgpu :08:00.0:   in page starting
> > at address 0x80010105 from 27
> > May 18 15:31:44 quark kernel: amdgpu :08:00.0:
> > VM_L2_PROTECTION_FAULT_STATUS:0x00501031
> > May 18 15:31:44 quark kernel: amdgpu :08:00.0: [gfxhub] retry page
> > fault (src_id:0 ring:0 vmid:5 pasid:32769, for process systemsettings5
> > pid 839 thread systemsett:cs0 pid 842)
> > May 18 15:31:44 quark kernel: amdgpu :08:00.0:   in page starting
> > at address 0x80010105 from 27
> > May 18 15:31:44 quark kernel: amdgpu :08:00.0:
> > VM_L2_PROTECTION_FAULT_STATUS:0x00501031
> > May 18 15:31:44 quark kernel: amdgpu :08:00.0: [gfxhub] retry page
> > fault (src_id:0 ring:0 vmid:5 pasid:32769, for process systemsettings5
> > pid 839 thread systemsett:cs0 pid 842)
> > May 18 15:31:44 quark kernel: amdgpu :08:00.0:   in page starting
> > at address 0x80010105 from 27
> > May 18 15:31:44 quark kernel: amdgpu :08:00.0:
> > VM_L2_PROTECTION_FAULT_STATUS:0x00501031
> > May 18 15:31:44 quark kernel: amdgpu :08:00.0: [gfxhub] retry page
> > fault (src_id:0 ring:0 vmid:5 pasid:32769, for process systemsettings5
> > pid 839 thread systemsett:cs0 pid 842)
> > May 18 15:31:44 quark kernel: amdgpu :08:00.0:   in page starting
> > at address 0x80010105 from 27
> > May 18 15:31:44 quark kernel: amdgpu :08:00.0:
> > VM_L2_PROTECTION_FAULT_STATUS:0x00501031
> > May 18 15:31:44 quark kernel: amdgpu :08:00.0: [gfxhub] retry page
> > fault (src_id:0 ring:0 vmid:5 pasid:32769, for process systemsettings5
> > pid 839 thread systemsett:cs0 pid 842)
> > May 18 15:31:44 quark kernel: amdgpu :08:00.0:   in page starting
> > at address 0x80010105 from 27
> > May 18 15:31:44 quark kernel: amdgpu :08:00.0:
> > VM_L2_PROTECTION_FAULT_STATUS:0x00501031
> > May 18 15:31:44 quark kernel: amdgpu :08:00.0: [gfxhub] retry page
> > fault (src_id:0 ring:0 vmid:5 pasid:32769, for process systemsettings5
> > pid 839 thread systemsett:cs0 pi

Re: [Mesa-dev] [PATCH] radv: decompress FMASK before performing a MSAA decompress using FMASK

2019-05-20 Thread Bas Nieuwenhuizen
r-b

On Thu, May 16, 2019 at 9:21 AM Samuel Pitoiset
 wrote:
>
> This fixes some CTS failures related to VK_EXT_sample_locations.
>
> Signed-off-by: Samuel Pitoiset 
> ---
>  src/amd/vulkan/radv_cmd_buffer.c | 15 +--
>  1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_cmd_buffer.c 
> b/src/amd/vulkan/radv_cmd_buffer.c
> index 506efc4dae0..476ae35e0a0 100644
> --- a/src/amd/vulkan/radv_cmd_buffer.c
> +++ b/src/amd/vulkan/radv_cmd_buffer.c
> @@ -4833,17 +4833,28 @@ static void radv_handle_color_image_transition(struct 
> radv_cmd_buffer *cmd_buffe
> radv_fast_clear_flush_image_inplace(cmd_buffer, 
> image, range);
> }
> } else if (radv_image_has_cmask(image) || 
> radv_image_has_fmask(image)) {
> +   bool fce_eliminate = false, fmask_expand = false;
> +
> if (radv_layout_can_fast_clear(image, src_layout, 
> src_queue_mask) &&
> !radv_layout_can_fast_clear(image, dst_layout, 
> dst_queue_mask)) {
> -   radv_fast_clear_flush_image_inplace(cmd_buffer, 
> image, range);
> +   fce_eliminate = true;
> }
>
> if (radv_image_has_fmask(image)) {
> if (src_layout != VK_IMAGE_LAYOUT_GENERAL &&
> dst_layout == VK_IMAGE_LAYOUT_GENERAL) {
> -   radv_expand_fmask_image_inplace(cmd_buffer, 
> image, range);
> +   /* A FMASK decompress is required before doing
> +* a MSAA decompress using FMASK.
> +*/
> +   fmask_expand = true;
> }
> }
> +
> +   if (fce_eliminate || fmask_expand)
> +   radv_fast_clear_flush_image_inplace(cmd_buffer, 
> image, range);
> +
> +   if (fmask_expand)
> +   radv_expand_fmask_image_inplace(cmd_buffer, image, 
> range);
> }
>  }
>
> --
> 2.21.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 2/2] panfrost: ci: Avoid pulling Docker image on every run

2019-05-20 Thread Tomeu Vizoso
Jump over the container stage if we haven't changed any of the files
that involved in building the container images.

This saves 1-2 minutes in each run and helps conserve resources.

Signed-off-by: Tomeu Vizoso 
---
 src/gallium/drivers/panfrost/ci/gitlab-ci.yml | 52 +++
 1 file changed, 29 insertions(+), 23 deletions(-)

diff --git a/src/gallium/drivers/panfrost/ci/gitlab-ci.yml 
b/src/gallium/drivers/panfrost/ci/gitlab-ci.yml
index 635d7b04bcde..3491b9f98752 100644
--- a/src/gallium/drivers/panfrost/ci/gitlab-ci.yml
+++ b/src/gallium/drivers/panfrost/ci/gitlab-ci.yml
@@ -2,23 +2,29 @@ variables:
   DOCKER_DRIVER: overlay2
 
 stages:
-  - build-container
+  - containers
   - build
   - test
 
 # Build Docker image with deqp, the rootfs and the build deps for Mesa
-.build-container:
-  stage: build-container
-  when: always
+.container:
+  stage: containers
+  image: docker:stable
+  only:
+changes:
+  - src/gallium/drivers/panfrost/ci/gitlab-ci.yml
+  - src/gallium/drivers/panfrost/ci/Dockerfile
+  - src/gallium/drivers/panfrost/ci/create-rootfs.sh
+  - src/gallium/drivers/panfrost/ci/${KERNEL_ARCH}.config
   services:
 - docker:dind
-  image: docker:latest
+  variables:
+DOCKER_HOST: tcp://docker:2375
+DOCKER_DRIVER: overlay2
   script:
-- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
-- time docker pull $CI_REGISTRY_IMAGE/${DEBIAN_ARCH}:latest || true
+- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
 - time docker build
- -t $CI_REGISTRY_IMAGE/${DEBIAN_ARCH}
- --cache-from $CI_REGISTRY_IMAGE/${DEBIAN_ARCH}:latest
+ -t $CI_REGISTRY/$CI_PROJECT_PATH/${DEBIAN_ARCH}
  --build-arg DEBIAN_ARCH=${DEBIAN_ARCH}
  --build-arg GCC_ARCH=${GCC_ARCH}
  --build-arg KERNEL_ARCH=${KERNEL_ARCH}
@@ -26,11 +32,11 @@ stages:
  --build-arg DEVICE_TREES=${DEVICE_TREES}
  --build-arg KERNEL_IMAGE_NAME=${KERNEL_IMAGE_NAME}
  src/gallium/drivers/panfrost/ci
-- time docker push $CI_REGISTRY_IMAGE/${DEBIAN_ARCH}:latest
-- docker history $CI_REGISTRY_IMAGE/${DEBIAN_ARCH}:latest
+- time docker push $CI_REGISTRY/$CI_PROJECT_PATH/${DEBIAN_ARCH}
+- docker history $CI_REGISTRY/$CI_PROJECT_PATH/${DEBIAN_ARCH}
 
-build-container-armhf:
-  extends: .build-container
+container:armhf:
+  extends: .container
   variables:
 DEBIAN_ARCH: "armhf"
 GCC_ARCH: "arm-linux-gnueabihf"
@@ -39,8 +45,8 @@ build-container-armhf:
 DEVICE_TREES: "arch/arm/boot/dts/rk3288-veyron-jaq.dtb"
 KERNEL_IMAGE_NAME: "zImage"
 
-build-container-arm64:
-  extends: .build-container
+container:arm64:
+  extends: .container
   variables:
 DEBIAN_ARCH: "arm64"
 GCC_ARCH: "aarch64-linux-gnu"
@@ -51,7 +57,7 @@ build-container-arm64:
 
 .build:
   stage: build
-  image: $CI_REGISTRY_IMAGE/${DEBIAN_ARCH}:latest
+  image: $CI_REGISTRY/$CI_PROJECT_PATH/${DEBIAN_ARCH}:latest
   cache:
 paths:
   - ccache
@@ -100,7 +106,7 @@ build-container-arm64:
 paths:
   - results/
 
-build-armhf:
+build:armhf:
   extends: .build
   variables:
 DEBIAN_ARCH: "armhf"
@@ -108,7 +114,7 @@ build-armhf:
 DEVICE_TYPE: "rk3288-veyron-jaq"
 KERNEL_IMAGE_NAME: "zImage"
 
-build-arm64:
+build:arm64:
   extends: .build
   variables:
 DEBIAN_ARCH: "arm64"
@@ -120,7 +126,7 @@ build-arm64:
   stage: test
   tags:
 - idle-jobs
-  image: $CI_REGISTRY_IMAGE:latest
+  image: $CI_REGISTRY/$CI_PROJECT_PATH/arm64:latest  # Any of the images will 
be fine
   script:
 - mkdir -p ~/.config/
 - |
@@ -201,13 +207,13 @@ build-arm64:
 paths:
   - results/
 
-test-armhf:
+test:armhf:
   extends: .test
   dependencies:
-- build-armhf
+- build:armhf
 
-test-arm64:
+test:arm64:
   extends: .test
   dependencies:
-- build-arm64
+- build:arm64
 
-- 
2.20.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 1/2] panfrost: ci: Switch to kernel 5.2-rc1

2019-05-20 Thread Tomeu Vizoso
Signed-off-by: Tomeu Vizoso 
---
 src/gallium/drivers/panfrost/ci/Dockerfile | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/panfrost/ci/Dockerfile 
b/src/gallium/drivers/panfrost/ci/Dockerfile
index 268edf224a20..8c4a4e0444ec 100644
--- a/src/gallium/drivers/panfrost/ci/Dockerfile
+++ b/src/gallium/drivers/panfrost/ci/Dockerfile
@@ -112,12 +112,11 @@ ARG KERNEL_ARCH
 ARG DEFCONFIG
 ARG DEVICE_TREES
 ARG KERNEL_IMAGE_NAME
-# TODO: Switch to 5.2-rc* when the time comes
+ENV 
KERNEL_URL="https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux/+archive/refs/tags/v5.2-rc1.tar.gz";
+
 COPY ${KERNEL_ARCH}.config /panfrost-ci/
 RUN mkdir -p /kernel   
&& \
-  wget 
https://github.com/freedesktop/drm-misc/archive/drm-misc-next-2019-04-18.tar.gz 
&& \
-  tar xfz drm-misc-next-2019-04-18.tar.gz -C /kernel --strip-components=1  
&& \
-  rm drm-misc-next-2019-04-18.tar.gz   
&& \
+  wget -qO- ${KERNEL_URL} | tar -xvz -C /kernel
&& \
   cd /kernel   
&& \
   ARCH=${KERNEL_ARCH} CROSS_COMPILE="${GCC_ARCH}-" 
./scripts/kconfig/merge_config.sh ${DEFCONFIG} 
/panfrost-ci/${KERNEL_ARCH}.config && \
   ARCH=${KERNEL_ARCH} CROSS_COMPILE="${GCC_ARCH}-" make -j12 
${KERNEL_IMAGE_NAME} dtbs && \
-- 
2.20.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 3/3] radv: use only one descriptor in the fmask expand pass

2019-05-20 Thread Samuel Pitoiset
This removes one useless SMEM load operations which pointed to
the same descriptor anyway.

Signed-off-by: Samuel Pitoiset 
---
 src/amd/vulkan/radv_meta_fmask_expand.c | 27 +++--
 1 file changed, 3 insertions(+), 24 deletions(-)

diff --git a/src/amd/vulkan/radv_meta_fmask_expand.c 
b/src/amd/vulkan/radv_meta_fmask_expand.c
index 44068edc89e..a9567eaf0fd 100644
--- a/src/amd/vulkan/radv_meta_fmask_expand.c
+++ b/src/amd/vulkan/radv_meta_fmask_expand.c
@@ -50,7 +50,7 @@ build_fmask_expand_compute_shader(struct radv_device *device, 
int samples)
nir_variable *output_img = nir_variable_create(b.shader, 
nir_var_uniform,
   img_type, "out_img");
output_img->data.descriptor_set = 0;
-   output_img->data.binding = 1;
+   output_img->data.binding = 0;
output_img->data.image.access = ACCESS_NON_READABLE;
 
nir_ssa_def *invoc_id = nir_load_local_invocation_id(&b);
@@ -144,27 +144,13 @@ radv_expand_fmask_image_inplace(struct radv_cmd_buffer 
*cmd_buffer,
  VK_PIPELINE_BIND_POINT_COMPUTE,
  
cmd_buffer->device->meta_state.fmask_expand.p_layout,
  0, /* set */
- 2, /* descriptorWriteCount */
+ 1, /* descriptorWriteCount */
  (VkWriteDescriptorSet[]) {
  {
  .sType = 
VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
  .dstBinding = 0,
  .dstArrayElement = 0,
  .descriptorCount = 1,
- .descriptorType = 
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
- .pImageInfo = 
(VkDescriptorImageInfo[]) {
- {
- .sampler 
= VK_NULL_HANDLE,
- 
.imageView = radv_image_view_to_handle(&iview),
- 
.imageLayout = VK_IMAGE_LAYOUT_GENERAL
- },
- }
- },
- {
- .sType = 
VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
- .dstBinding = 1,
- .dstArrayElement = 0,
- .descriptorCount = 1,
  .descriptorType = 
VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
  .pImageInfo = 
(VkDescriptorImageInfo[]) {
  {
@@ -250,17 +236,10 @@ radv_device_init_meta_fmask_expand_state(struct 
radv_device *device)
VkDescriptorSetLayoutCreateInfo ds_create_info = {
.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO,
.flags = 
VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR,
-   .bindingCount = 2,
+   .bindingCount = 1,
.pBindings = (VkDescriptorSetLayoutBinding[]) {
{
.binding = 0,
-   .descriptorType = 
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
-   .descriptorCount = 1,
-   .stageFlags = VK_SHADER_STAGE_COMPUTE_BIT,
-   .pImmutableSamplers = NULL
-   },
-   {
-   .binding = 1,
.descriptorType = 
VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
.descriptorCount = 1,
.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT,
-- 
2.21.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 2/3] radv: set ACCESS_NON_READABLE on the fmask expand pass output image

2019-05-20 Thread Samuel Pitoiset
The driver will emit GLC=1.

Signed-off-by: Samuel Pitoiset 
---
 src/amd/vulkan/radv_meta_fmask_expand.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/amd/vulkan/radv_meta_fmask_expand.c 
b/src/amd/vulkan/radv_meta_fmask_expand.c
index 12533935348..44068edc89e 100644
--- a/src/amd/vulkan/radv_meta_fmask_expand.c
+++ b/src/amd/vulkan/radv_meta_fmask_expand.c
@@ -51,6 +51,7 @@ build_fmask_expand_compute_shader(struct radv_device *device, 
int samples)
   img_type, "out_img");
output_img->data.descriptor_set = 0;
output_img->data.binding = 1;
+   output_img->data.image.access = ACCESS_NON_READABLE;
 
nir_ssa_def *invoc_id = nir_load_local_invocation_id(&b);
nir_ssa_def *wg_id = nir_load_work_group_id(&b);
-- 
2.21.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 1/3] radv: remove one useless image type in the fmask expand shader

2019-05-20 Thread Samuel Pitoiset
Both input and output images use the same type.

Signed-off-by: Samuel Pitoiset 
---
 src/amd/vulkan/radv_meta_fmask_expand.c | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/amd/vulkan/radv_meta_fmask_expand.c 
b/src/amd/vulkan/radv_meta_fmask_expand.c
index f4b55328929..12533935348 100644
--- a/src/amd/vulkan/radv_meta_fmask_expand.c
+++ b/src/amd/vulkan/radv_meta_fmask_expand.c
@@ -30,10 +30,7 @@ build_fmask_expand_compute_shader(struct radv_device 
*device, int samples)
 {
nir_builder b;
char name[64];
-   const struct glsl_type *input_img_type =
-   glsl_sampler_type(GLSL_SAMPLER_DIM_MS, false, false,
- GLSL_TYPE_FLOAT);
-   const struct glsl_type *output_img_type =
+   const struct glsl_type *img_type =
glsl_sampler_type(GLSL_SAMPLER_DIM_MS, false, false,
  GLSL_TYPE_FLOAT);
 
@@ -46,12 +43,12 @@ build_fmask_expand_compute_shader(struct radv_device 
*device, int samples)
b.shader->info.cs.local_size[2] = 1;
 
nir_variable *input_img = nir_variable_create(b.shader, nir_var_uniform,
- input_img_type, "s_tex");
+ img_type, "s_tex");
input_img->data.descriptor_set = 0;
input_img->data.binding = 0;
 
nir_variable *output_img = nir_variable_create(b.shader, 
nir_var_uniform,
-  output_img_type, 
"out_img");
+  img_type, "out_img");
output_img->data.descriptor_set = 0;
output_img->data.binding = 1;
 
-- 
2.21.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 2/2] radeonsi: update buffer descriptors in all contexts after buffer invalidation

2019-05-20 Thread Juan A. Suarez Romero
On Sat, 2019-05-18 at 15:52 +0100, Mike Lothian wrote:
> This patch is causing strange behaviour for me (and someone else on
> IRC) on my Raven system
> 

Are you testing with master branch? Could you try with the staging/19.1 branch
(current HEAD is fb6cce5817d)?


If the problem persists, I can remove that patch from the queue, unless Marek
can provide a fix for it.

Thanks!

J.A.

> May 18 15:31:43 quark kwin_x11[607]: qt.qpa.xcb: QXcbConnection: XCB
> error: 3 (BadWindow), sequence: 2825, resource id: 37748896, major
> code: 18 (ChangeProperty), minor code: 0
> May 18 15:31:44 quark systemsettings5[839]: WARNING:
> viewBackgroundColor is deprecated, use backgroundColor with colorSet:
> Theme.View instead
> May 18 15:31:44 quark systemsettings5[839]: WARNING:
> viewBackgroundColor is deprecated, use backgroundColor with colorSet:
> Theme.View instead
> May 18 15:31:44 quark systemsettings5[839]:
> file:///usr/lib64/qt5/qml/QtQuick/Controls.2/org.kde.desktop/private/MobileTextActionsToolBar.qml:49:
> TypeError: Cannot read property 'height' of null
> May 18 15:31:44 quark systemsettings5[839]:
> file:///usr/lib64/qt5/qml/QtQuick/Controls.2/org.kde.desktop/private/MobileTextActionsToolBar.qml:38:
> TypeError: Cannot read property 'width' of null
> May 18 15:31:44 quark systemsettings5[839]: WARNING:
> viewBackgroundColor is deprecated, use backgroundColor with colorSet:
> Theme.View instead
> May 18 15:31:44 quark systemsettings5[839]: WARNING:
> viewBackgroundColor is deprecated, use backgroundColor with colorSet:
> Theme.View instead
> May 18 15:31:44 quark systemsettings5[839]: KActivities: Database
> connection:  "kactivities_db_resources_140035686410368_readonly"
>query_only:
> QVariant(qlonglong, 1)
>journal_mode:
> QVariant(QString, "wal")
>wal_autocheckpoint:
> QVariant(qlonglong, 100)
>synchronous:
> QVariant(qlonglong, 0)
> May 18 15:31:44 quark systemsettings5[839]: Nothing to load - the
> client id is empty
> May 18 15:31:44 quark systemsettings5[839]: Nothing to load - the
> client id is empty
> May 18 15:31:44 quark systemsettings5[839]: WARNING:
> viewBackgroundColor is deprecated, use backgroundColor with colorSet:
> Theme.View instead
> May 18 15:31:44 quark systemsettings5[839]: WARNING:
> viewBackgroundColor is deprecated, use backgroundColor with colorSet:
> Theme.View instead
> May 18 15:31:44 quark kernel: amdgpu :08:00.0: [gfxhub] retry page
> fault (src_id:0 ring:0 vmid:5 pasid:32769, for process systemsettings5
> pid 839 thread systemsett:cs0 pid 842)
> May 18 15:31:44 quark kernel: amdgpu :08:00.0:   in page starting
> at address 0x80010105 from 27
> May 18 15:31:44 quark kernel: amdgpu :08:00.0:
> VM_L2_PROTECTION_FAULT_STATUS:0x00501031
> May 18 15:31:44 quark kernel: amdgpu :08:00.0: [gfxhub] retry page
> fault (src_id:0 ring:0 vmid:5 pasid:32769, for process systemsettings5
> pid 839 thread systemsett:cs0 pid 842)
> May 18 15:31:44 quark kernel: amdgpu :08:00.0:   in page starting
> at address 0x80010105 from 27
> May 18 15:31:44 quark kernel: amdgpu :08:00.0:
> VM_L2_PROTECTION_FAULT_STATUS:0x00501031
> May 18 15:31:44 quark kernel: amdgpu :08:00.0: [gfxhub] retry page
> fault (src_id:0 ring:0 vmid:5 pasid:32769, for process systemsettings5
> pid 839 thread systemsett:cs0 pid 842)
> May 18 15:31:44 quark kernel: amdgpu :08:00.0:   in page starting
> at address 0x80010105 from 27
> May 18 15:31:44 quark kernel: amdgpu :08:00.0:
> VM_L2_PROTECTION_FAULT_STATUS:0x00501031
> May 18 15:31:44 quark kernel: amdgpu :08:00.0: [gfxhub] retry page
> fault (src_id:0 ring:0 vmid:5 pasid:32769, for process systemsettings5
> pid 839 thread systemsett:cs0 pid 842)
> May 18 15:31:44 quark kernel: amdgpu :08:00.0:   in page starting
> at address 0x80010105 from 27
> May 18 15:31:44 quark kernel: amdgpu :08:00.0:
> VM_L2_PROTECTION_FAULT_STATUS:0x00501031
> May 18 15:31:44 quark kernel: amdgpu :08:00.0: [gfxhub] retry page
> fault (src_id:0 ring:0 vmid:5 pasid:32769, for process systemsettings5
> pid 839 thread systemsett:cs0 pid 842)
> May 18 15:31:44 quark kernel: amdgpu :08:00.0:   in page starting
> at address 0x80010105 from 27
> May 18 15:31:44 quark kernel: amdgpu :08:00.0:
> VM_L2_PROTECTION_FAULT_STATUS:0x00501031
> May 18 15:31:44 quark kernel: amdgpu :08:00.0: [gfxhub] retry page
> fault (src_id:0 ring:0 vmid:5 pasid:32769, for process systemsettings5
> pid 839 thread systemsett:cs0 pid 842)
> May 18 15:31:44 quark kernel: amdgpu :08:00.0:   in page starting
> at address 0x80010105 from 27
> May 18 15:31:44 quark kernel: amdgpu :08:00.0:
> VM_L2_PROTECTION_FAULT_STATUS:0x00501031
> May 18 15:31:44 quark kernel: amdgpu :08:00.0: [gfxhub] retry page
> fault (src_id:0