Re: [Mesa-dev] [PATCH 01/14] mesa: remove incorrect change for EXT_disjoint_timer_query

2018-08-08 Thread Tapani Pälli

Hi Marek;

On 08/09/2018 02:55 AM, Marek Olšák wrote:

From: Marek Olšák 

---
  src/mesa/main/queryobj.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 7547fa1bb4d..e97a0138e96 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -815,22 +815,21 @@ get_query_object(struct gl_context *ctx, const char *func,
 if (_mesa_is_gles(ctx) &&
 (pname != GL_QUERY_RESULT && pname != GL_QUERY_RESULT_AVAILABLE)) {
_mesa_error(ctx, GL_INVALID_ENUM, "%s(%s)", func,
_mesa_enum_to_string(pname));
return;
 }
  
 if (buf && buf != ctx->Shared->NullBufferObj) {

bool is_64bit = ptype == GL_INT64_ARB ||
   ptype == GL_UNSIGNED_INT64_ARB;
-  if (!ctx->Extensions.ARB_query_buffer_object &&
-  !ctx->Extensions.EXT_disjoint_timer_query) {
+  if (!ctx->Extensions.ARB_query_buffer_object) {
   _mesa_error(ctx, GL_INVALID_OPERATION, "%s(not supported)", func);


Can you explain what was the trouble with this change? I don't recall 
much why this particular change was added but the 
EXT_disjoint_timer_query spec adds support for int64 and uint64 GL types 
and params to be used in queries. I can run some tests to check this.




   return;
}
if (buf->Size < offset + 4 * (is_64bit ? 2 : 1)) {
   _mesa_error(ctx, GL_INVALID_OPERATION, "%s(out of bounds)", func);
   return;
}
  
if (offset < 0) {

   _mesa_error(ctx, GL_INVALID_VALUE, "%s(offset is negative)", func);


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


[Mesa-dev] [PATCH] i965: Add a new CFL PCI ID.

2018-08-08 Thread Rodrigo Vivi
One more CFL ID added to spec.

Align with kernel commit d0e062ebb3a4 ("drm/i915/cfl:
Add a new CFL PCI ID.")

Cc: José Roberto de Souza 
Cc: Anuj Phogat 
Signed-off-by: Rodrigo Vivi 
---
 include/pci_ids/i965_pci_ids.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/pci_ids/i965_pci_ids.h b/include/pci_ids/i965_pci_ids.h
index 82e4a549e0..bced44e288 100644
--- a/include/pci_ids/i965_pci_ids.h
+++ b/include/pci_ids/i965_pci_ids.h
@@ -174,6 +174,7 @@ CHIPSET(0x3EA4, cfl_gt1, "Intel(R) HD Graphics (Coffeelake 
2x6 GT1)")
 CHIPSET(0x3E91, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)")
 CHIPSET(0x3E92, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)")
 CHIPSET(0x3E96, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)")
+CHIPSET(0x3E98, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)")
 CHIPSET(0x3E9A, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)")
 CHIPSET(0x3E9B, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)")
 CHIPSET(0x3E94, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)")
-- 
2.17.1

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


[Mesa-dev] [PATCH libdrm] drm/i915/cfl: Add a new CFL PCI ID.

2018-08-08 Thread Rodrigo Vivi
One more CFL ID added to spec.

Align with kernel commit d0e062ebb3a4 ("drm/i915/cfl:
Add a new CFL PCI ID.")

Cc: José Roberto de Souza 
Signed-off-by: Rodrigo Vivi 
---
 intel/intel_chipset.h | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/intel/intel_chipset.h b/intel/intel_chipset.h
index 583d6447..4a34b7be 100644
--- a/intel/intel_chipset.h
+++ b/intel/intel_chipset.h
@@ -230,7 +230,8 @@
 #define PCI_CHIP_COFFEELAKE_S_GT2_1 0x3E91
 #define PCI_CHIP_COFFEELAKE_S_GT2_2 0x3E92
 #define PCI_CHIP_COFFEELAKE_S_GT2_3 0x3E96
-#define PCI_CHIP_COFFEELAKE_S_GT2_4 0x3E9A
+#define PCI_CHIP_COFFEELAKE_S_GT2_4 0x3E98
+#define PCI_CHIP_COFFEELAKE_S_GT2_5 0x3E9A
 #define PCI_CHIP_COFFEELAKE_H_GT2_1 0x3E9B
 #define PCI_CHIP_COFFEELAKE_H_GT2_2 0x3E94
 #define PCI_CHIP_COFFEELAKE_U_GT2_1 0x3EA9
@@ -509,7 +510,8 @@
  (devid) == PCI_CHIP_COFFEELAKE_S_GT2_1 || \
  (devid) == PCI_CHIP_COFFEELAKE_S_GT2_2 || \
  (devid) == PCI_CHIP_COFFEELAKE_S_GT2_3 || \
- (devid) == PCI_CHIP_COFFEELAKE_S_GT2_4)
+ (devid) == PCI_CHIP_COFFEELAKE_S_GT2_4 || \
+ (devid) == PCI_CHIP_COFFEELAKE_S_GT2_5)
 
 #define IS_CFL_H(devid) ((devid) == PCI_CHIP_COFFEELAKE_H_GT2_1 || \
  (devid) == PCI_CHIP_COFFEELAKE_H_GT2_2)
-- 
2.17.1

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


Re: [Mesa-dev] [PATCH 14/14] radeonsi: increase the maximum UBO size to 2 GB

2018-08-08 Thread Roland Scheidegger
I'm not quite convinced you can really use huge ubos safely? At least
direct addressing in tgsi can't work (you've only got a 16bit register
index, and it's signed too).

Roland

Am 09.08.2018 um 01:55 schrieb Marek Olšák:
> From: Marek Olšák 
> 
> Same as the closed driver.
> 
> This causes a failure in GL45-CTS.compute_shader.max, which has a trivial
> bug.
> ---
>  src/gallium/drivers/radeonsi/si_get.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_get.c 
> b/src/gallium/drivers/radeonsi/si_get.c
> index 41b9cad071b..2852705c806 100644
> --- a/src/gallium/drivers/radeonsi/si_get.c
> +++ b/src/gallium/drivers/radeonsi/si_get.c
> @@ -420,21 +420,21 @@ static int si_get_shader_param(struct pipe_screen* 
> pscreen,
>   case PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS:
>   case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH:
>   return 16384;
>   case PIPE_SHADER_CAP_MAX_INPUTS:
>   return shader == PIPE_SHADER_VERTEX ? SI_MAX_ATTRIBS : 32;
>   case PIPE_SHADER_CAP_MAX_OUTPUTS:
>   return shader == PIPE_SHADER_FRAGMENT ? 8 : 32;
>   case PIPE_SHADER_CAP_MAX_TEMPS:
>   return 256; /* Max native temporaries. */
>   case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE:
> - return 4096 * sizeof(float[4]); /* actually only memory limits 
> this */
> + return MIN2(sscreen->info.max_alloc_size, INT_MAX - 3); /* 
> aligned to 4 */
>   case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
>   return SI_NUM_CONST_BUFFERS;
>   case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
>   case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS:
>   return SI_NUM_SAMPLERS;
>   case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS:
>   return SI_NUM_SHADER_BUFFERS;
>   case PIPE_SHADER_CAP_MAX_SHADER_IMAGES:
>   return SI_NUM_IMAGES;
>   case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT:
> 

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


Re: [Mesa-dev] [PATCH 10/14] tgsi/ureg: don't call tgsi_sanity when it's too slow

2018-08-08 Thread Roland Scheidegger
Am 09.08.2018 um 01:55 schrieb Marek Olšák:
> From: Marek Olšák 
> 
> ---
>  src/gallium/auxiliary/tgsi/tgsi_ureg.c | 13 -
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c 
> b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
> index 92c98c763eb..c1c8851486e 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
> @@ -2099,21 +2099,32 @@ const struct tgsi_token *ureg_finalize( struct 
> ureg_program *ureg )
>  
> tokens = >domain[DOMAIN_DECL].tokens[0].token;
>  
> if (0) {
>debug_printf("%s: emitted shader %d tokens:\n", __FUNCTION__,
> ureg->domain[DOMAIN_DECL].count);
>tgsi_dump( tokens, 0 );
> }
>  
>  #if DEBUG
> -   if (tokens && !tgsi_sanity_check(tokens)) {
> +   /* tgsi_sanity doesn't seem to return if there are too many constants. */
> +   bool too_many_constants = false;
> +   for (unsigned i = 0; i < ARRAY_SIZE(ureg->const_decls); i++) {
> +  for (unsigned j = 0; j < ureg->const_decls[i].nr_constant_ranges; j++) 
> {
> + if (ureg->const_decls[i].constant_range[j].last > 4096) {
> +too_many_constants = true;
> +break;
> + }
> +  }
> +   }
Err, is it actually too slow, is there a bug in sanity checking or are you
making it pass sanity but tgsi emitting garbage?

Roland



> +   if (tokens && !too_many_constants && !tgsi_sanity_check(tokens)) {
>debug_printf("tgsi_ureg.c, sanity check failed on generated 
> tokens:\n");
>tgsi_dump(tokens, 0);
>assert(0);
> }
>  #endif
>  
>  
> return tokens;
>  }
>  
> 

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


[Mesa-dev] [PATCH 4/4] imx: make use of loader_open_render_node(..) helper

2018-08-08 Thread Christian Gmeiner
Gets rid of hard-coded gpu device path.

Signed-off-by: Christian Gmeiner 
---
 src/gallium/winsys/imx/drm/imx_drm_winsys.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/winsys/imx/drm/imx_drm_winsys.c 
b/src/gallium/winsys/imx/drm/imx_drm_winsys.c
index cd72610b95..4bd2125031 100644
--- a/src/gallium/winsys/imx/drm/imx_drm_winsys.c
+++ b/src/gallium/winsys/imx/drm/imx_drm_winsys.c
@@ -26,6 +26,7 @@
 
 #include "imx_drm_public.h"
 #include "etnaviv/drm/etnaviv_drm_public.h"
+#include "loader/loader.h"
 #include "renderonly/renderonly.h"
 
 #include 
@@ -36,7 +37,7 @@ struct pipe_screen *imx_drm_screen_create(int fd)
struct renderonly ro = {
   .create_for_resource = renderonly_create_kms_dumb_buffer_for_resource,
   .kms_fd = fd,
-  .gpu_fd = open("/dev/dri/renderD128", O_RDWR | O_CLOEXEC)
+  .gpu_fd = loader_open_render_node("etnaviv")
};
 
if (ro.gpu_fd < 0)
-- 
2.17.1

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


[Mesa-dev] [PATCH 2/4] loader: add loader_open_render_node(..)

2018-08-08 Thread Christian Gmeiner
This helper is almost a 1:1 copy of tegra_open_render_node().

Signed-off-by: Christian Gmeiner 
---
 src/loader/loader.c | 65 +
 src/loader/loader.h |  3 +++
 2 files changed, 68 insertions(+)

diff --git a/src/loader/loader.c b/src/loader/loader.c
index 43275484cc..60b5d71083 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -83,6 +83,65 @@ loader_open_device(const char *device_name)
 }
 
 #if defined(HAVE_LIBDRM)
+int
+loader_open_render_node(const char *name)
+{
+   drmDevicePtr *devices, device;
+   int err, render = -ENOENT, fd;
+   unsigned int num, i;
+
+   err = drmGetDevices2(0, NULL, 0);
+   if (err < 0)
+  return err;
+
+   num = err;
+
+   devices = calloc(num, sizeof(*devices));
+   if (!devices)
+  return -ENOMEM;
+
+   err = drmGetDevices2(0, devices, num);
+   if (err < 0) {
+  render = err;
+  goto free;
+   }
+
+   for (i = 0; i < num; i++) {
+  device = devices[i];
+
+  if ((device->available_nodes & (1 << DRM_NODE_RENDER)) &&
+  (device->bustype == DRM_BUS_PLATFORM)) {
+ drmVersionPtr version;
+
+ fd = open(device->nodes[DRM_NODE_RENDER], O_RDWR | O_CLOEXEC);
+ if (fd < 0)
+continue;
+
+ version = drmGetVersion(fd);
+ if (!version) {
+close(fd);
+continue;
+ }
+
+ if (strcmp(version->name, name) != 0) {
+drmFreeVersion(version);
+close(fd);
+continue;
+ }
+
+ drmFreeVersion(version);
+ render = fd;
+ break;
+  }
+   }
+
+   drmFreeDevices(devices, num);
+
+free:
+   free(devices);
+   return render;
+}
+
 #ifdef USE_DRICONF
 static const char __driConfigOptionsLoader[] =
 DRI_CONF_BEGIN
@@ -262,6 +321,12 @@ int loader_get_user_preferred_fd(int default_fd, bool 
*different_device)
return default_fd;
 }
 #else
+int
+loader_open_render_node(const char *name)
+{
+   return -1;
+}
+
 int loader_get_user_preferred_fd(int default_fd, bool *different_device)
 {
*different_device = false;
diff --git a/src/loader/loader.h b/src/loader/loader.h
index 3859b45dc4..7b4dd01144 100644
--- a/src/loader/loader.h
+++ b/src/loader/loader.h
@@ -38,6 +38,9 @@ extern "C" {
 int
 loader_open_device(const char *);
 
+int
+loader_open_render_node(const char *name);
+
 int
 loader_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id);
 
-- 
2.17.1

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


[Mesa-dev] [PATCH 3/4] tegra: make use loader_open_render_node(..) helper

2018-08-08 Thread Christian Gmeiner
Signed-off-by: Christian Gmeiner 
---
 src/gallium/drivers/tegra/tegra_screen.c | 61 +---
 1 file changed, 2 insertions(+), 59 deletions(-)

diff --git a/src/gallium/drivers/tegra/tegra_screen.c 
b/src/gallium/drivers/tegra/tegra_screen.c
index 361ec034de..243bdde8d2 100644
--- a/src/gallium/drivers/tegra/tegra_screen.c
+++ b/src/gallium/drivers/tegra/tegra_screen.c
@@ -32,6 +32,7 @@
 #include 
 #include 
 
+#include "loader/loader.h"
 #include "pipe/p_state.h"
 #include "util/u_debug.h"
 #include "util/u_inlines.h"
@@ -163,64 +164,6 @@ tegra_screen_can_create_resource(struct pipe_screen 
*pscreen,
return screen->gpu->can_create_resource(screen->gpu, template);
 }
 
-static int tegra_open_render_node(void)
-{
-   drmDevicePtr *devices, device;
-   int err, render = -ENOENT, fd;
-   unsigned int num, i;
-
-   err = drmGetDevices2(0, NULL, 0);
-   if (err < 0)
-  return err;
-
-   num = err;
-
-   devices = calloc(num, sizeof(*devices));
-   if (!devices)
-  return -ENOMEM;
-
-   err = drmGetDevices2(0, devices, num);
-   if (err < 0) {
-  render = err;
-  goto free;
-   }
-
-   for (i = 0; i < num; i++) {
-  device = devices[i];
-
-  if ((device->available_nodes & (1 << DRM_NODE_RENDER)) &&
-  (device->bustype == DRM_BUS_PLATFORM)) {
- drmVersionPtr version;
-
- fd = open(device->nodes[DRM_NODE_RENDER], O_RDWR | O_CLOEXEC);
- if (fd < 0)
-continue;
-
- version = drmGetVersion(fd);
- if (!version) {
-drmFreeVersion(version);
-close(fd);
-continue;
- }
-
- if (strcmp(version->name, "nouveau") != 0) {
-close(fd);
-continue;
- }
-
- drmFreeVersion(version);
- render = fd;
- break;
-  }
-   }
-
-   drmFreeDevices(devices, num);
-
-free:
-   free(devices);
-   return render;
-}
-
 static int tegra_screen_import_resource(struct tegra_screen *screen,
 struct tegra_resource *resource)
 {
@@ -594,7 +537,7 @@ tegra_screen_create(int fd)
 
screen->fd = fd;
 
-   screen->gpu_fd = tegra_open_render_node();
+   screen->gpu_fd = loader_open_render_node("nouveau");
if (screen->gpu_fd < 0) {
   if (errno != ENOENT)
  fprintf(stderr, "failed to open GPU device: %s\n", strerror(errno));
-- 
2.17.1

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


[Mesa-dev] [PATCH 1/4] tegra: fix memory leak

2018-08-08 Thread Christian Gmeiner
Signed-off-by: Christian Gmeiner 
---
 src/gallium/drivers/tegra/tegra_screen.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/tegra/tegra_screen.c 
b/src/gallium/drivers/tegra/tegra_screen.c
index 034ea271ee..361ec034de 100644
--- a/src/gallium/drivers/tegra/tegra_screen.c
+++ b/src/gallium/drivers/tegra/tegra_screen.c
@@ -198,6 +198,7 @@ static int tegra_open_render_node(void)
 
  version = drmGetVersion(fd);
  if (!version) {
+drmFreeVersion(version);
 close(fd);
 continue;
  }
-- 
2.17.1

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


[Mesa-dev] [PATCH 0/4] Add and make use of loader_open_render_node(..)

2018-08-08 Thread Christian Gmeiner
Factor out tegra_open_render_node() into a helper and make use of it.

Suggested-by: Emil Velikov 

Christian Gmeiner (4):
  tegra: fix memory leak
  loader: add loader_open_render_node(..)
  tegra: make use loader_open_render_node(..) helper
  imx: make use of loader_open_render_node(..) helper

 src/gallium/drivers/tegra/tegra_screen.c| 60 +--
 src/gallium/winsys/imx/drm/imx_drm_winsys.c |  3 +-
 src/loader/loader.c | 65 +
 src/loader/loader.h |  3 +
 4 files changed, 72 insertions(+), 59 deletions(-)

-- 
2.17.1

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


Re: [Mesa-dev] [PATCH v4 00/15] TGSI: improved live range tracking, also including arrays

2018-08-08 Thread Dave Airlie
On 8 August 2018 at 06:18, Gert Wollny  wrote:
> Dear all,
>
> I'd like to get this series in the 18.3 release cycle applied. I've
> been using it for quite some time without issues, and it seems to fix a
> number of problems on r600. For instance, a number of dEQP-GLES31 tests
> fail because of issued with spilling, but with these patches the need
> for spilling can be eliminated in these cases. I also didn't see any
> piglit regressions, and the patches still apply cleanly.
>
> Many thanks to anyone who reviews, or at least ack. this series,

Since this helps r600 mostly, and I've given it a once over let's land it,

For the series:
Acked-by: Dave Airlie 

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


[Mesa-dev] [PATCH 2/8] mesa: expose AMD_gpu_shader_int64

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

because the closed driver exposes it.

It's equivalent to ARB_gpu_shader_int64.
In this patch, I did everything the same as we do for ARB_gpu_shader_int64.
---
 docs/relnotes/18.3.0.html   |   1 +
 src/compiler/glsl/builtin_functions.cpp |   3 +-
 src/compiler/glsl/builtin_types.cpp |   3 +-
 src/compiler/glsl/glsl_lexer.ll |  18 +-
 src/compiler/glsl/glsl_parser_extras.cpp|   1 +
 src/compiler/glsl/glsl_parser_extras.h  |   5 +-
 src/mapi/glapi/gen/AMD_gpu_shader_int64.xml | 239 
 src/mapi/glapi/gen/gl_API.xml   |   2 +
 src/mesa/main/extensions_table.h|   1 +
 9 files changed, 261 insertions(+), 12 deletions(-)
 create mode 100644 src/mapi/glapi/gen/AMD_gpu_shader_int64.xml

diff --git a/docs/relnotes/18.3.0.html b/docs/relnotes/18.3.0.html
index ac2cc1e893b..840a336d41a 100644
--- a/docs/relnotes/18.3.0.html
+++ b/docs/relnotes/18.3.0.html
@@ -45,20 +45,21 @@ TBD.
 
 
 New features
 
 
 Note: some of the new features are only available with certain drivers.
 
 
 
 GL_AMD_framebuffer_multisample_advanced on radeonsi.
+GL_AMD_gpu_shader_int64 on i965, nvc0, radeonsi.
 GL_EXT_window_rectangles on radeonsi.
 
 
 Bug fixes
 
 
 TBD
 
 
 Changes
diff --git a/src/compiler/glsl/builtin_functions.cpp 
b/src/compiler/glsl/builtin_functions.cpp
index 7119903795f..e37d96c4636 100644
--- a/src/compiler/glsl/builtin_functions.cpp
+++ b/src/compiler/glsl/builtin_functions.cpp
@@ -522,21 +522,22 @@ supports_arb_fragment_shader_interlock(const 
_mesa_glsl_parse_state *state)
 static bool
 shader_clock(const _mesa_glsl_parse_state *state)
 {
return state->ARB_shader_clock_enable;
 }
 
 static bool
 shader_clock_int64(const _mesa_glsl_parse_state *state)
 {
return state->ARB_shader_clock_enable &&
-  state->ARB_gpu_shader_int64_enable;
+  (state->ARB_gpu_shader_int64_enable ||
+   state->AMD_gpu_shader_int64_enable);
 }
 
 static bool
 shader_storage_buffer_object(const _mesa_glsl_parse_state *state)
 {
return state->has_shader_storage_buffer_objects();
 }
 
 static bool
 shader_trinary_minmax(const _mesa_glsl_parse_state *state)
diff --git a/src/compiler/glsl/builtin_types.cpp 
b/src/compiler/glsl/builtin_types.cpp
index 7a01cb48bc8..d2bcdd68138 100644
--- a/src/compiler/glsl/builtin_types.cpp
+++ b/src/compiler/glsl/builtin_types.cpp
@@ -404,21 +404,22 @@ _mesa_glsl_initialize_types(struct _mesa_glsl_parse_state 
*state)
   add_type(symbols, glsl_type::dmat3_type);
   add_type(symbols, glsl_type::dmat4_type);
   add_type(symbols, glsl_type::dmat2x3_type);
   add_type(symbols, glsl_type::dmat2x4_type);
   add_type(symbols, glsl_type::dmat3x2_type);
   add_type(symbols, glsl_type::dmat3x4_type);
   add_type(symbols, glsl_type::dmat4x2_type);
   add_type(symbols, glsl_type::dmat4x3_type);
}
 
-   if (state->ARB_gpu_shader_int64_enable) {
+   if (state->ARB_gpu_shader_int64_enable ||
+   state->AMD_gpu_shader_int64_enable) {
   add_type(symbols, glsl_type::int64_t_type);
   add_type(symbols, glsl_type::i64vec2_type);
   add_type(symbols, glsl_type::i64vec3_type);
   add_type(symbols, glsl_type::i64vec4_type);
 
   add_type(symbols, glsl_type::uint64_t_type);
   add_type(symbols, glsl_type::u64vec2_type);
   add_type(symbols, glsl_type::u64vec3_type);
   add_type(symbols, glsl_type::u64vec4_type);
}
diff --git a/src/compiler/glsl/glsl_lexer.ll b/src/compiler/glsl/glsl_lexer.ll
index 87b64e09c16..74d4acca61f 100644
--- a/src/compiler/glsl/glsl_lexer.ll
+++ b/src/compiler/glsl/glsl_lexer.ll
@@ -656,29 +656,29 @@ isampler2DRectTYPE(140, 300, 140, 0, 
glsl_type::isampler2DRect_type);
 usampler2DRect TYPE(140, 300, 140, 0, glsl_type::usampler2DRect_type);
 isamplerBuffer TYPE_WITH_ALT(140, 300, 140, 320, 
yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable, 
glsl_type::isamplerBuffer_type);
 usamplerBuffer TYPE_WITH_ALT(140, 300, 140, 320, 
yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable, 
glsl_type::usamplerBuffer_type);
 
 /* Additional reserved words in GLSL ES 3.00 */
 resource   KEYWORD(420, 300, 0, 0, RESOURCE);
 sample KEYWORD_WITH_ALT(400, 300, 400, 320, 
yyextra->ARB_gpu_shader5_enable || 
yyextra->OES_shader_multisample_interpolation_enable, SAMPLE);
 subroutine KEYWORD_WITH_ALT(400, 300, 400, 0, 
yyextra->ARB_shader_subroutine_enable, SUBROUTINE);
 
 /* Additional words for ARB_gpu_shader_int64 */
-int64_tTYPE_WITH_ALT(0, 0, 0, 0, 
yyextra->ARB_gpu_shader_int64_enable, glsl_type::int64_t_type);
-i64vec2TYPE_WITH_ALT(0, 0, 0, 0, 
yyextra->ARB_gpu_shader_int64_enable, glsl_type::i64vec2_type);
-i64vec3TYPE_WITH_ALT(0, 0, 0, 0, 
yyextra->ARB_gpu_shader_int64_enable, glsl_type::i64vec3_type);
-i64vec4TYPE_WITH_ALT(0, 0, 0, 0, 
yyextra->ARB_gpu_shader_int64_enable, 

[Mesa-dev] [PATCH 5/8] mesa: expose AMD_texture_texture4

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

because the closed driver exposes it.
---
 docs/relnotes/18.3.0.html|  1 +
 src/compiler/glsl/builtin_functions.cpp  | 10 ++
 src/compiler/glsl/glsl_parser_extras.cpp |  1 +
 src/compiler/glsl/glsl_parser_extras.h   |  2 ++
 src/mesa/main/extensions_table.h |  1 +
 5 files changed, 15 insertions(+)

diff --git a/docs/relnotes/18.3.0.html b/docs/relnotes/18.3.0.html
index c0132311a25..8b067b55d3c 100644
--- a/docs/relnotes/18.3.0.html
+++ b/docs/relnotes/18.3.0.html
@@ -48,20 +48,21 @@ TBD.
 
 
 Note: some of the new features are only available with certain drivers.
 
 
 
 GL_AMD_framebuffer_multisample_advanced on radeonsi.
 GL_AMD_gpu_shader_int64 on i965, nvc0, radeonsi.
 GL_AMD_multi_draw_indirect on all GL 4.x drivers.
 GL_AMD_query_buffer_object on i965, nvc0, r600, radeonsi.
+GL_AMD_texture_texture4 on i965, nvc0, r600, radeonsi.
 GL_EXT_window_rectangles on radeonsi.
 
 
 Bug fixes
 
 
 TBD
 
 
 Changes
diff --git a/src/compiler/glsl/builtin_functions.cpp 
b/src/compiler/glsl/builtin_functions.cpp
index e37d96c4636..c778b65c6cd 100644
--- a/src/compiler/glsl/builtin_functions.cpp
+++ b/src/compiler/glsl/builtin_functions.cpp
@@ -411,20 +411,26 @@ texture_query_lod(const _mesa_glsl_parse_state *state)
 static bool
 texture_gather_cube_map_array(const _mesa_glsl_parse_state *state)
 {
return state->is_version(400, 320) ||
   state->ARB_texture_gather_enable ||
   state->ARB_gpu_shader5_enable ||
   state->EXT_texture_cube_map_array_enable ||
   state->OES_texture_cube_map_array_enable;
 }
 
+static bool
+texture_texture4(const _mesa_glsl_parse_state *state)
+{
+   return state->AMD_texture_texture4_enable;
+}
+
 static bool
 texture_gather_or_es31(const _mesa_glsl_parse_state *state)
 {
return state->is_version(400, 310) ||
   state->ARB_texture_gather_enable ||
   state->ARB_gpu_shader5_enable;
 }
 
 /* Only ARB_texture_gather but not GLSL 4.0 or ARB_gpu_shader5.
  * used for relaxation of const offset requirements.
@@ -2824,20 +2830,24 @@ builtin_builder::create_builtins()
 NULL);
 
add_function("shadow2DRectGradARB",
 _texture(ir_txd, shader_texture_lod_and_rect, 
glsl_type::vec4_type,  glsl_type::sampler2DRectShadow_type, 
glsl_type::vec3_type),
 NULL);
 
add_function("shadow2DRectProjGradARB",
 _texture(ir_txd, shader_texture_lod_and_rect, 
glsl_type::vec4_type,  glsl_type::sampler2DRectShadow_type, 
glsl_type::vec4_type, TEX_PROJECT),
 NULL);
 
+   add_function("texture4",
+_texture(ir_tg4, texture_texture4, glsl_type::vec4_type, 
glsl_type::sampler2D_type, glsl_type::vec2_type),
+NULL);
+
add_function("textureGather",
 _texture(ir_tg4, texture_gather_or_es31, glsl_type::vec4_type, 
glsl_type::sampler2D_type, glsl_type::vec2_type),
 _texture(ir_tg4, texture_gather_or_es31, 
glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec2_type),
 _texture(ir_tg4, texture_gather_or_es31, 
glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec2_type),
 
 _texture(ir_tg4, gpu_shader5, glsl_type::vec4_type, 
glsl_type::sampler2DRect_type, glsl_type::vec2_type),
 _texture(ir_tg4, gpu_shader5, glsl_type::ivec4_type, 
glsl_type::isampler2DRect_type, glsl_type::vec2_type),
 _texture(ir_tg4, gpu_shader5, glsl_type::uvec4_type, 
glsl_type::usampler2DRect_type, glsl_type::vec2_type),
 
 _texture(ir_tg4, texture_gather_or_es31, glsl_type::vec4_type, 
glsl_type::sampler2DArray_type, glsl_type::vec3_type),
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp 
b/src/compiler/glsl/glsl_parser_extras.cpp
index a455dde122a..9dbaef8f729 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -694,20 +694,21 @@ static const _mesa_glsl_extension 
_mesa_glsl_supported_extensions[] = {
EXT(OES_texture_cube_map_array),
EXT_AEP(OES_texture_storage_multisample_2d_array),
EXT(OES_viewport_array),
 
/* All other extensions go here, sorted alphabetically.
 */
EXT(AMD_conservative_depth),
EXT(AMD_gpu_shader_int64),
EXT(AMD_shader_stencil_export),
EXT(AMD_shader_trinary_minmax),
+   EXT(AMD_texture_texture4),
EXT(AMD_vertex_shader_layer),
EXT(AMD_vertex_shader_viewport_index),
EXT(ANDROID_extension_pack_es31a),
EXT(EXT_blend_func_extended),
EXT(EXT_frag_depth),
EXT(EXT_draw_buffers),
EXT(EXT_clip_cull_distance),
EXT(EXT_geometry_point_size),
EXT_AEP(EXT_geometry_shader),
EXT_AEP(EXT_gpu_shader5),
diff --git a/src/compiler/glsl/glsl_parser_extras.h 
b/src/compiler/glsl/glsl_parser_extras.h
index 81792de5704..71c21ced2bd 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -758,20 +758,22 @@ struct 

[Mesa-dev] [PATCH 1/8] mesa: expose ARB_post_depth_coverage in the Compatibility profile

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

It only contains GLSL changes.
---
 src/mesa/main/extensions_table.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index bdba49d5380..b4c1b203c57 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -92,21 +92,21 @@ EXT(ARB_multi_bind  , dummy_true
 EXT(ARB_multi_draw_indirect , ARB_draw_indirect
  , GLL, GLC,  x ,  x , 2012)
 EXT(ARB_multisample , dummy_true   
  , GLL,  x ,  x ,  x , 1994)
 EXT(ARB_multitexture, dummy_true   
  , GLL,  x ,  x ,  x , 1998)
 EXT(ARB_occlusion_query , ARB_occlusion_query  
  , GLL,  x ,  x ,  x , 2001)
 EXT(ARB_occlusion_query2, ARB_occlusion_query2 
  , GLL, GLC,  x ,  x , 2003)
 EXT(ARB_pipeline_statistics_query   , ARB_pipeline_statistics_query
  , GLL, GLC,  x ,  x , 2014)
 EXT(ARB_pixel_buffer_object , EXT_pixel_buffer_object  
  , GLL, GLC,  x ,  x , 2004)
 EXT(ARB_point_parameters, EXT_point_parameters 
  , GLL,  x ,  x ,  x , 1997)
 EXT(ARB_point_sprite, ARB_point_sprite 
  , GLL, GLC,  x ,  x , 2003)
 EXT(ARB_polygon_offset_clamp, ARB_polygon_offset_clamp 
  , GLL, GLC,  x ,  x , 2017)
-EXT(ARB_post_depth_coverage , ARB_post_depth_coverage  
  ,  x , GLC,  x ,  x,  2015)
+EXT(ARB_post_depth_coverage , ARB_post_depth_coverage  
  , GLL, GLC,  x ,  x,  2015)
 EXT(ARB_program_interface_query , dummy_true   
  , GLL, GLC,  x ,  x , 2012)
 EXT(ARB_provoking_vertex, EXT_provoking_vertex 
  , GLL, GLC,  x ,  x , 2009)
 EXT(ARB_query_buffer_object , ARB_query_buffer_object  
  , GLL, GLC,  x ,  x , 2013)
 EXT(ARB_robust_buffer_access_behavior   , 
ARB_robust_buffer_access_behavior  , GLL, GLC,  x ,  x , 2012)
 EXT(ARB_robustness  , dummy_true   
  , GLL, GLC,  x ,  x , 2010)
 EXT(ARB_sample_locations, ARB_sample_locations 
  , GLL, GLC,  x ,  x , 2015)
 EXT(ARB_sample_shading  , ARB_sample_shading   
  , GLL, GLC,  x ,  x , 2009)
 EXT(ARB_sampler_objects , dummy_true   
  , GLL, GLC,  x ,  x , 2009)
 EXT(ARB_seamless_cube_map   , ARB_seamless_cube_map
  , GLL, GLC,  x ,  x , 2009)
 EXT(ARB_seamless_cubemap_per_texture, AMD_seamless_cubemap_per_texture 
  , GLL, GLC,  x ,  x , 2013)
-- 
2.17.1

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


[Mesa-dev] [PATCH 3/8] mesa: expose AMD_multi_draw_indirect

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

because the closed driver exposes it.
This is equivalent to the ARB extension.
---
 docs/relnotes/18.3.0.html|  1 +
 src/mapi/glapi/gen/ARB_draw_indirect.xml | 20 
 src/mesa/main/extensions_table.h |  1 +
 3 files changed, 22 insertions(+)

diff --git a/docs/relnotes/18.3.0.html b/docs/relnotes/18.3.0.html
index 840a336d41a..cf3bb80ceae 100644
--- a/docs/relnotes/18.3.0.html
+++ b/docs/relnotes/18.3.0.html
@@ -46,20 +46,21 @@ TBD.
 
 New features
 
 
 Note: some of the new features are only available with certain drivers.
 
 
 
 GL_AMD_framebuffer_multisample_advanced on radeonsi.
 GL_AMD_gpu_shader_int64 on i965, nvc0, radeonsi.
+GL_AMD_multi_draw_indirect on all GL 4.x drivers.
 GL_EXT_window_rectangles on radeonsi.
 
 
 Bug fixes
 
 
 TBD
 
 
 Changes
diff --git a/src/mapi/glapi/gen/ARB_draw_indirect.xml 
b/src/mapi/glapi/gen/ARB_draw_indirect.xml
index 3b29d6b8674..b4399f1e8b6 100644
--- a/src/mapi/glapi/gen/ARB_draw_indirect.xml
+++ b/src/mapi/glapi/gen/ARB_draw_indirect.xml
@@ -35,11 +35,31 @@
 
 
 
 
 
 
 
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index 326fa6dc473..cc996d5d254 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -5,20 +5,21 @@
 #define ES1 0
 #define ES2 0
 #define  x ~0
 
 EXT(3DFX_texture_compression_FXT1   , TDFX_texture_compression_FXT1
  , GLL, GLC,  x ,  x , 1999)
 
 EXT(AMD_conservative_depth  , ARB_conservative_depth   
  , GLL, GLC,  x ,  x , 2009)
 EXT(AMD_draw_buffers_blend  , ARB_draw_buffers_blend   
  , GLL, GLC,  x ,  x , 2009)
 EXT(AMD_framebuffer_multisample_advanced, 
AMD_framebuffer_multisample_advanced   , GLL, GLC,  x , ES2, 2018)
 EXT(AMD_gpu_shader_int64, ARB_gpu_shader_int64 
  ,  x , GLC,  x ,  x , 2015)
+EXT(AMD_multi_draw_indirect , ARB_draw_indirect
  , GLL, GLC,  x ,  x , 2011)
 EXT(AMD_performance_monitor , AMD_performance_monitor  
  , GLL, GLC,  x , ES2, 2007)
 EXT(AMD_pinned_memory   , AMD_pinned_memory
  , GLL, GLC,  x ,  x , 2013)
 EXT(AMD_seamless_cubemap_per_texture, AMD_seamless_cubemap_per_texture 
  , GLL, GLC,  x ,  x , 2009)
 EXT(AMD_shader_stencil_export   , ARB_shader_stencil_export
  , GLL, GLC,  x ,  x , 2009)
 EXT(AMD_shader_trinary_minmax   , dummy_true   
  , GLL, GLC,  x ,  x , 2012)
 EXT(AMD_vertex_shader_layer , AMD_vertex_shader_layer  
  , GLL, GLC,  x ,  x , 2012)
 EXT(AMD_vertex_shader_viewport_index, AMD_vertex_shader_viewport_index 
  , GLL, GLC,  x ,  x , 2012)
 
 EXT(ANDROID_extension_pack_es31a, ANDROID_extension_pack_es31a 
  ,  x ,  x ,  x ,  31, 2014)
 
-- 
2.17.1

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


[Mesa-dev] [PATCH 6/8] mesa: expose EXT_vertex_attrib_64bit

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

because the closed driver exposes it.
It's the same as the ARB extension.
---
 docs/relnotes/18.3.0.html |  1 +
 .../glapi/gen/EXT_vertex_attrib_64bit.xml | 70 +++
 src/mapi/glapi/gen/gl_API.xml |  2 +
 src/mesa/main/extensions_table.h  |  1 +
 4 files changed, 74 insertions(+)
 create mode 100644 src/mapi/glapi/gen/EXT_vertex_attrib_64bit.xml

diff --git a/docs/relnotes/18.3.0.html b/docs/relnotes/18.3.0.html
index 8b067b55d3c..3d6081708b5 100644
--- a/docs/relnotes/18.3.0.html
+++ b/docs/relnotes/18.3.0.html
@@ -49,20 +49,21 @@ TBD.
 
 Note: some of the new features are only available with certain drivers.
 
 
 
 GL_AMD_framebuffer_multisample_advanced on radeonsi.
 GL_AMD_gpu_shader_int64 on i965, nvc0, radeonsi.
 GL_AMD_multi_draw_indirect on all GL 4.x drivers.
 GL_AMD_query_buffer_object on i965, nvc0, r600, radeonsi.
 GL_AMD_texture_texture4 on i965, nvc0, r600, radeonsi.
+GL_EXT_vertex_attrib_64bit on i965, nvc0, radeonsi.
 GL_EXT_window_rectangles on radeonsi.
 
 
 Bug fixes
 
 
 TBD
 
 
 Changes
diff --git a/src/mapi/glapi/gen/EXT_vertex_attrib_64bit.xml 
b/src/mapi/glapi/gen/EXT_vertex_attrib_64bit.xml
new file mode 100644
index 000..6b63b122fc1
--- /dev/null
+++ b/src/mapi/glapi/gen/EXT_vertex_attrib_64bit.xml
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index a45fdc5ed98..41454b212df 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -12932,20 +12932,22 @@
 
 
 
 
 
 
 
 http://www.w3.org/2001/XInclude"/>
 
+http://www.w3.org/2001/XInclude"/>
+
 
 
 
 
 
 
 
 
 
 
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index 629a42f64e0..de1e796bc5d 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -297,20 +297,21 @@ EXT(EXT_texture_sRGB, 
EXT_texture_sRGB
 EXT(EXT_texture_sRGB_decode , EXT_texture_sRGB_decode  
  , GLL, GLC,  x ,  30, 2006)
 EXT(EXT_texture_shared_exponent , EXT_texture_shared_exponent  
  , GLL, GLC,  x ,  x , 2004)
 EXT(EXT_texture_snorm   , EXT_texture_snorm
  , GLL, GLC,  x ,  x , 2009)
 EXT(EXT_texture_swizzle , EXT_texture_swizzle  
  , GLL, GLC,  x ,  x , 2008)
 EXT(EXT_texture_type_2_10_10_10_REV , EXT_texture_type_2_10_10_10_REV  
  ,  x ,  x ,  x , ES2, 2008)
 EXT(EXT_timer_query , EXT_timer_query  
  , GLL, GLC,  x ,  x , 2006)
 EXT(EXT_transform_feedback  , EXT_transform_feedback   
  , GLL, GLC,  x ,  x , 2011)
 EXT(EXT_unpack_subimage , dummy_true   
  ,  x ,  x ,  x , ES2, 2011)
 EXT(EXT_vertex_array, dummy_true   
  , GLL,  x ,  x ,  x , 1995)
 EXT(EXT_vertex_array_bgra   , EXT_vertex_array_bgra
  , GLL, GLC,  x ,  x , 2008)
+EXT(EXT_vertex_attrib_64bit , ARB_vertex_attrib_64bit  
  ,  32, GLC,  x ,  x , 2010)
 EXT(EXT_window_rectangles   , EXT_window_rectangles
  , GLL, GLC,  x ,  30, 2016)
 
 EXT(GREMEDY_string_marker   , GREMEDY_string_marker
  , GLL, GLC,  x ,  x , 2007)
 
 EXT(IBM_multimode_draw_arrays   , dummy_true   
  , GLL, GLC,  x ,  x , 1998)
 EXT(IBM_rasterpos_clip  , dummy_true   
  , GLL,  x ,  x ,  x , 1996)
 EXT(IBM_texture_mirrored_repeat , dummy_true   
  , GLL,  x ,  x ,  x , 1998)
 
 EXT(INGR_blend_func_separate, EXT_blend_func_separate  
  , GLL,  x ,  x ,  x , 1999)
 
-- 
2.17.1

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


[Mesa-dev] [PATCH 4/8] mesa: expose AMD_query_buffer_object

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

it's a subset of the ARB extension.
---
 docs/relnotes/18.3.0.html| 1 +
 src/mesa/main/extensions_table.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/docs/relnotes/18.3.0.html b/docs/relnotes/18.3.0.html
index cf3bb80ceae..c0132311a25 100644
--- a/docs/relnotes/18.3.0.html
+++ b/docs/relnotes/18.3.0.html
@@ -47,20 +47,21 @@ TBD.
 New features
 
 
 Note: some of the new features are only available with certain drivers.
 
 
 
 GL_AMD_framebuffer_multisample_advanced on radeonsi.
 GL_AMD_gpu_shader_int64 on i965, nvc0, radeonsi.
 GL_AMD_multi_draw_indirect on all GL 4.x drivers.
+GL_AMD_query_buffer_object on i965, nvc0, r600, radeonsi.
 GL_EXT_window_rectangles on radeonsi.
 
 
 Bug fixes
 
 
 TBD
 
 
 Changes
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index cc996d5d254..34d7fa96bae 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -8,20 +8,21 @@
 
 EXT(3DFX_texture_compression_FXT1   , TDFX_texture_compression_FXT1
  , GLL, GLC,  x ,  x , 1999)
 
 EXT(AMD_conservative_depth  , ARB_conservative_depth   
  , GLL, GLC,  x ,  x , 2009)
 EXT(AMD_draw_buffers_blend  , ARB_draw_buffers_blend   
  , GLL, GLC,  x ,  x , 2009)
 EXT(AMD_framebuffer_multisample_advanced, 
AMD_framebuffer_multisample_advanced   , GLL, GLC,  x , ES2, 2018)
 EXT(AMD_gpu_shader_int64, ARB_gpu_shader_int64 
  ,  x , GLC,  x ,  x , 2015)
 EXT(AMD_multi_draw_indirect , ARB_draw_indirect
  , GLL, GLC,  x ,  x , 2011)
 EXT(AMD_performance_monitor , AMD_performance_monitor  
  , GLL, GLC,  x , ES2, 2007)
 EXT(AMD_pinned_memory   , AMD_pinned_memory
  , GLL, GLC,  x ,  x , 2013)
+EXT(AMD_query_buffer_object , ARB_query_buffer_object  
  , GLL, GLC,  x ,  x , 2012)
 EXT(AMD_seamless_cubemap_per_texture, AMD_seamless_cubemap_per_texture 
  , GLL, GLC,  x ,  x , 2009)
 EXT(AMD_shader_stencil_export   , ARB_shader_stencil_export
  , GLL, GLC,  x ,  x , 2009)
 EXT(AMD_shader_trinary_minmax   , dummy_true   
  , GLL, GLC,  x ,  x , 2012)
 EXT(AMD_vertex_shader_layer , AMD_vertex_shader_layer  
  , GLL, GLC,  x ,  x , 2012)
 EXT(AMD_vertex_shader_viewport_index, AMD_vertex_shader_viewport_index 
  , GLL, GLC,  x ,  x , 2012)
 
 EXT(ANDROID_extension_pack_es31a, ANDROID_extension_pack_es31a 
  ,  x ,  x ,  x ,  31, 2014)
 
 EXT(ANGLE_texture_compression_dxt3  , ANGLE_texture_compression_dxt
  , GLL, GLC, ES1, ES2, 2011)
 EXT(ANGLE_texture_compression_dxt5  , ANGLE_texture_compression_dxt
  , GLL, GLC, ES1, ES2, 2011)
-- 
2.17.1

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


[Mesa-dev] [PATCH 0/8] Easy OpenGL extensions

2018-08-08 Thread Marek Olšák
Hi,

This series adds these extensions:
- AMD_gpu_shader_int64
- AMD_multi_draw_indirect
- AMD_query_buffer_object
- AMD_texture_texture4
- EXT_vertex_attrib_64bit

It also exposes these extensions for gallium (radeonsi):
- EXT_disjoint_timer_query
- KHR_texture_compression_astc_sliced_3d

It also allows this in the Compatibility profile:
- ARB_post_depth_coverage (not supported by radeonsi)

Please review.

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


[Mesa-dev] [PATCH 8/8] st/mesa: expose KHR_texture_compression_astc_sliced_3d

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

This is ASTC 2D LDR allowing texture arrays and 3D, compressing each
slice as a separate 2D image. Tested by piglit. Trivial.
---
 docs/features.txt  | 2 +-
 docs/relnotes/18.3.0.html  | 1 +
 src/mesa/state_tracker/st_extensions.c | 6 --
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/docs/features.txt b/docs/features.txt
index 37614470a14..dead4815cf3 100644
--- a/docs/features.txt
+++ b/docs/features.txt
@@ -318,21 +318,21 @@ Khronos, ARB, and OES extensions that are not part of any 
OpenGL or OpenGL ES ve
   GL_ARB_texture_filter_minmax  not started
   GL_EXT_memory_object  DONE (radeonsi)
   GL_EXT_memory_object_fd   DONE (radeonsi)
   GL_EXT_memory_object_win32not started
   GL_EXT_semaphore  DONE (radeonsi)
   GL_EXT_semaphore_fd   DONE (radeonsi)
   GL_EXT_semaphore_win32not started
   GL_EXT_texture_norm16 DONE (i965, r600, 
radeonsi, nvc0)
   GL_KHR_blend_equation_advanced_coherent   DONE (i965/gen9+)
   GL_KHR_texture_compression_astc_hdr   DONE (i965/bxt)
-  GL_KHR_texture_compression_astc_sliced_3d DONE (i965/gen9+)
+  GL_KHR_texture_compression_astc_sliced_3d DONE (i965/gen9+, 
radeonsi)
   GL_OES_depth_texture_cube_map DONE (all drivers that 
support GLSL 1.30+)
   GL_OES_EGL_image  DONE (all drivers)
   GL_OES_EGL_image_external DONE (all drivers)
   GL_OES_EGL_image_external_essl3   DONE (all drivers)
   GL_OES_required_internalformatDONE (all drivers)
   GL_OES_surfaceless_contextDONE (all drivers)
   GL_OES_texture_compression_astc   DONE (core only)
   GL_OES_texture_float  DONE (freedreno, i965, 
r300, r600, radeonsi, nv30, nv50, nvc0, softpipe, llvmpipe)
   GL_OES_texture_float_linear   DONE (freedreno, i965, 
r300, r600, radeonsi, nv30, nv50, nvc0, softpipe, llvmpipe)
   GL_OES_texture_half_float DONE (freedreno, i965, 
r300, r600, radeonsi, nv30, nv50, nvc0, softpipe, llvmpipe)
diff --git a/docs/relnotes/18.3.0.html b/docs/relnotes/18.3.0.html
index 5930515898a..5400b13f850 100644
--- a/docs/relnotes/18.3.0.html
+++ b/docs/relnotes/18.3.0.html
@@ -52,20 +52,21 @@ Note: some of the new features are only available with 
certain drivers.
 
 
 GL_AMD_framebuffer_multisample_advanced on radeonsi.
 GL_AMD_gpu_shader_int64 on i965, nvc0, radeonsi.
 GL_AMD_multi_draw_indirect on all GL 4.x drivers.
 GL_AMD_query_buffer_object on i965, nvc0, r600, radeonsi.
 GL_AMD_texture_texture4 on i965, nvc0, r600, radeonsi.
 GL_EXT_disjoint_timer_query on radeonsi and most other Gallium drivers (ES 
extension)
 GL_EXT_vertex_attrib_64bit on i965, nvc0, radeonsi.
 GL_EXT_window_rectangles on radeonsi.
+GL_KHR_texture_compression_astc_sliced_3d on radeonsi.
 
 
 Bug fixes
 
 
 TBD
 
 
 Changes
 
diff --git a/src/mesa/state_tracker/st_extensions.c 
b/src/mesa/state_tracker/st_extensions.c
index 55b19d6e1fb..cfee4817969 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -787,21 +787,22 @@ void st_init_extensions(struct pipe_screen *screen,
   PIPE_FORMAT_DXT1_RGBA,
   PIPE_FORMAT_DXT3_RGBA,
   PIPE_FORMAT_DXT5_RGBA } },
 
   { { o(ARB_texture_compression_bptc) },
 { PIPE_FORMAT_BPTC_RGBA_UNORM,
   PIPE_FORMAT_BPTC_SRGBA,
   PIPE_FORMAT_BPTC_RGB_FLOAT,
   PIPE_FORMAT_BPTC_RGB_UFLOAT } },
 
-  { { o(KHR_texture_compression_astc_ldr) },
+  { { o(KHR_texture_compression_astc_ldr),
+  o(KHR_texture_compression_astc_sliced_3d) },
 { PIPE_FORMAT_ASTC_4x4,
   PIPE_FORMAT_ASTC_5x4,
   PIPE_FORMAT_ASTC_5x5,
   PIPE_FORMAT_ASTC_6x5,
   PIPE_FORMAT_ASTC_6x6,
   PIPE_FORMAT_ASTC_8x5,
   PIPE_FORMAT_ASTC_8x6,
   PIPE_FORMAT_ASTC_8x8,
   PIPE_FORMAT_ASTC_10x5,
   PIPE_FORMAT_ASTC_10x6,
@@ -818,21 +819,22 @@ void st_init_extensions(struct pipe_screen *screen,
   PIPE_FORMAT_ASTC_8x6_SRGB,
   PIPE_FORMAT_ASTC_8x8_SRGB,
   PIPE_FORMAT_ASTC_10x5_SRGB,
   PIPE_FORMAT_ASTC_10x6_SRGB,
   PIPE_FORMAT_ASTC_10x8_SRGB,
   PIPE_FORMAT_ASTC_10x10_SRGB,
   PIPE_FORMAT_ASTC_12x10_SRGB,
   PIPE_FORMAT_ASTC_12x12_SRGB } },
 
   /* ASTC software fallback support. */
-  { { o(KHR_texture_compression_astc_ldr) },
+  { { o(KHR_texture_compression_astc_ldr),
+  o(KHR_texture_compression_astc_sliced_3d) },
 { 

[Mesa-dev] [PATCH 7/8] st/mesa: expose EXT_disjoint_timer_query

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

same cap as ARB_timer_query, no changes needed, tested by piglit
---
 docs/relnotes/18.3.0.html  | 1 +
 src/mesa/state_tracker/st_extensions.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/docs/relnotes/18.3.0.html b/docs/relnotes/18.3.0.html
index 3d6081708b5..5930515898a 100644
--- a/docs/relnotes/18.3.0.html
+++ b/docs/relnotes/18.3.0.html
@@ -49,20 +49,21 @@ TBD.
 
 Note: some of the new features are only available with certain drivers.
 
 
 
 GL_AMD_framebuffer_multisample_advanced on radeonsi.
 GL_AMD_gpu_shader_int64 on i965, nvc0, radeonsi.
 GL_AMD_multi_draw_indirect on all GL 4.x drivers.
 GL_AMD_query_buffer_object on i965, nvc0, r600, radeonsi.
 GL_AMD_texture_texture4 on i965, nvc0, r600, radeonsi.
+GL_EXT_disjoint_timer_query on radeonsi and most other Gallium drivers (ES 
extension)
 GL_EXT_vertex_attrib_64bit on i965, nvc0, radeonsi.
 GL_EXT_window_rectangles on radeonsi.
 
 
 Bug fixes
 
 
 TBD
 
 
diff --git a/src/mesa/state_tracker/st_extensions.c 
b/src/mesa/state_tracker/st_extensions.c
index 1c01495e937..55b19d6e1fb 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -686,20 +686,21 @@ void st_init_extensions(struct pipe_screen *screen,
   { o(ARB_texture_view), PIPE_CAP_SAMPLER_VIEW_TARGET  
},
   { o(ARB_timer_query),  PIPE_CAP_QUERY_TIMESTAMP  
},
   { o(ARB_transform_feedback2),  
PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME   },
   { o(ARB_transform_feedback3),  
PIPE_CAP_STREAM_OUTPUT_INTERLEAVE_BUFFERS },
   { o(ARB_transform_feedback_overflow_query), PIPE_CAP_QUERY_SO_OVERFLOW   
},
 
   { o(KHR_blend_equation_advanced),  PIPE_CAP_TGSI_FS_FBFETCH  
},
 
   { o(EXT_blend_equation_separate),  PIPE_CAP_BLEND_EQUATION_SEPARATE  
},
   { o(EXT_depth_bounds_test),PIPE_CAP_DEPTH_BOUNDS_TEST
},
+  { o(EXT_disjoint_timer_query), PIPE_CAP_QUERY_TIMESTAMP  
},
   { o(EXT_draw_buffers2),PIPE_CAP_INDEP_BLEND_ENABLE   
},
   { o(EXT_memory_object),PIPE_CAP_MEMOBJ   
},
   { o(EXT_memory_object_fd), PIPE_CAP_MEMOBJ   
},
   { o(EXT_semaphore),PIPE_CAP_FENCE_SIGNAL 
},
   { o(EXT_semaphore_fd), PIPE_CAP_FENCE_SIGNAL 
},
   { o(EXT_texture_array),PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS 
},
   { o(EXT_texture_filter_anisotropic),   PIPE_CAP_ANISOTROPIC_FILTER   
},
   { o(EXT_texture_mirror_clamp), PIPE_CAP_TEXTURE_MIRROR_CLAMP 
},
   { o(EXT_texture_swizzle),  PIPE_CAP_TEXTURE_SWIZZLE  
},
   { o(EXT_transform_feedback),   
PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS},
-- 
2.17.1

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


[Mesa-dev] [PATCH 4/4] radeonsi: implement EXT_window_rectangles

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

---
 docs/relnotes/18.3.0.html |  1 +
 src/amd/common/sid.h  | 16 
 src/gallium/drivers/radeonsi/si_blit.c|  4 +
 src/gallium/drivers/radeonsi/si_get.c |  2 +-
 src/gallium/drivers/radeonsi/si_gfx_cs.c  |  4 +
 src/gallium/drivers/radeonsi/si_pipe.h|  3 +
 src/gallium/drivers/radeonsi/si_state.c   |  1 -
 src/gallium/drivers/radeonsi/si_state.h   |  3 +
 .../drivers/radeonsi/si_state_viewport.c  | 80 +++
 9 files changed, 112 insertions(+), 2 deletions(-)

diff --git a/docs/relnotes/18.3.0.html b/docs/relnotes/18.3.0.html
index 786145ad8da..ac2cc1e893b 100644
--- a/docs/relnotes/18.3.0.html
+++ b/docs/relnotes/18.3.0.html
@@ -45,20 +45,21 @@ TBD.
 
 
 New features
 
 
 Note: some of the new features are only available with certain drivers.
 
 
 
 GL_AMD_framebuffer_multisample_advanced on radeonsi.
+GL_EXT_window_rectangles on radeonsi.
 
 
 Bug fixes
 
 
 TBD
 
 
 Changes
 
diff --git a/src/amd/common/sid.h b/src/amd/common/sid.h
index 3c3bc541b4f..0671f7d3998 100644
--- a/src/amd/common/sid.h
+++ b/src/amd/common/sid.h
@@ -5275,20 +5275,36 @@
 #define   S_028208_BR_X(x)
(((unsigned)(x) & 0x7FFF) << 0)
 #define   G_028208_BR_X(x)(((x) >> 
0) & 0x7FFF)
 #define   C_028208_BR_X   
0x8000
 #define   S_028208_BR_Y(x)
(((unsigned)(x) & 0x7FFF) << 16)
 #define   G_028208_BR_Y(x)(((x) >> 
16) & 0x7FFF)
 #define   C_028208_BR_Y   
0x8000
 #define R_02820C_PA_SC_CLIPRECT_RULE
0x02820C
 #define   S_02820C_CLIP_RULE(x)   
(((unsigned)(x) & 0x) << 0)
 #define   G_02820C_CLIP_RULE(x)   (((x) >> 
0) & 0x)
 #define   C_02820C_CLIP_RULE  
0x
+#define V_02820C_OUT0x0001
+#define V_02820C_IN_0   0x0002
+#define V_02820C_IN_1   0x0004
+#define V_02820C_IN_10  0x0008
+#define V_02820C_IN_2   0x0010
+#define V_02820C_IN_20  0x0020
+#define V_02820C_IN_21  0x0040
+#define V_02820C_IN_210 0x0080
+#define V_02820C_IN_3   0x0100
+#define V_02820C_IN_30  0x0200
+#define V_02820C_IN_31  0x0400
+#define V_02820C_IN_310 0x0800
+#define V_02820C_IN_32  0x1000
+#define V_02820C_IN_320 0x2000
+#define V_02820C_IN_321 0x4000
+#define V_02820C_IN_32100x8000
 #define R_028210_PA_SC_CLIPRECT_0_TL
0x028210
 #define   S_028210_TL_X(x)
(((unsigned)(x) & 0x7FFF) << 0)
 #define   G_028210_TL_X(x)(((x) >> 
0) & 0x7FFF)
 #define   C_028210_TL_X   
0x8000
 #define   S_028210_TL_Y(x)
(((unsigned)(x) & 0x7FFF) << 16)
 #define   G_028210_TL_Y(x)(((x) >> 
16) & 0x7FFF)
 #define   C_028210_TL_Y   
0x8000
 #define R_028214_PA_SC_CLIPRECT_0_BR
0x028214
 #define   S_028214_BR_X(x)
(((unsigned)(x) & 0x7FFF) << 0)
 #define   G_028214_BR_X(x)(((x) >> 
0) & 0x7FFF)
diff --git a/src/gallium/drivers/radeonsi/si_blit.c 
b/src/gallium/drivers/radeonsi/si_blit.c
index 0fd69f3a6c5..cf6495291bd 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -52,20 +52,24 @@ void si_blitter_begin(struct si_context *sctx, enum 
si_blitter_op op)
 (struct 
pipe_stream_output_target**)sctx->streamout.targets);
util_blitter_save_rasterizer(sctx->blitter, 
sctx->queued.named.rasterizer);
 
if (op & SI_SAVE_FRAGMENT_STATE) {
util_blitter_save_blend(sctx->blitter, 
sctx->queued.named.blend);
util_blitter_save_depth_stencil_alpha(sctx->blitter, 
sctx->queued.named.dsa);

[Mesa-dev] [PATCH 2/4] noop: implement set_window_rectangles

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

---
 src/gallium/auxiliary/driver_noop/noop_state.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/src/gallium/auxiliary/driver_noop/noop_state.c 
b/src/gallium/auxiliary/driver_noop/noop_state.c
index 80cfae8ad49..11e2c173a37 100644
--- a/src/gallium/auxiliary/driver_noop/noop_state.c
+++ b/src/gallium/auxiliary/driver_noop/noop_state.c
@@ -240,20 +240,27 @@ static void noop_stream_output_target_destroy(struct 
pipe_context *ctx,
FREE(t);
 }
 
 static void noop_set_stream_output_targets(struct pipe_context *ctx,
unsigned num_targets,
struct pipe_stream_output_target 
**targets,
const unsigned *offsets)
 {
 }
 
+static void noop_set_window_rectangles(struct pipe_context *ctx,
+   boolean include,
+   unsigned num_rectangles,
+   const struct pipe_scissor_state *rects)
+{
+}
+
 void noop_init_state_functions(struct pipe_context *ctx);
 
 void noop_init_state_functions(struct pipe_context *ctx)
 {
ctx->create_blend_state = noop_create_blend_state;
ctx->create_depth_stencil_alpha_state = noop_create_dsa_state;
ctx->create_fs_state = noop_create_shader_state;
ctx->create_rasterizer_state = noop_create_rs_state;
ctx->create_sampler_state = noop_create_sampler_state;
ctx->create_sampler_view = noop_create_sampler_view;
@@ -290,18 +297,19 @@ void noop_init_state_functions(struct pipe_context *ctx)
ctx->set_clip_state = noop_set_clip_state;
ctx->set_constant_buffer = noop_set_constant_buffer;
ctx->set_sampler_views = noop_set_sampler_views;
ctx->set_framebuffer_state = noop_set_framebuffer_state;
ctx->set_polygon_stipple = noop_set_polygon_stipple;
ctx->set_sample_mask = noop_set_sample_mask;
ctx->set_scissor_states = noop_set_scissor_states;
ctx->set_stencil_ref = noop_set_stencil_ref;
ctx->set_vertex_buffers = noop_set_vertex_buffers;
ctx->set_viewport_states = noop_set_viewport_states;
+   ctx->set_window_rectangles = noop_set_window_rectangles;
ctx->sampler_view_destroy = noop_sampler_view_destroy;
ctx->surface_destroy = noop_surface_destroy;
ctx->draw_vbo = noop_draw_vbo;
ctx->launch_grid = noop_launch_grid;
ctx->create_stream_output_target = noop_create_stream_output_target;
ctx->stream_output_target_destroy = noop_stream_output_target_destroy;
ctx->set_stream_output_targets = noop_set_stream_output_targets;
 }
-- 
2.17.1

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


[Mesa-dev] [PATCH 3/4] gallium/u_blitter: save/restore window rectangles

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

---
 src/gallium/auxiliary/util/u_blitter.c | 10 ++
 src/gallium/auxiliary/util/u_blitter.h | 19 +++
 2 files changed, 29 insertions(+)

diff --git a/src/gallium/auxiliary/util/u_blitter.c 
b/src/gallium/auxiliary/util/u_blitter.c
index a9df71108b4..fc86fa367c6 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -650,20 +650,27 @@ void util_blitter_restore_fragment_states(struct 
blitter_context *blitter)
   ctx->base.is_sample_mask_saved = false;
}
 
/* Miscellaneous states. */
/* XXX check whether these are saved and whether they need to be restored
 * (depending on the operation) */
pipe->set_stencil_ref(pipe, >base.saved_stencil_ref);
 
if (!blitter->skip_viewport_restore)
   pipe->set_viewport_states(pipe, 0, 1, >base.saved_viewport);
+
+   if (blitter->saved_num_window_rectangles) {
+  pipe->set_window_rectangles(pipe,
+  blitter->saved_window_rectangles_include,
+  blitter->saved_num_window_rectangles,
+  blitter->saved_window_rectangles);
+   }
 }
 
 static void blitter_check_saved_fb_state(MAYBE_UNUSED struct 
blitter_context_priv *ctx)
 {
assert(ctx->base.saved_fb_state.nr_cbufs != (ubyte) ~0);
 }
 
 static void blitter_disable_render_cond(struct blitter_context_priv *ctx)
 {
struct pipe_context *pipe = ctx->base.pipe;
@@ -1217,20 +1224,23 @@ void util_blitter_cache_all_shaders(struct 
blitter_context *blitter)
 TGSI_INTERPOLATE_CONSTANT, true);
 
ctx->cached_all_shaders = true;
 }
 
 static void blitter_set_common_draw_rect_state(struct blitter_context_priv 
*ctx,
bool scissor)
 {
struct pipe_context *pipe = ctx->base.pipe;
 
+   if (ctx->base.saved_num_window_rectangles)
+  pipe->set_window_rectangles(pipe, false, 0, NULL);
+
pipe->bind_rasterizer_state(pipe, scissor ? ctx->rs_state_scissor
  : ctx->rs_state);
if (ctx->has_geometry_shader)
   pipe->bind_gs_state(pipe, NULL);
if (ctx->has_tessellation) {
   pipe->bind_tcs_state(pipe, NULL);
   pipe->bind_tes_state(pipe, NULL);
}
if (ctx->has_stream_out)
   pipe->set_stream_output_targets(pipe, 0, NULL, NULL);
diff --git a/src/gallium/auxiliary/util/u_blitter.h 
b/src/gallium/auxiliary/util/u_blitter.h
index 9ea1dc9b6b2..c1f1ae47443 100644
--- a/src/gallium/auxiliary/util/u_blitter.h
+++ b/src/gallium/auxiliary/util/u_blitter.h
@@ -130,20 +130,24 @@ struct blitter_context
 
unsigned vb_slot;
struct pipe_vertex_buffer saved_vertex_buffer;
 
unsigned saved_num_so_targets;
struct pipe_stream_output_target *saved_so_targets[PIPE_MAX_SO_BUFFERS];
 
struct pipe_query *saved_render_cond_query;
uint saved_render_cond_mode;
bool saved_render_cond_cond;
+
+   boolean saved_window_rectangles_include;
+   unsigned saved_num_window_rectangles;
+   struct pipe_scissor_state 
saved_window_rectangles[PIPE_MAX_WINDOW_RECTANGLES];
 };
 
 /**
  * Create a blitter context.
  */
 struct blitter_context *util_blitter_create(struct pipe_context *pipe);
 
 /**
  * Destroy a blitter context.
  */
@@ -556,20 +560,35 @@ static inline void
 util_blitter_save_render_condition(struct blitter_context *blitter,
struct pipe_query *query,
bool condition,
enum pipe_render_cond_flag mode)
 {
blitter->saved_render_cond_query = query;
blitter->saved_render_cond_mode = mode;
blitter->saved_render_cond_cond = condition;
 }
 
+static inline void
+util_blitter_save_window_rectangles(struct blitter_context *blitter,
+boolean include,
+unsigned num_rectangles,
+const struct pipe_scissor_state *rects)
+{
+   blitter->saved_window_rectangles_include = include;
+   blitter->saved_num_window_rectangles = num_rectangles;
+   if (num_rectangles > 0) {
+  assert(num_rectangles < ARRAY_SIZE(blitter->saved_window_rectangles));
+  memcpy(blitter->saved_window_rectangles, rects,
+ sizeof(*rects) * num_rectangles);
+   }
+}
+
 void util_blitter_common_clear_setup(struct blitter_context *blitter,
  unsigned width, unsigned height,
  unsigned clear_buffers,
  void *custom_blend, void *custom_dsa);
 
 void util_blitter_set_running_flag(struct blitter_context *blitter);
 void util_blitter_unset_running_flag(struct blitter_context *blitter);
 
 void util_blitter_restore_vertex_states(struct blitter_context *blitter);
 void util_blitter_restore_fragment_states(struct blitter_context *blitter);
-- 
2.17.1


[Mesa-dev] [PATCH 1/4] ddebug: implement set_window_rectangles

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

---
 src/gallium/auxiliary/driver_ddebug/dd_context.c | 12 
 1 file changed, 12 insertions(+)

diff --git a/src/gallium/auxiliary/driver_ddebug/dd_context.c 
b/src/gallium/auxiliary/driver_ddebug/dd_context.c
index dd7b3e086cd..a1b6c971e89 100644
--- a/src/gallium/auxiliary/driver_ddebug/dd_context.c
+++ b/src/gallium/auxiliary/driver_ddebug/dd_context.c
@@ -403,20 +403,31 @@ static void dd_context_set_tess_state(struct pipe_context 
*_pipe,
struct dd_context *dctx = dd_context(_pipe);
struct pipe_context *pipe = dctx->pipe;
 
memcpy(dctx->draw_state.tess_default_levels, default_outer_level,
   sizeof(float) * 4);
memcpy(dctx->draw_state.tess_default_levels+4, default_inner_level,
   sizeof(float) * 2);
pipe->set_tess_state(pipe, default_outer_level, default_inner_level);
 }
 
+static void dd_context_set_window_rectangles(struct pipe_context *_pipe,
+ boolean include,
+ unsigned num_rectangles,
+ const struct pipe_scissor_state 
*rects)
+{
+   struct dd_context *dctx = dd_context(_pipe);
+   struct pipe_context *pipe = dctx->pipe;
+
+   pipe->set_window_rectangles(pipe, include, num_rectangles, rects);
+}
+
 
 /
  * views
  */
 
 static struct pipe_surface *
 dd_context_create_surface(struct pipe_context *_pipe,
   struct pipe_resource *resource,
   const struct pipe_surface *surf_tmpl)
 {
@@ -817,20 +828,21 @@ dd_context_create(struct dd_screen *dscreen, struct 
pipe_context *pipe)
CTX_INIT(set_constant_buffer);
CTX_INIT(set_framebuffer_state);
CTX_INIT(set_polygon_stipple);
CTX_INIT(set_scissor_states);
CTX_INIT(set_viewport_states);
CTX_INIT(set_sampler_views);
CTX_INIT(set_tess_state);
CTX_INIT(set_shader_buffers);
CTX_INIT(set_shader_images);
CTX_INIT(set_vertex_buffers);
+   CTX_INIT(set_window_rectangles);
CTX_INIT(create_stream_output_target);
CTX_INIT(stream_output_target_destroy);
CTX_INIT(set_stream_output_targets);
CTX_INIT(create_sampler_view);
CTX_INIT(sampler_view_destroy);
CTX_INIT(create_surface);
CTX_INIT(surface_destroy);
CTX_INIT(texture_barrier);
CTX_INIT(memory_barrier);
CTX_INIT(resource_commit);
-- 
2.17.1

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


[Mesa-dev] [ANNOUNCE] Mesa 18.2.0-rc2

2018-08-08 Thread Andres Gomez
Hello list,

The second release candidate for the Mesa 18.2.0 is now available.
Currently we have:
 - 17 queued
 - 10 nominated (outstanding)
 - and 0 rejected patches


In the current queue we have:

Multiple fixes for the broadcom drivers while individual fixes for the
swr and nouveau drivers and Intel tools.

From build and integration point of view, we have multiple fixes to
build with meson and in Android.


Take a look at section "Mesa stable queue" for more information.


Testing reports/general approval


Any testing reports (or general approval of the state of the branch)
will be greatly appreciated.

The plan is to have the third release candidate for 18.2.0 next
Wednesday (2018/08/15), around or shortly after 18:00 EEST.

If you have any questions or suggestions - be that about the current
patch queue or otherwise, please go ahead.


Trivial merge conflicts
---

No merge conflicts.

Br,
Andres


Mesa stable queue
-

Nominated (10)
==

Eric Anholt (3):
  9ab6912a00e vc4: Respect a sampler view's first_layer field.
  69158c452bb vc4: Ignore samplers for finding uniform offsets.
  cfe69d0aaaf vc4: Fix vc4_fence_server_sync() on pre-syncobj kernels.

Emil Velikov (5):
  a7ea7511ba7 automake: require shared glapi when using DRI based libGL
  d5ac2364711 autotools: error out when using the broken --with-{gl, 
osmesa}-lib-name
  25a9450a44b autotools: error out when building with mangling and glvnd
  315c46cfdc3 autotools: use correct gl.pc LIBS when using glvnd
  54d844897fe swr: don't export swr_create_screen_internal

Juan A. Suarez Romero (2):
  1fe7cbdf05b wayland/egl: initialize window surface size to window size
  a9fb331ea7d wayland/egl: update surface size on window resize


Queued (17)
===

Andres Gomez (2):
  intel/tools: add error2aub creation into autotools
  Update version to 18.2.0-rc2

Chad Versace (1):
  drisw: Fix build on Android Nougat, which lacks shm (v2)

Eric Anholt (7):
  v3d: Make sure we don't emit a thrsw before the last one finished.
  v3d: Wait for TMU writes to complete before continuing after a spill.
  v3d: Make sure that QPU instruction-has-a-dest matches VIR.
  v3d: Avoid spilling that breaks the r5 usage after a ldvary.
  v3d: Emit the VCM_CACHE_SIZE packet.
  vc4: Fix context creation when syncobjs aren't supported.
  vc4: Fix a leak of the no-vertex-elements workaround BO.

Gert Wollny (1):
  meson, install_megadrivers: Also remove stale symlinks

Jon Turney (1):
  meson: use correct keyword to fix a meson warning

Karol Herbst (1):
  nvc0/ir: return 0 in imageLoad on incomplete textures

Lionel Landwerlin (1):
  intel: aubinator: fix read the context/ring

Marek Olšák (1):
  gallium/u_vbuf: handle indirect multidraws correctly and efficiently (v3)

Mauro Rossi (1):
  android: radv: build vulkan.radv conditionally to radeonsi

Vlad Golovkin (1):
  swr: Remove unnecessary memset call


Rejected (0)


No rejections.


git tag: mesa-18.2.0-rc2

https://mesa.freedesktop.org/archive/mesa-18.2.0-rc2.tar.gz
MD5:  8a92b0e3c0994109f46331094f7bb859  mesa-18.2.0-rc2.tar.gz
SHA1: 06ca32e8097fdf8c47df188efe9d5b1e6401422f  mesa-18.2.0-rc2.tar.gz
SHA256: 7f3f5393ebf9b5f399853e4b3358930eb1f66922e83e2e52042391b722a1ef89  
mesa-18.2.0-rc2.tar.gz
SHA512: 
8a0fc0a777a4c57e3b4c90012e0b78765a3bdb53964a6f811656f56728f274402fdbaf2e6116817d3de746cd7ff74f4cb1741f40dc0e4b851144c7f938532a97
  mesa-18.2.0-rc2.tar.gz
PGP:  https://mesa.freedesktop.org/archive/mesa-18.2.0-rc2.tar.gz.sig

https://mesa.freedesktop.org/archive/mesa-18.2.0-rc2.tar.xz
MD5:  a62e085e7c1fc97da61149d2241443b9  mesa-18.2.0-rc2.tar.xz
SHA1: 662b2e419e3fc52068bcf921dc1900e85015a76f  mesa-18.2.0-rc2.tar.xz
SHA256: 2201d99bd0e32f1f36f1714a11d8ad270e4f560488b77acdb811d083e6157a4a  
mesa-18.2.0-rc2.tar.xz
SHA512: 
a60e6f1a0e819a1231946f9a50609ae670595c8dcd7d9d7ff1f928485e450dd25c622a451369c1f2999c3b986d2c5d9f4e6afd0e6cf24a7ae56595265f5d2aee
  mesa-18.2.0-rc2.tar.xz
PGP:  https://mesa.freedesktop.org/archive/mesa-18.2.0-rc2.tar.xz.sig
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 14/14] radeonsi: increase the maximum UBO size to 2 GB

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

Same as the closed driver.

This causes a failure in GL45-CTS.compute_shader.max, which has a trivial
bug.
---
 src/gallium/drivers/radeonsi/si_get.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_get.c 
b/src/gallium/drivers/radeonsi/si_get.c
index 41b9cad071b..2852705c806 100644
--- a/src/gallium/drivers/radeonsi/si_get.c
+++ b/src/gallium/drivers/radeonsi/si_get.c
@@ -420,21 +420,21 @@ static int si_get_shader_param(struct pipe_screen* 
pscreen,
case PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS:
case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH:
return 16384;
case PIPE_SHADER_CAP_MAX_INPUTS:
return shader == PIPE_SHADER_VERTEX ? SI_MAX_ATTRIBS : 32;
case PIPE_SHADER_CAP_MAX_OUTPUTS:
return shader == PIPE_SHADER_FRAGMENT ? 8 : 32;
case PIPE_SHADER_CAP_MAX_TEMPS:
return 256; /* Max native temporaries. */
case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE:
-   return 4096 * sizeof(float[4]); /* actually only memory limits 
this */
+   return MIN2(sscreen->info.max_alloc_size, INT_MAX - 3); /* 
aligned to 4 */
case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
return SI_NUM_CONST_BUFFERS;
case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS:
return SI_NUM_SAMPLERS;
case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS:
return SI_NUM_SHADER_BUFFERS;
case PIPE_SHADER_CAP_MAX_SHADER_IMAGES:
return SI_NUM_IMAGES;
case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT:
-- 
2.17.1

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


[Mesa-dev] [PATCH 04/14] mesa: add ctx->Const.MaxGeometryShaderInvocations

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

radeonsi wants to report a different value
---
 src/compiler/glsl/glsl_parser_extras.cpp | 3 ++-
 src/compiler/glsl/glsl_parser_extras.h   | 1 +
 src/mesa/main/context.c  | 1 +
 src/mesa/main/get_hash_params.py | 2 +-
 src/mesa/main/mtypes.h   | 3 ++-
 5 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/compiler/glsl/glsl_parser_extras.cpp 
b/src/compiler/glsl/glsl_parser_extras.cpp
index 6d92f24ea22..01ca39fb0cc 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -111,20 +111,21 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct 
gl_context *_ctx,
this->Const.MaxProgramTexelOffset = ctx->Const.MaxProgramTexelOffset;
 
this->Const.MaxDrawBuffers = ctx->Const.MaxDrawBuffers;
 
this->Const.MaxDualSourceDrawBuffers = ctx->Const.MaxDualSourceDrawBuffers;
 
/* 1.50 constants */
this->Const.MaxVertexOutputComponents = 
ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents;
this->Const.MaxGeometryInputComponents = 
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxInputComponents;
this->Const.MaxGeometryOutputComponents = 
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxOutputComponents;
+   this->Const.MaxGeometryShaderInvocations = 
ctx->Const.MaxGeometryShaderInvocations;
this->Const.MaxFragmentInputComponents = 
ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents;
this->Const.MaxGeometryTextureImageUnits = 
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits;
this->Const.MaxGeometryOutputVertices = 
ctx->Const.MaxGeometryOutputVertices;
this->Const.MaxGeometryTotalOutputComponents = 
ctx->Const.MaxGeometryTotalOutputComponents;
this->Const.MaxGeometryUniformComponents = 
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxUniformComponents;
 
this->Const.MaxVertexAtomicCounters = 
ctx->Const.Program[MESA_SHADER_VERTEX].MaxAtomicCounters;
this->Const.MaxTessControlAtomicCounters = 
ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxAtomicCounters;
this->Const.MaxTessEvaluationAtomicCounters = 
ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxAtomicCounters;
this->Const.MaxGeometryAtomicCounters = 
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxAtomicCounters;
@@ -1810,21 +1811,21 @@ set_shader_inout_layout(struct gl_shader *shader,
   }
 
   shader->info.Geom.Invocations = 0;
   if (state->in_qualifier->flags.q.invocations) {
  unsigned invocations;
  if (state->in_qualifier->invocations->
process_qualifier_constant(state, "invocations",
   , false)) {
 
 YYLTYPE loc = state->in_qualifier->invocations->get_location();
-if (invocations > MAX_GEOMETRY_SHADER_INVOCATIONS) {
+if (invocations > state->Const.MaxGeometryShaderInvocations) {
_mesa_glsl_error(, state,
 "invocations (%d) exceeds "
 "GL_MAX_GEOMETRY_SHADER_INVOCATIONS",
 invocations);
 }
 shader->info.Geom.Invocations = invocations;
  }
   }
   break;
 
diff --git a/src/compiler/glsl/glsl_parser_extras.h 
b/src/compiler/glsl/glsl_parser_extras.h
index 59a173418b7..b29216f8d32 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -486,20 +486,21 @@ struct _mesa_glsl_parse_state {
   unsigned MaxDualSourceDrawBuffers;
 
   /* 3.00 ES */
   int MinProgramTexelOffset;
   int MaxProgramTexelOffset;
 
   /* 1.50 */
   unsigned MaxVertexOutputComponents;
   unsigned MaxGeometryInputComponents;
   unsigned MaxGeometryOutputComponents;
+  unsigned MaxGeometryShaderInvocations;
   unsigned MaxFragmentInputComponents;
   unsigned MaxGeometryTextureImageUnits;
   unsigned MaxGeometryOutputVertices;
   unsigned MaxGeometryTotalOutputComponents;
   unsigned MaxGeometryUniformComponents;
 
   /* ARB_shader_atomic_counters */
   unsigned MaxVertexAtomicCounters;
   unsigned MaxTessControlAtomicCounters;
   unsigned MaxTessEvaluationAtomicCounters;
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 0ef8fe32a63..c46d97983e9 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -630,20 +630,21 @@ _mesa_init_constants(struct gl_constants *consts, gl_api 
api)
 
consts->MaxColorAttachments = MAX_COLOR_ATTACHMENTS;
consts->MaxRenderbufferSize = MAX_RENDERBUFFER_SIZE;
 
consts->Program[MESA_SHADER_VERTEX].MaxTextureImageUnits = 
MAX_TEXTURE_IMAGE_UNITS;
consts->MaxCombinedTextureImageUnits = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
consts->MaxVarying = 16; /* old limit not to break tnl and swrast */
consts->Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits = 
MAX_TEXTURE_IMAGE_UNITS;
consts->MaxGeometryOutputVertices = MAX_GEOMETRY_OUTPUT_VERTICES;

[Mesa-dev] [PATCH 11/14] gallium: add PIPE_CAP_MAX_GS_INVOCATIONS

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

---
 src/gallium/docs/source/screen.rst   | 3 ++-
 src/gallium/drivers/etnaviv/etnaviv_screen.c | 3 +++
 src/gallium/drivers/freedreno/freedreno_screen.c | 3 +++
 src/gallium/drivers/i915/i915_screen.c   | 3 +++
 src/gallium/drivers/llvmpipe/lp_screen.c | 2 ++
 src/gallium/drivers/nouveau/nv30/nv30_screen.c   | 2 ++
 src/gallium/drivers/nouveau/nv50/nv50_screen.c   | 2 ++
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c   | 2 ++
 src/gallium/drivers/r300/r300_screen.c   | 3 +++
 src/gallium/drivers/r600/r600_pipe.c | 3 +++
 src/gallium/drivers/radeonsi/si_get.c| 2 ++
 src/gallium/drivers/softpipe/sp_screen.c | 2 ++
 src/gallium/drivers/svga/svga_screen.c   | 2 ++
 src/gallium/drivers/swr/swr_screen.cpp   | 2 ++
 src/gallium/drivers/v3d/v3d_screen.c | 1 +
 src/gallium/drivers/vc4/vc4_screen.c | 1 +
 src/gallium/drivers/virgl/virgl_screen.c | 2 ++
 src/gallium/include/pipe/p_defines.h | 1 +
 src/mesa/state_tracker/st_extensions.c   | 2 ++
 19 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/src/gallium/docs/source/screen.rst 
b/src/gallium/docs/source/screen.rst
index e85246c4778..a4d71b3a849 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -445,21 +445,22 @@ PIPE_CONSERVATIVE_RASTER_POST_SNAP mode is supported for 
points and lines.
 PIPE_CONSERVATIVE_RASTER_PRE_SNAP mode is supported for triangles.
 * ``PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES``: Whether the
 PIPE_CONSERVATIVE_RASTER_PRE_SNAP mode is supported for points and lines.
 * ``PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE``: Whether 
PIPE_CAP_POST_DEPTH_COVERAGE
 works with conservative rasterization.
 * ``PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS``: The maximum
 subpixel precision bias in bits during conservative rasterization.
 * ``PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS``: True is the driver supports
   programmable sample location through ```get_sample_pixel_grid``` and
   ```set_sample_locations```.
-
+* ``PIPE_CAP_MAX_GS_INVOCATIONS``: Maximum supported value of
+  TGSI_PROPERTY_GS_INVOCATIONS.
 
 .. _pipe_capf:
 
 PIPE_CAPF_*
 
 
 The floating-point capabilities are:
 
 * ``PIPE_CAPF_MAX_LINE_WIDTH``: The maximum width of a regular line.
 * ``PIPE_CAPF_MAX_LINE_WIDTH_AA``: The maximum width of a smoothed line.
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c 
b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index 35707e60445..e8bc6a5cae8 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -278,20 +278,23 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum 
pipe_cap param)
case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES:
case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES:
case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES:
case PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
case PIPE_CAP_PACKED_UNIFORMS:
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
   return 0;
 
+   case PIPE_CAP_MAX_GS_INVOCATIONS:
+  return 32;
+
/* Stream output. */
case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS:
case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS:
   return 0;
 
/* Geometry shader output, unsupported. */
case PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES:
case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS:
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c 
b/src/gallium/drivers/freedreno/freedreno_screen.c
index 4d54446ec7e..378640364d0 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -361,20 +361,23 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum 
pipe_cap param)
case PIPE_CAP_PACKED_UNIFORMS:
case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES:
case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES:
case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES:
case PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
return 0;
 
+   case PIPE_CAP_MAX_GS_INVOCATIONS:
+   return 32;
+
case PIPE_CAP_CONTEXT_PRIORITY_MASK:
return screen->priority_mask;
 
case PIPE_CAP_DRAW_INDIRECT:
if (is_a4xx(screen) || is_a5xx(screen))
return 1;
return 0;
 
case PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT:
if 

[Mesa-dev] [PATCH 12/14] gallium: add PIPE_CAP_MAX_SHADER_BUFFER_SIZE

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

---
 src/gallium/docs/source/screen.rst   | 2 ++
 src/gallium/drivers/etnaviv/etnaviv_screen.c | 3 +++
 src/gallium/drivers/freedreno/freedreno_screen.c | 3 +++
 src/gallium/drivers/i915/i915_screen.c   | 3 +++
 src/gallium/drivers/llvmpipe/lp_screen.c | 2 ++
 src/gallium/drivers/nouveau/nv30/nv30_screen.c   | 2 ++
 src/gallium/drivers/nouveau/nv50/nv50_screen.c   | 2 ++
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c   | 2 ++
 src/gallium/drivers/r300/r300_screen.c   | 2 ++
 src/gallium/drivers/r600/r600_pipe.c | 2 ++
 src/gallium/drivers/radeonsi/si_get.c| 1 +
 src/gallium/drivers/softpipe/sp_screen.c | 2 ++
 src/gallium/drivers/svga/svga_screen.c   | 2 ++
 src/gallium/drivers/swr/swr_screen.cpp   | 2 ++
 src/gallium/drivers/v3d/v3d_screen.c | 2 ++
 src/gallium/drivers/vc4/vc4_screen.c | 2 ++
 src/gallium/drivers/virgl/virgl_screen.c | 2 ++
 src/gallium/include/pipe/p_defines.h | 1 +
 src/mesa/state_tracker/st_extensions.c   | 3 ++-
 19 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/src/gallium/docs/source/screen.rst 
b/src/gallium/docs/source/screen.rst
index a4d71b3a849..6caa7d5f351 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -447,20 +447,22 @@ PIPE_CONSERVATIVE_RASTER_PRE_SNAP mode is supported for 
triangles.
 PIPE_CONSERVATIVE_RASTER_PRE_SNAP mode is supported for points and lines.
 * ``PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE``: Whether 
PIPE_CAP_POST_DEPTH_COVERAGE
 works with conservative rasterization.
 * ``PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS``: The maximum
 subpixel precision bias in bits during conservative rasterization.
 * ``PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS``: True is the driver supports
   programmable sample location through ```get_sample_pixel_grid``` and
   ```set_sample_locations```.
 * ``PIPE_CAP_MAX_GS_INVOCATIONS``: Maximum supported value of
   TGSI_PROPERTY_GS_INVOCATIONS.
+* ``PIPE_CAP_MAX_SHADER_BUFFER_SIZE``: Maximum supported size for binding
+  with set_shader_buffers.
 
 .. _pipe_capf:
 
 PIPE_CAPF_*
 
 
 The floating-point capabilities are:
 
 * ``PIPE_CAPF_MAX_LINE_WIDTH``: The maximum width of a regular line.
 * ``PIPE_CAPF_MAX_LINE_WIDTH_AA``: The maximum width of a smoothed line.
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c 
b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index e8bc6a5cae8..03449778c70 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -281,20 +281,23 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum 
pipe_cap param)
case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES:
case PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
case PIPE_CAP_PACKED_UNIFORMS:
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
   return 0;
 
case PIPE_CAP_MAX_GS_INVOCATIONS:
   return 32;
 
+   case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
+  return 1 << 27;
+
/* Stream output. */
case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS:
case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS:
   return 0;
 
/* Geometry shader output, unsupported. */
case PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES:
case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS:
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c 
b/src/gallium/drivers/freedreno/freedreno_screen.c
index 378640364d0..53e5c346403 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -364,20 +364,23 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum 
pipe_cap param)
case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES:
case PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
return 0;
 
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 32;
 
+   case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
+return 1 << 27;
+
case PIPE_CAP_CONTEXT_PRIORITY_MASK:
return screen->priority_mask;
 
case PIPE_CAP_DRAW_INDIRECT:
if (is_a4xx(screen) || is_a5xx(screen))
return 1;
return 0;
 
case PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT:
if (is_a4xx(screen) || is_a5xx(screen))
diff --git a/src/gallium/drivers/i915/i915_screen.c 
b/src/gallium/drivers/i915/i915_screen.c
index 6b850064019..fcca8b99813 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ 

[Mesa-dev] [PATCH 07/14] st/mesa: set ctx->Const.SubPixelBits

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

---
 src/mesa/state_tracker/st_extensions.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/state_tracker/st_extensions.c 
b/src/mesa/state_tracker/st_extensions.c
index 1c01495e937..5287dff6703 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -104,20 +104,21 @@ void st_init_limits(struct pipe_screen *screen,
   = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS);
 
/* Define max viewport size and max renderbuffer size in terms of
 * max texture size (note: max tex RECT size = max tex 2D size).
 * If this isn't true for some hardware we'll need new PIPE_CAP_ queries.
 */
c->MaxViewportWidth =
c->MaxViewportHeight =
c->MaxRenderbufferSize = c->MaxTextureRectSize;
 
+   c->SubPixelBits =
c->ViewportSubpixelBits =
   screen->get_param(screen, PIPE_CAP_VIEWPORT_SUBPIXEL_BITS);
 
c->MaxDrawBuffers = c->MaxColorAttachments =
   _clamp(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS),
  1, MAX_DRAW_BUFFERS);
 
c->MaxDualSourceDrawBuffers =
   _clamp(screen->get_param(screen,
PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS),
-- 
2.17.1

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


[Mesa-dev] [PATCH 10/14] tgsi/ureg: don't call tgsi_sanity when it's too slow

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

---
 src/gallium/auxiliary/tgsi/tgsi_ureg.c | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c 
b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
index 92c98c763eb..c1c8851486e 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
@@ -2099,21 +2099,32 @@ const struct tgsi_token *ureg_finalize( struct 
ureg_program *ureg )
 
tokens = >domain[DOMAIN_DECL].tokens[0].token;
 
if (0) {
   debug_printf("%s: emitted shader %d tokens:\n", __FUNCTION__,
ureg->domain[DOMAIN_DECL].count);
   tgsi_dump( tokens, 0 );
}
 
 #if DEBUG
-   if (tokens && !tgsi_sanity_check(tokens)) {
+   /* tgsi_sanity doesn't seem to return if there are too many constants. */
+   bool too_many_constants = false;
+   for (unsigned i = 0; i < ARRAY_SIZE(ureg->const_decls); i++) {
+  for (unsigned j = 0; j < ureg->const_decls[i].nr_constant_ranges; j++) {
+ if (ureg->const_decls[i].constant_range[j].last > 4096) {
+too_many_constants = true;
+break;
+ }
+  }
+   }
+
+   if (tokens && !too_many_constants && !tgsi_sanity_check(tokens)) {
   debug_printf("tgsi_ureg.c, sanity check failed on generated tokens:\n");
   tgsi_dump(tokens, 0);
   assert(0);
}
 #endif
 
 
return tokens;
 }
 
-- 
2.17.1

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


[Mesa-dev] [PATCH 09/14] st/mesa: fix up uniform limits to be able to expose large UBOs

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

---
 src/mesa/state_tracker/st_extensions.c | 31 +++---
 1 file changed, 23 insertions(+), 8 deletions(-)

diff --git a/src/mesa/state_tracker/st_extensions.c 
b/src/mesa/state_tracker/st_extensions.c
index 5e580aad2e4..1a0c4500c63 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -147,20 +147,25 @@ void st_init_limits(struct pipe_screen *screen,
c->MaxTextureLodBias =
   screen->get_paramf(screen, PIPE_CAPF_MAX_TEXTURE_LOD_BIAS);
 
c->QuadsFollowProvokingVertexConvention =
   screen->get_param(screen,
 PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION);
 
c->MaxUniformBlockSize =
   screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT,
PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE);
+   /* GL45-CTS.enhanced_layouts.ssb_member_invalid_offset_alignment fails if
+* this is larger than INT_MAX - 100. Use a nicely aligned limit.
+*/
+   c->MaxUniformBlockSize = MIN2(c->MaxUniformBlockSize, INT_MAX - 127);
+
if (c->MaxUniformBlockSize < 16384) {
   can_ubo = FALSE;
}
 
for (sh = 0; sh < PIPE_SHADER_TYPES; ++sh) {
   struct gl_shader_compiler_options *options;
   struct gl_program_constants *pc;
   const nir_shader_compiler_options *nir_options = NULL;
 
   if (screen->get_compiler_options) {
@@ -203,42 +208,45 @@ void st_init_limits(struct pipe_screen *screen,
  screen->get_shader_param(screen, sh,
   PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS);
   pc->MaxAttribs =
   pc->MaxNativeAttribs =
  screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INPUTS);
   pc->MaxTemps =
   pc->MaxNativeTemps =
  screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_TEMPS);
   pc->MaxAddressRegs =
   pc->MaxNativeAddressRegs = sh == PIPE_SHADER_VERTEX ? 1 : 0;
-  pc->MaxParameters =
-  pc->MaxNativeParameters =
+
+  pc->MaxUniformComponents =
  screen->get_shader_param(screen, sh,
-   PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE) / sizeof(float[4]);
+  PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE) / 4;
+  pc->MaxUniformComponents = MIN2(pc->MaxUniformComponents,
+  MAX_UNIFORMS * 4);
+
+  pc->MaxParameters =
+  pc->MaxNativeParameters = pc->MaxUniformComponents / 4;
   pc->MaxInputComponents =
  screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INPUTS) * 4;
   pc->MaxOutputComponents =
  screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_OUTPUTS) * 4;
 
-  pc->MaxUniformComponents =
- 4 * MIN2(pc->MaxNativeParameters, MAX_UNIFORMS);
 
   pc->MaxUniformBlocks =
  screen->get_shader_param(screen, sh,
   PIPE_SHADER_CAP_MAX_CONST_BUFFERS);
   if (pc->MaxUniformBlocks)
  pc->MaxUniformBlocks -= 1; /* The first one is for ordinary uniforms. 
*/
   pc->MaxUniformBlocks = _min(pc->MaxUniformBlocks, MAX_UNIFORM_BUFFERS);
 
-  pc->MaxCombinedUniformComponents = (pc->MaxUniformComponents +
-  c->MaxUniformBlockSize / 4 *
-  pc->MaxUniformBlocks);
+  pc->MaxCombinedUniformComponents =
+ pc->MaxUniformComponents +
+ (uint64_t)c->MaxUniformBlockSize / 4 * pc->MaxUniformBlocks;
 
   temp = screen->get_shader_param(screen, sh, 
PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTERS);
   if (temp) {
  /*
   * for separate atomic counters get the actual hw limits
   * per stage on atomic counters and buffers
   */
  ssbo_atomic = false;
  pc->MaxAtomicCounters = temp;
  pc->MaxAtomicBuffers = screen->get_shader_param(screen, sh, 
PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTER_BUFFERS);
@@ -303,20 +311,27 @@ void st_init_limits(struct pipe_screen *screen,
  65536);
   else
  options->MaxUnrollIterations =
 screen->get_shader_param(screen, sh,
   PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT);
 
   options->LowerCombinedClipCullDistance = true;
   options->LowerBufferInterfaceBlocks = true;
}
 
+   c->MaxUserAssignableUniformLocations =
+  c->Program[MESA_SHADER_VERTEX].MaxUniformComponents +
+  c->Program[MESA_SHADER_TESS_CTRL].MaxUniformComponents +
+  c->Program[MESA_SHADER_TESS_EVAL].MaxUniformComponents +
+  c->Program[MESA_SHADER_GEOMETRY].MaxUniformComponents +
+  c->Program[MESA_SHADER_FRAGMENT].MaxUniformComponents;
+
c->GLSLOptimizeConservatively =
   screen->get_param(screen, PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY);
c->LowerTessLevel = true;
c->LowerCsDerivedVariables = true;
c->PrimitiveRestartForPatches =
   screen->get_param(screen, PIPE_CAP_PRIMITIVE_RESTART_FOR_PATCHES);
 

[Mesa-dev] [PATCH 13/14] radeonsi: bump MAX_GS_INVOCATIONS

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

same as the closed driver
---
 src/gallium/drivers/radeonsi/si_get.c   | 4 +++-
 src/gallium/drivers/radeonsi/si_state_shaders.c | 2 --
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_get.c 
b/src/gallium/drivers/radeonsi/si_get.c
index b8ad84f3613..41b9cad071b 100644
--- a/src/gallium/drivers/radeonsi/si_get.c
+++ b/src/gallium/drivers/radeonsi/si_get.c
@@ -286,21 +286,23 @@ static int si_get_param(struct pipe_screen *pscreen, enum 
pipe_cap param)
case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS:
case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS:
return 32*4;
 
/* Geometry shader output. */
case PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES:
return 1024;
case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS:
return 4095;
case PIPE_CAP_MAX_GS_INVOCATIONS:
-   return 32;
+   /* The closed driver exposes 127, but 125 is the greatest
+* number that works. */
+   return 125;
 
case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE:
return 2048;
 
/* Texturing. */
case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
return 15; /* 16384 */
case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
/* textures support 8192, but layered rendering supports 2048 */
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c 
b/src/gallium/drivers/radeonsi/si_state_shaders.c
index de33d250301..5b39d4a1e37 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -651,22 +651,20 @@ static void gfx9_get_gs_info(struct si_shader_selector 
*es,
const unsigned esgs_itemsize = es->esgs_itemsize / 4;
unsigned esgs_lds_size;
 
/* All these are per subgroup: */
const unsigned max_out_prims = 32 * 1024;
const unsigned max_es_verts = 255;
const unsigned ideal_gs_prims = 64;
unsigned max_gs_prims, gs_prims;
unsigned min_es_verts, es_verts, worst_case_es_verts;
 
-   assert(gs_num_invocations <= 32); /* GL maximum */
-
if (uses_adjacency || gs_num_invocations > 1)
max_gs_prims = 127 / gs_num_invocations;
else
max_gs_prims = 255;
 
/* MAX_PRIMS_PER_SUBGROUP = gs_prims * max_vert_out * gs_invocations.
 * Make sure we don't go over the maximum value.
 */
if (gs->gs_max_out_vertices > 0) {
max_gs_prims = MIN2(max_gs_prims,
-- 
2.17.1

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


[Mesa-dev] [PATCH 05/14] mesa: make MaxCombinedUniformComponents 64-bit to allow large UBOs

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

---
 src/mesa/main/get_hash_params.py | 12 ++--
 src/mesa/main/mtypes.h   |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index dcfeac39190..ed5328df7cb 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -415,22 +415,22 @@ descriptor=[
   [ "TRANSFORM_FEEDBACK_BUFFER_PAUSED", "LOC_CUSTOM, TYPE_BOOLEAN, 0, 
extra_ARB_transform_feedback2_api_es3" ],
   [ "TRANSFORM_FEEDBACK_BUFFER_ACTIVE", "LOC_CUSTOM, TYPE_BOOLEAN, 0, 
extra_ARB_transform_feedback2_api_es3" ],
   [ "TRANSFORM_FEEDBACK_BINDING", "LOC_CUSTOM, TYPE_INT, 0, 
extra_ARB_transform_feedback2_api_es3" ],
 
 # GL_ARB_uniform_buffer_object
   [ "MAX_VERTEX_UNIFORM_BLOCKS", 
"CONTEXT_INT(Const.Program[MESA_SHADER_VERTEX].MaxUniformBlocks), 
extra_ARB_uniform_buffer_object" ],
   [ "MAX_FRAGMENT_UNIFORM_BLOCKS", 
"CONTEXT_INT(Const.Program[MESA_SHADER_FRAGMENT].MaxUniformBlocks), 
extra_ARB_uniform_buffer_object" ],
   [ "MAX_COMBINED_UNIFORM_BLOCKS", 
"CONTEXT_INT(Const.MaxCombinedUniformBlocks), extra_ARB_uniform_buffer_object" 
],
   [ "MAX_UNIFORM_BLOCK_SIZE", "CONTEXT_INT(Const.MaxUniformBlockSize), 
extra_ARB_uniform_buffer_object" ],
   [ "MAX_UNIFORM_BUFFER_BINDINGS", 
"CONTEXT_INT(Const.MaxUniformBufferBindings), extra_ARB_uniform_buffer_object" 
],
-  [ "MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS", 
"CONTEXT_INT(Const.Program[MESA_SHADER_VERTEX].MaxCombinedUniformComponents), 
extra_ARB_uniform_buffer_object" ],
-  [ "MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS", 
"CONTEXT_INT(Const.Program[MESA_SHADER_FRAGMENT].MaxCombinedUniformComponents), 
extra_ARB_uniform_buffer_object" ],
+  [ "MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS", 
"CONTEXT_INT64(Const.Program[MESA_SHADER_VERTEX].MaxCombinedUniformComponents), 
extra_ARB_uniform_buffer_object" ],
+  [ "MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS", 
"CONTEXT_INT64(Const.Program[MESA_SHADER_FRAGMENT].MaxCombinedUniformComponents),
 extra_ARB_uniform_buffer_object" ],
   [ "UNIFORM_BUFFER_OFFSET_ALIGNMENT", 
"CONTEXT_INT(Const.UniformBufferOffsetAlignment), 
extra_ARB_uniform_buffer_object" ],
   [ "UNIFORM_BUFFER_BINDING", "LOC_CUSTOM, TYPE_INT, 0, 
extra_ARB_uniform_buffer_object" ],
 
 # GL_ARB_vertex_shader
   [ "MAX_VERTEX_UNIFORM_COMPONENTS_ARB", 
"CONTEXT_INT(Const.Program[MESA_SHADER_VERTEX].MaxUniformComponents), 
extra_ARB_vertex_shader" ],
   [ "MAX_VARYING_FLOATS_ARB", "LOC_CUSTOM, TYPE_INT, 0, 
extra_ARB_vertex_shader" ],
 
 # GL_EXT_framebuffer_blit
 # NOTE: GL_DRAW_FRAMEBUFFER_BINDING_EXT == GL_FRAMEBUFFER_BINDING_EXT
   [ "READ_FRAMEBUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
@@ -521,21 +521,21 @@ descriptor=[
 # GL_ARB_compute_shader / GLES 3.1
   [ "MAX_COMPUTE_WORK_GROUP_INVOCATIONS", 
"CONTEXT_INT(Const.MaxComputeWorkGroupInvocations), 
extra_ARB_compute_shader_es31" ],
   [ "MAX_COMPUTE_UNIFORM_BLOCKS", 
"CONTEXT_INT(Const.Program[MESA_SHADER_COMPUTE].MaxUniformBlocks), 
extra_ARB_compute_shader_es31" ],
   [ "MAX_COMPUTE_TEXTURE_IMAGE_UNITS", 
"CONTEXT_INT(Const.Program[MESA_SHADER_COMPUTE].MaxTextureImageUnits), 
extra_ARB_compute_shader_es31" ],
   [ "MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS", 
"CONTEXT_INT(Const.Program[MESA_SHADER_COMPUTE].MaxAtomicBuffers), 
extra_ARB_compute_shader_es31" ],
   [ "MAX_COMPUTE_ATOMIC_COUNTERS", 
"CONTEXT_INT(Const.Program[MESA_SHADER_COMPUTE].MaxAtomicCounters), 
extra_ARB_compute_shader_es31" ],
   [ "MAX_COMPUTE_SHARED_MEMORY_SIZE", 
"CONTEXT_INT(Const.MaxComputeSharedMemorySize), extra_ARB_compute_shader_es31" 
],
   [ "MAX_COMPUTE_UNIFORM_COMPONENTS", 
"CONTEXT_INT(Const.Program[MESA_SHADER_COMPUTE].MaxUniformComponents), 
extra_ARB_compute_shader_es31" ],
   [ "MAX_COMPUTE_IMAGE_UNIFORMS", 
"CONTEXT_INT(Const.Program[MESA_SHADER_COMPUTE].MaxImageUniforms), 
extra_ARB_compute_shader_es31" ],
   [ "DISPATCH_INDIRECT_BUFFER_BINDING", "LOC_CUSTOM, TYPE_INT, 0, 
extra_ARB_compute_shader_es31" ],
-  [ "MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS", 
"CONTEXT_INT(Const.Program[MESA_SHADER_COMPUTE].MaxCombinedUniformComponents), 
extra_ARB_compute_shader_es31" ],
+  [ "MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS", 
"CONTEXT_INT64(Const.Program[MESA_SHADER_COMPUTE].MaxCombinedUniformComponents),
 extra_ARB_compute_shader_es31" ],
 
 # GL_ARB_framebuffer_no_attachments / GLES 3.1
   ["MAX_FRAMEBUFFER_WIDTH", "CONTEXT_INT(Const.MaxFramebufferWidth), 
extra_ARB_framebuffer_no_attachments"],
   ["MAX_FRAMEBUFFER_HEIGHT", "CONTEXT_INT(Const.MaxFramebufferHeight), 
extra_ARB_framebuffer_no_attachments"],
   ["MAX_FRAMEBUFFER_SAMPLES", "CONTEXT_INT(Const.MaxFramebufferSamples), 
extra_ARB_framebuffer_no_attachments"],
 
 # GL_ARB_framebuffer_no_attachments / geometry shader
   [ "MAX_FRAMEBUFFER_LAYERS", "CONTEXT_INT(Const.MaxFramebufferLayers), 
extra_ARB_framebuffer_no_attachments_and_geometry_shader" ],
 
 # GL_ARB_explicit_uniform_location / GLES 3.1
@@ -599,22 +599,22 @@ descriptor=[
   [ 

[Mesa-dev] [PATCH 08/14] st/mesa: don't include compute resources in "Combined" limits

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

The combined limits should only include shader stages that can be active
at the same time.
---
 src/mesa/state_tracker/st_extensions.c | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/mesa/state_tracker/st_extensions.c 
b/src/mesa/state_tracker/st_extensions.c
index 5287dff6703..5e580aad2e4 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -315,22 +315,21 @@ void st_init_limits(struct pipe_screen *screen,
c->LowerTessLevel = true;
c->LowerCsDerivedVariables = true;
c->PrimitiveRestartForPatches =
   screen->get_param(screen, PIPE_CAP_PRIMITIVE_RESTART_FOR_PATCHES);
 
c->MaxCombinedTextureImageUnits =
  _min(c->Program[MESA_SHADER_VERTEX].MaxTextureImageUnits +
   c->Program[MESA_SHADER_TESS_CTRL].MaxTextureImageUnits +
   c->Program[MESA_SHADER_TESS_EVAL].MaxTextureImageUnits +
   c->Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits +
-  c->Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits +
-  c->Program[MESA_SHADER_COMPUTE].MaxTextureImageUnits,
+  c->Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits,
   MAX_COMBINED_TEXTURE_IMAGE_UNITS);
 
/* This depends on program constants. */
c->MaxTextureCoordUnits
   = _min(c->Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits,
  MAX_TEXTURE_COORD_UNITS);
 
c->MaxTextureUnits =
   _min(c->Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits,
c->MaxTextureCoordUnits);
@@ -389,22 +388,21 @@ void st_init_limits(struct pipe_screen *screen,
c->UniformBufferOffsetAlignment =
   screen->get_param(screen, PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT);
 
if (can_ubo) {
   extensions->ARB_uniform_buffer_object = GL_TRUE;
   c->MaxCombinedUniformBlocks = c->MaxUniformBufferBindings =
  c->Program[MESA_SHADER_VERTEX].MaxUniformBlocks +
  c->Program[MESA_SHADER_TESS_CTRL].MaxUniformBlocks +
  c->Program[MESA_SHADER_TESS_EVAL].MaxUniformBlocks +
  c->Program[MESA_SHADER_GEOMETRY].MaxUniformBlocks +
- c->Program[MESA_SHADER_FRAGMENT].MaxUniformBlocks +
- c->Program[MESA_SHADER_COMPUTE].MaxUniformBlocks;
+ c->Program[MESA_SHADER_FRAGMENT].MaxUniformBlocks,
   assert(c->MaxCombinedUniformBlocks <= MAX_COMBINED_UNIFORM_BUFFERS);
}
 
c->GLSLFragCoordIsSysVal =
   screen->get_param(screen, PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL);
c->GLSLFrontFacingIsSysVal =
   screen->get_param(screen, PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL);
 
/* GL_ARB_get_program_binary
 *
@@ -455,22 +453,21 @@ void st_init_limits(struct pipe_screen *screen,
  c->MaxCombinedShaderStorageBlocks;
   c->MaxShaderStorageBlockSize = 1 << 27;
   extensions->ARB_shader_storage_buffer_object = GL_TRUE;
}
 
c->MaxCombinedImageUniforms =
  c->Program[MESA_SHADER_VERTEX].MaxImageUniforms +
  c->Program[MESA_SHADER_TESS_CTRL].MaxImageUniforms +
  c->Program[MESA_SHADER_TESS_EVAL].MaxImageUniforms +
  c->Program[MESA_SHADER_GEOMETRY].MaxImageUniforms +
- c->Program[MESA_SHADER_FRAGMENT].MaxImageUniforms +
- c->Program[MESA_SHADER_COMPUTE].MaxImageUniforms;
+ c->Program[MESA_SHADER_FRAGMENT].MaxImageUniforms;
c->MaxCombinedShaderOutputResources += c->MaxCombinedImageUniforms;
c->MaxImageUnits = MAX_IMAGE_UNITS;
if (c->MaxCombinedImageUniforms) {
   extensions->ARB_shader_image_load_store = GL_TRUE;
   extensions->ARB_shader_image_size = GL_TRUE;
}
 
/* ARB_framebuffer_no_attachments */
c->MaxFramebufferWidth   = c->MaxViewportWidth;
c->MaxFramebufferHeight  = c->MaxViewportHeight;
-- 
2.17.1

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


[Mesa-dev] [PATCH 06/14] glsl: fix error checking against MAX_UNIFORM_LOCATIONS

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

---
 src/compiler/glsl/link_uniforms.cpp | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/compiler/glsl/link_uniforms.cpp 
b/src/compiler/glsl/link_uniforms.cpp
index 8d3f95fe114..434ecefb289 100644
--- a/src/compiler/glsl/link_uniforms.cpp
+++ b/src/compiler/glsl/link_uniforms.cpp
@@ -1202,22 +1202,26 @@ link_setup_uniform_remap_tables(struct gl_context *ctx,
   /* how many new entries for this uniform? */
   const unsigned entries =
  MAX2(1, prog->data->UniformStorage[i].array_elements);
 
   /* Find UniformRemapTable for empty blocks where we can fit this 
uniform. */
   int chosen_location = -1;
 
   if (empty_locs)
  chosen_location = link_util_find_empty_block(prog, 
>data->UniformStorage[i]);
 
-  /* Add new entries to the total amount of entries. */
-  total_entries += entries;
+  /* Add new entries to the total amount for checking against MAX_UNIFORM-
+   * _LOCATIONS. This only applies to the default uniform block (-1),
+   * because locations of uniform block entries are not assignable.
+   */
+  if (prog->data->UniformStorage[i].block_index == -1)
+ total_entries += entries;
 
   if (chosen_location != -1) {
  empty_locs -= entries;
   } else {
  chosen_location = prog->NumUniformRemapTable;
 
  /* resize remap table to fit new entries */
  prog->UniformRemapTable =
 reralloc(prog,
  prog->UniformRemapTable,
-- 
2.17.1

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


[Mesa-dev] [PATCH 03/14] mesa: don't include compute resources in MAX_COMBINED_* limits

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

5 is the maximum number of shader stages that can be used by 1 execution
call at the same time (e.g. a draw call). The limit ensures that each
stage can use all of its binding points.

Compute is separate and doesn't need the 5x multiplier.
---
 src/mesa/main/config.h | 22 +-
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
index fdf90d8956f..10c3f7d7725 100644
--- a/src/mesa/main/config.h
+++ b/src/mesa/main/config.h
@@ -163,31 +163,33 @@
  * \c MAX_PROGRAM_LOCAL_PARAMS and \c MAX_UNIFORMS are just the assembly shader
  * and GLSL shader names for the same thing.  They should \b always have the
  * same value.  Each refers to the number of vec4 values supplied as
  * per-program parameters.
  */
 /*@{*/
 #define MAX_PROGRAM_LOCAL_PARAMS   4096
 #define MAX_UNIFORMS   4096
 #define MAX_UNIFORM_BUFFERS15 /* + 1 default uniform buffer */
 #define MAX_SHADER_STORAGE_BUFFERS 16
-/* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. */
-#define MAX_COMBINED_UNIFORM_BUFFERS   (MAX_UNIFORM_BUFFERS * 6)
-#define MAX_COMBINED_SHADER_STORAGE_BUFFERS   (MAX_SHADER_STORAGE_BUFFERS * 6)
+/* 5 is for vertex, hull, domain, geometry, and fragment shader. Don't
+ * include compute.
+ */
+#define MAX_COMBINED_UNIFORM_BUFFERS   (MAX_UNIFORM_BUFFERS * 5)
+#define MAX_COMBINED_SHADER_STORAGE_BUFFERS   (MAX_SHADER_STORAGE_BUFFERS * 5)
 #define MAX_ATOMIC_COUNTERS4096
-/* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. */
-#define MAX_COMBINED_ATOMIC_BUFFERS(MAX_UNIFORM_BUFFERS * 6)
+/* 5 is for vertex, hull, domain, geometry, and fragment shader. */
+#define MAX_COMBINED_ATOMIC_BUFFERS(MAX_UNIFORM_BUFFERS * 5)
 /* Size of an atomic counter in bytes according to ARB_shader_atomic_counters 
*/
 #define ATOMIC_COUNTER_SIZE4
 #define MAX_IMAGE_UNIFORMS 32
-/* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. */
-#define MAX_IMAGE_UNITS(MAX_IMAGE_UNIFORMS * 6)
+/* 5 is for vertex, hull, domain, geometry, and fragment shader. */
+#define MAX_IMAGE_UNITS(MAX_IMAGE_UNIFORMS * 5)
 /*@}*/
 
 /**
  * Per-context constants (power of two)
  *
  * \note
  * This value should always be less than or equal to \c 
MAX_PROGRAM_LOCAL_PARAMS
  * and \c MAX_VERTEX_PROGRAM_PARAMS.  Otherwise some applications will make
  * incorrect assumptions.
  */
@@ -212,22 +214,24 @@
 /** For GL_ARB_fragment_program */
 /*@{*/
 #define MAX_FRAGMENT_PROGRAM_ADDRESS_REGS 0
 #define MAX_FRAGMENT_PROGRAM_PARAMS   64
 #define MAX_FRAGMENT_PROGRAM_INPUTS   12
 /*@}*/
 
 /** For GL_ARB_vertex_shader */
 /*@{*/
 #define MAX_VERTEX_GENERIC_ATTRIBS 16
-/* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. */
-#define MAX_COMBINED_TEXTURE_IMAGE_UNITS (MAX_TEXTURE_IMAGE_UNITS * 6)
+/* 5 is the number of shader stages that can be used at the same time.
+ * compute can't be used at the same time as other shaders.
+ */
+#define MAX_COMBINED_TEXTURE_IMAGE_UNITS (MAX_TEXTURE_IMAGE_UNITS * 5)
 /*@}*/
 
 
 /** For GL_ARB_draw_buffers */
 /*@{*/
 #define MAX_DRAW_BUFFERS 8
 /*@}*/
 
 
 /** For GL_EXT_framebuffer_object */
-- 
2.17.1

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


[Mesa-dev] [PATCH 00/14] Adjusting OpenGL limits and constants

2018-08-08 Thread Marek Olšák
Hi,

The idea is to expose similar limits as our closed driver.
There are also some bug fixes.

Please review.

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


[Mesa-dev] [PATCH 02/14] mesa: bump GL_MAX_ELEMENTS_INDICES and GL_MAX_ELEMENTS_VERTICES

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

same number as our closed GL driver
---
 src/mesa/main/config.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
index 6a2f766222a..fdf90d8956f 100644
--- a/src/mesa/main/config.h
+++ b/src/mesa/main/config.h
@@ -131,22 +131,22 @@
  * used almost everywhere else.
  */
 #define MAX_TEXTURE_UNITS ((MAX_TEXTURE_COORD_UNITS > MAX_TEXTURE_IMAGE_UNITS) 
? MAX_TEXTURE_COORD_UNITS : MAX_TEXTURE_IMAGE_UNITS)
 
 /** Maximum number of viewports supported with ARB_viewport_array */
 #define MAX_VIEWPORTS 16
 
 /** Maximum number of window rectangles supported with EXT_window_rectangles */
 #define MAX_WINDOW_RECTANGLES 8
 
-/** Maximum size for CVA.  May be overridden by the drivers.  */
-#define MAX_ARRAY_LOCK_SIZE 3000
+/** Default for GL_MAX_ELEMENTS_INDICES and GL_MAX_ELEMENTS_VERTICES.  */
+#define MAX_ARRAY_LOCK_SIZE (512 * 1024 * 1024)
 
 /** Subpixel precision for antialiasing, window coordinate snapping */
 #define SUB_PIXEL_BITS 4
 
 /** For GL_ARB_texture_compression */
 #define MAX_COMPRESSED_TEXTURE_FORMATS 25
 
 /** For GL_EXT_texture_filter_anisotropic */
 #define MAX_TEXTURE_MAX_ANISOTROPY 16.0
 
-- 
2.17.1

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


[Mesa-dev] [PATCH 01/14] mesa: remove incorrect change for EXT_disjoint_timer_query

2018-08-08 Thread Marek Olšák
From: Marek Olšák 

---
 src/mesa/main/queryobj.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 7547fa1bb4d..e97a0138e96 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -815,22 +815,21 @@ get_query_object(struct gl_context *ctx, const char *func,
if (_mesa_is_gles(ctx) &&
(pname != GL_QUERY_RESULT && pname != GL_QUERY_RESULT_AVAILABLE)) {
   _mesa_error(ctx, GL_INVALID_ENUM, "%s(%s)", func,
   _mesa_enum_to_string(pname));
   return;
}
 
if (buf && buf != ctx->Shared->NullBufferObj) {
   bool is_64bit = ptype == GL_INT64_ARB ||
  ptype == GL_UNSIGNED_INT64_ARB;
-  if (!ctx->Extensions.ARB_query_buffer_object &&
-  !ctx->Extensions.EXT_disjoint_timer_query) {
+  if (!ctx->Extensions.ARB_query_buffer_object) {
  _mesa_error(ctx, GL_INVALID_OPERATION, "%s(not supported)", func);
  return;
   }
   if (buf->Size < offset + 4 * (is_64bit ? 2 : 1)) {
  _mesa_error(ctx, GL_INVALID_OPERATION, "%s(out of bounds)", func);
  return;
   }
 
   if (offset < 0) {
  _mesa_error(ctx, GL_INVALID_VALUE, "%s(offset is negative)", func);
-- 
2.17.1

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


[Mesa-dev] [Bug 107530] [Regression] widgets rendered black in gtk

2018-08-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107530

Bug ID: 107530
   Summary: [Regression] widgets rendered black in gtk
   Product: Mesa
   Version: 18.1
  Hardware: Other
OS: All
Status: NEW
  Severity: normal
  Priority: medium
 Component: GLX
  Assignee: mesa-dev@lists.freedesktop.org
  Reporter: b...@0x83.eu
QA Contact: mesa-dev@lists.freedesktop.org

Created attachment 141014
  --> https://bugs.freedesktop.org/attachment.cgi?id=141014=edit
gtk-3 demo on mesa 18.1.5

Starting with mesa 18.1, every widget that's not a GtkGLArea gets shows up
black in a window containing a GtkGLArea. Gtk version is 3.22.30. Seems to be
specific to X11, doesn't happen on wayland. Last know good mesa version is
18.0.5. I tried to bisect, but the intermediate commits didn't build. GPU is an
intel HD 5500. People using other intel GPUs experienced identical behaviour.

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


Re: [Mesa-dev] [PATCH v2 10/11] intel: aubinator_viewer: store urb state during decoding

2018-08-08 Thread Lionel Landwerlin

On 08/08/18 21:55, Rafael Antognolli wrote:

t
@@ -790,6 +892,7 @@ aub_viewer_render_batch(struct aub_viewer_decode_ctx *ctx,
  
for (unsigned i = 0; i < ARRAY_SIZE(info_decoders); i++) {

   if (strcmp(inst_name, info_decoders[i].cmd_name) == 0) {
+ctx->stage = info_decoders[i].stage;
  info_decoders[i].decode(ctx, inst, p);
  break;

Looks like you run the info_decoders before the display decoders (even
though some of them decode the same type of instructions) because you
want to first do a pass storing all the information required for the
display_decoders, right?

And in this case, you also want to store the stage we are at, so when we
run the info_decoders that information is available.

Also, is there a chance we use these same info decoders for storing
other information than urb related stuff? If so, maybe we should just
call them handle_3ds_gs, handle_3ds_constant_vs, etc... Or something
along those lines. But of course we could just rename them in the
future.

The UI code (decode_* functions) run conditionally to the instruction 
having their fields visible (expanded by clicking on them).


info_decoders runs unconditionally so that we can have a consistent 
accumulated state that doesn't depend on the UI state.


For example, you might not want to display urb instructions & their 
content. Yet you still need to parse their content so that URB state can 
be displayed on a latter instruction (like 3DPRIMITIVE).



This is poorly named indeed and could be done more efficiently. This can 
be done later (once you get the hang of ImGui. It's really fun!).



-

Lionel

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


Re: [Mesa-dev] [PATCH v2 11/11] intel: aubinator_viewer: add urb view

2018-08-08 Thread Lionel Landwerlin

On 08/08/18 22:09, Rafael Antognolli wrote:

+ /* URB allocation */
+ hovered = _Hovered(mouse_pos, window_hovered, alloc_tl, alloc_br);
+ ImGui::ColorConvertHSVtoRGB((2 * s) * 1.0f / (2 * n_stages),
+ 1.0f, hovered ? 1.0f : 0.8f,
+ r, g, b);
+ draw_list->AddRectFilled(alloc_tl, alloc_br, ImColor(r, g, b));
+ if (hovered) {
+ImGui::SetTooltip("%s: start=%u end=%u",
+  stage_names[s],
+  stages[s].start,
+  stages[s].n_entries * stages[s].size);

Maybe you should add stages[s].start to the "end" case? It seems
a little inconsistent right now.

Other than that, and taking into account how much I understand about
imgui, consider this:

Reviewed-by: Rafael Antognolli


Oh indeed, my bad!

-

Lionel

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


[Mesa-dev] [Bug 107524] Broken packDouble2x32 at llvmpipe

2018-08-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107524

--- Comment #2 from Dave Airlie  ---
Having a piglit shader_runner example test for this would be nice, if you had
some time to make one.

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


Re: [Mesa-dev] [PATCH v3 1/4] nv50/ir: add preliminary support for OP_XMAD

2018-08-08 Thread Karol Herbst
On Mon, Jul 23, 2018 at 12:40 PM, Rhys Perry  wrote:
> Signed-off-by: Rhys Perry 
> ---
>  src/gallium/drivers/nouveau/codegen/nv50_ir.h  | 26 
> ++
>  .../drivers/nouveau/codegen/nv50_ir_peephole.cpp   | 18 +--
>  .../drivers/nouveau/codegen/nv50_ir_print.cpp  | 19 
>  .../drivers/nouveau/codegen/nv50_ir_target.cpp |  7 +++---
>  .../nouveau/codegen/nv50_ir_target_gm107.cpp   |  1 +
>  .../nouveau/codegen/nv50_ir_target_nv50.cpp|  1 +
>  .../nouveau/codegen/nv50_ir_target_nvc0.cpp| 15 +
>  7 files changed, 82 insertions(+), 5 deletions(-)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.h 
> b/src/gallium/drivers/nouveau/codegen/nv50_ir.h
> index 0b220cc48d..13822a08c3 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir.h
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.h
> @@ -58,6 +58,9 @@ enum operation
> OP_FMA,
> OP_SAD, // abs(src0 - src1) + src2
> OP_SHLADD,
> +   // extended multiply-add (GM107+), does a lot of things.
> +   // see envytools for detailed documentation
> +   OP_XMAD,
> OP_ABS,
> OP_NEG,
> OP_NOT,
> @@ -256,6 +259,29 @@ enum operation
>  #define NV50_IR_SUBOP_MINMAX_MED  2
>  #define NV50_IR_SUBOP_MINMAX_HIGH 3
>
> +// xmad(src0, src1, 0) << 16 + src2
> +#define NV50_IR_SUBOP_XMAD_PSL (1 << 0)
> +// (xmad(src0, src1, src2) & 0x) | (src1 << 16)
> +#define NV50_IR_SUBOP_XMAD_MRG (1 << 1)
> +// xmad(src0, src1, src2.lo)
> +#define NV50_IR_SUBOP_XMAD_CLO (1 << 2)
> +// xmad(src0, src1, src2.hi)
> +#define NV50_IR_SUBOP_XMAD_CHI (2 << 2)
> +// if both operands to the multiplication are non-zero, subtract 65536 for 
> each
> +// negative operand
> +#define NV50_IR_SUBOP_XMAD_CSFU (3 << 2)
> +// xmad(src0, src1, src2) + src1 << 16
> +#define NV50_IR_SUBOP_XMAD_CBCC (4 << 2)
> +#define NV50_IR_SUBOP_XMAD_CMODE_SHIFT 2
> +#define NV50_IR_SUBOP_XMAD_CMODE_MASK uint16_t(0x7 << 
> NV50_IR_SUBOP_XMAD_CMODE_SHIFT)
> +
> +// use the high 16 bits instead of the low 16 bits for the multiplication.
> +// if the instruction's sType is signed, sign extend the operand from 16 bits
> +// to 32 before multiplication.
> +#define NV50_IR_SUBOP_XMAD_H1_SHIFT 5
> +#define NV50_IR_SUBOP_XMAD_H1(i) (1 << (NV50_IR_SUBOP_XMAD_H1_SHIFT + (i)))
> +#define NV50_IR_SUBOP_XMAD_H1_MASK uint16_t(0x3 << 
> NV50_IR_SUBOP_XMAD_H1_SHIFT)

is the uint16_t really needed?

> +
>  enum DataType
>  {
> TYPE_NONE,
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp 
> b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
> index 16022e6f23..6deea7a360 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
> @@ -191,9 +191,17 @@ void
>  LoadPropagation::checkSwapSrc01(Instruction *insn)
>  {
> const Target *targ = prog->getTarget();
> -   if (!targ->getOpInfo(insn).commutative)
> -  if (insn->op != OP_SET && insn->op != OP_SLCT && insn->op != OP_SUB)
> +   if (!targ->getOpInfo(insn).commutative) {
> +  if (insn->op != OP_SET && insn->op != OP_SLCT &&
> +  insn->op != OP_SUB && insn->op != OP_XMAD)
>   return;
> +  // XMAD is only commutative if both the CBCC and MRG flags are not set.
> +  if (insn->op == OP_XMAD &&
> +  (insn->subOp & NV50_IR_SUBOP_XMAD_CMODE_MASK) == 
> NV50_IR_SUBOP_XMAD_CBCC)
> + return;
> +  if (insn->op == OP_XMAD && (insn->subOp & NV50_IR_SUBOP_XMAD_MRG))
> + return;
> +   }
> if (insn->src(1).getFile() != FILE_GPR)
>return;
> // This is the special OP_SET used for alphatesting, we can't reverse its
> @@ -236,6 +244,12 @@ LoadPropagation::checkSwapSrc01(Instruction *insn)
> if (insn->op == OP_SUB) {
>insn->src(0).mod = insn->src(0).mod ^ Modifier(NV50_IR_MOD_NEG);
>insn->src(1).mod = insn->src(1).mod ^ Modifier(NV50_IR_MOD_NEG);
> +   } else
> +   if (insn->op == OP_XMAD) {
> +  // swap h1 flags
> +  uint16_t h1 = (insn->subOp >> 1 & NV50_IR_SUBOP_XMAD_H1(0)) |
> +(insn->subOp << 1 & NV50_IR_SUBOP_XMAD_H1(1));
> +  insn->subOp = (insn->subOp & ~NV50_IR_SUBOP_XMAD_H1_MASK) | h1;
> }
>  }
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp 
> b/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp
> index ee3506fbae..7eab8b8d70 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp
> @@ -86,6 +86,7 @@ const char *operationStr[OP_LAST + 1] =
> "fma",
> "sad",
> "shladd",
> +   "xmad",
> "abs",
> "neg",
> "not",
> @@ -240,6 +241,11 @@ static const char *barOpStr[] =
> "sync", "arrive", "red and", "red or", "red popc"
>  };
>
> +static const char *xmadOpCModeStr[] =
> +{
> +   "clo", "chi", "csfu", "cbcc"
> +};
> +
>  static const char *DataTypeStr[] =
>  {
> "-",
> @@ -625,6 +631,19 @@ void 

Re: [Mesa-dev] [PATCH v2 07/11] intel: tools: aub_mem: reuse already mapped ppgtt buffers

2018-08-08 Thread Lionel Landwerlin

On 08/08/18 20:07, Rafael Antognolli wrote:

On Tue, Aug 07, 2018 at 06:35:18PM +0100, Lionel Landwerlin wrote:

When we map a PPGTT buffer into a continous address space of aubinator
to be able to inspect it, we currently add it to the list of BOs to
unmap once we're finished. An optimization we can apply it to look up
that list before trying to remap PPGTT buffers again (we already do
this for GGTT buffers).

We need to take some care before doing this because the list also
contains GGTT BOs. As GGTT & PPGTT are 2 different address spaces, we
can have matching addresses in both that point to different physical
locations.

So, before this change, we could have the same address for PPGTT and
GGTT on the map list, but they never clashed because we only added the
PPGTT ones at the end, and then unmapped them? Or was there something
else preventing them from conflicting?


Before this change we could get clashes when asking for a GGTT address 
and get a PPGTT one.
I think we got lucky so far because we use a very small amount of GGTT 
and that didn't happen.




This changes adds a flag on the elements of the list of mapped BOs to
differenciate between GGTT & PPGTT, which allows use to reuse that
list when looking up both address spaces.

Signed-off-by: Lionel Landwerlin 
---
  src/intel/tools/aub_mem.c | 16 +++-
  1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/intel/tools/aub_mem.c b/src/intel/tools/aub_mem.c
index 2d29386e57c..3d4dc8061bd 100644
--- a/src/intel/tools/aub_mem.c
+++ b/src/intel/tools/aub_mem.c
@@ -42,6 +42,7 @@ struct bo_map {
 struct list_head link;
 struct gen_batch_decode_bo bo;
 bool unmap_after_use;
+   bool ppgtt;
  };
  
  struct ggtt_entry {

@@ -59,10 +60,11 @@ struct phys_mem {
  };
  
  static void

-add_gtt_bo_map(struct aub_mem *mem, struct gen_batch_decode_bo bo, bool 
unmap_after_use)
+add_gtt_bo_map(struct aub_mem *mem, struct gen_batch_decode_bo bo, bool ppgtt, 
bool unmap_after_use)
  {
 struct bo_map *m = calloc(1, sizeof(*m));
  
+   m->ppgtt = ppgtt;

 m->bo = bo;
 m->unmap_after_use = unmap_after_use;
 list_add(>link, >maps);
@@ -190,7 +192,7 @@ aub_mem_local_write(void *_mem, uint64_t address,
.addr = address,
.size = size,
 };
-   add_gtt_bo_map(mem, bo, false);
+   add_gtt_bo_map(mem, bo, false, false);
  }
  
  void

@@ -253,7 +255,7 @@ aub_mem_get_ggtt_bo(void *_mem, uint64_t address)
 struct gen_batch_decode_bo bo = {0};
  
 list_for_each_entry(struct bo_map, i, >maps, link)

-  if (i->bo.addr <= address && i->bo.addr + i->bo.size > address)
+  if (!i->ppgtt && i->bo.addr <= address && i->bo.addr + i->bo.size > 
address)
   return i->bo;
  
 address &= ~0xfff;

@@ -292,7 +294,7 @@ aub_mem_get_ggtt_bo(void *_mem, uint64_t address)
assert(res != MAP_FAILED);
 }
  
-   add_gtt_bo_map(mem, bo, true);

+   add_gtt_bo_map(mem, bo, false, true);
  
 return bo;

  }
@@ -328,6 +330,10 @@ aub_mem_get_ppgtt_bo(void *_mem, uint64_t address)
 struct aub_mem *mem = _mem;
 struct gen_batch_decode_bo bo = {0};
  
+   list_for_each_entry(struct bo_map, i, >maps, link)

+  if (i->ppgtt && i->bo.addr <= address && i->bo.addr + i->bo.size > 
address)
+ return i->bo;
+
 address &= ~0xfff;
  
 if (!ppgtt_mapped(mem, mem->pml4, address))

@@ -353,7 +359,7 @@ aub_mem_get_ppgtt_bo(void *_mem, uint64_t address)
assert(res != MAP_FAILED);
 }
  
-   add_gtt_bo_map(mem, bo, true);

+   add_gtt_bo_map(mem, bo, true, true);
  
 return bo;

  }
--
2.18.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 v3] mesa: enable EXT_render_snorm extension

2018-08-08 Thread Nanley Chery
On Thu, Aug 02, 2018 at 02:14:31PM +0300, Tapani Pälli wrote:
> Patch sets additional formats renderable and enables the extension
> when OpenGL ES 3.1 is supported.
> 
> v2: instead of dummy_true, have a separate toggle for extension
> (Eric Anholt)
> 
> v3: add missing checks, simplify some existing checks and fix
> glCopyTexImage2D check (Nanley Chery)
> 
> add SHORT and BYTE support in read_pixels_es3_error_check
> 
> Signed-off-by: Tapani Pälli 
> ---
>  src/mesa/main/extensions_table.h |  1 +
>  src/mesa/main/fbobject.c | 31 +++
>  src/mesa/main/glformats.c|  9 +
>  src/mesa/main/mtypes.h   |  1 +
>  src/mesa/main/readpix.c  | 19 +++
>  src/mesa/main/teximage.c |  3 ++-
>  6 files changed, 55 insertions(+), 9 deletions(-)
> 
> diff --git a/src/mesa/main/extensions_table.h 
> b/src/mesa/main/extensions_table.h
> index 3f01896cae..c3a69b8987 100644
> --- a/src/mesa/main/extensions_table.h
> +++ b/src/mesa/main/extensions_table.h
> @@ -246,6 +246,7 @@ EXT(EXT_polygon_offset_clamp, 
> ARB_polygon_offset_clamp
>  EXT(EXT_primitive_bounding_box  , OES_primitive_bounding_box 
> ,  x ,  x ,  x ,  31, 2014)
>  EXT(EXT_provoking_vertex, EXT_provoking_vertex   
> , GLL, GLC,  x ,  x , 2009)
>  EXT(EXT_read_format_bgra, dummy_true 
> ,  x ,  x , ES1, ES2, 2009)
> +EXT(EXT_render_snorm, EXT_render_snorm   
> ,  x ,  x ,  x,   31, 2014)
>  EXT(EXT_rescale_normal  , dummy_true 
> , GLL,  x ,  x ,  x , 1997)
>  EXT(EXT_robustness  , KHR_robustness 
> ,  x,   x,   x , ES2, 2011)
>  EXT(EXT_secondary_color , dummy_true 
> , GLL,  x ,  x ,  x , 1999)
> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
> index cfe2174ef1..2534b1df29 100644
> --- a/src/mesa/main/fbobject.c
> +++ b/src/mesa/main/fbobject.c
> @@ -728,7 +728,15 @@ is_format_color_renderable(const struct gl_context *ctx, 
> mesa_format format,
>  
> /* Reject additional cases for GLES */
> switch (internalFormat) {
> +   case GL_R8_SNORM:
> +   case GL_RG8_SNORM:
> case GL_RGBA8_SNORM:
> +  return _mesa_has_EXT_render_snorm(ctx);
> +   case GL_R16_SNORM:
> +   case GL_RG16_SNORM:
> +   case GL_RGBA16_SNORM:
> +  return _mesa_has_EXT_texture_norm16(ctx) &&
> + _mesa_has_EXT_render_snorm(ctx);
> case GL_RGB32F:
> case GL_RGB32I:
> case GL_RGB32UI:
> @@ -741,8 +749,6 @@ is_format_color_renderable(const struct gl_context *ctx, 
> mesa_format format,
> case GL_SRGB8:
> case GL_RGB10:
> case GL_RGB9_E5:
> -   case GL_RG8_SNORM:
> -   case GL_R8_SNORM:
>return GL_FALSE;
> default:
>break;
> @@ -1997,25 +2003,34 @@ _mesa_base_fbo_format(const struct gl_context *ctx, 
> GLenum internalFormat)
>return ctx->API != API_OPENGLES && ctx->Extensions.ARB_texture_rg
>   ? GL_RG : 0;
> /* signed normalized texture formats */
> -   case GL_RED_SNORM:
> case GL_R8_SNORM:
> +  return _mesa_has_EXT_texture_snorm(ctx) || 
> _mesa_has_EXT_render_snorm(ctx)
> + ? GL_RED : 0;
> +   case GL_RED_SNORM:
> +  return _mesa_has_EXT_texture_snorm(ctx) ? GL_RED : 0;
> case GL_R16_SNORM:
> -  return _mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_snorm
> +  return _mesa_has_EXT_texture_snorm(ctx) || 
> _mesa_has_EXT_render_snorm(ctx)

Shouldn't the condition for R16, RG16, and RGBA16 be
_mesa_has_EXT_texture_snorm(ctx) ||
(_mesa_has_EXT_render_snorm(ctx) && _mesa_has_EXT_texture_norm16(ctx))
?

If so, with those changes applied, this series is
Reviewed-by: Nanley Chery 

>   ? GL_RED : 0;
> -   case GL_RG_SNORM:
> case GL_RG8_SNORM:
> +  return _mesa_has_EXT_texture_snorm(ctx) || 
> _mesa_has_EXT_render_snorm(ctx)
> + ? GL_RG : 0;
> +   case GL_RG_SNORM:
> +  _mesa_has_EXT_texture_snorm(ctx) ? GL_RG : 0;
> case GL_RG16_SNORM:
> -  return _mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_snorm
> +  return _mesa_has_EXT_texture_snorm(ctx) || 
> _mesa_has_EXT_render_snorm(ctx)
>   ? GL_RG : 0;
> case GL_RGB_SNORM:
> case GL_RGB8_SNORM:
> case GL_RGB16_SNORM:
>return _mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_snorm
>   ? GL_RGB : 0;
> -   case GL_RGBA_SNORM:
> case GL_RGBA8_SNORM:
> +  return _mesa_has_EXT_texture_snorm(ctx) || 
> _mesa_has_EXT_render_snorm(ctx)
> + ? GL_RGBA : 0;
> +   case GL_RGBA_SNORM:
> +  return _mesa_has_EXT_texture_snorm(ctx) ? GL_RGBA : 0;
> case GL_RGBA16_SNORM:
> -  return _mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_snorm
> +  return 

Re: [Mesa-dev] [PATCH v2 11/11] intel: aubinator_viewer: add urb view

2018-08-08 Thread Rafael Antognolli
On Tue, Aug 07, 2018 at 06:35:22PM +0100, Lionel Landwerlin wrote:
> This is available through a "Show URB" button on the 3DPRIMITIVE
> instructions.
> 
> Signed-off-by: Lionel Landwerlin 
> ---
>  src/intel/tools/aubinator_viewer.cpp   | 75 
>  src/intel/tools/aubinator_viewer_urb.h | 96 ++
>  2 files changed, 171 insertions(+)
>  create mode 100644 src/intel/tools/aubinator_viewer_urb.h
> 
> diff --git a/src/intel/tools/aubinator_viewer.cpp 
> b/src/intel/tools/aubinator_viewer.cpp
> index f306f99bca5..5f2d50f6e46 100644
> --- a/src/intel/tools/aubinator_viewer.cpp
> +++ b/src/intel/tools/aubinator_viewer.cpp
> @@ -219,6 +219,7 @@ update_mem_for_exec(struct aub_mem *mem, struct aub_file 
> *file, int exec_idx)
>  #include "imgui_impl_opengl3.h"
>  
>  #include "aubinator_viewer.h"
> +#include "aubinator_viewer_urb.h"
>  #include "imgui_memory_editor.h"
>  
>  struct window {
> @@ -267,6 +268,15 @@ struct shader_window {
> size_t shader_size;
>  };
>  
> +struct urb_window {
> +   struct window base;
> +
> +   uint32_t end_urb_offset;
> +   struct aub_decode_urb_stage_state urb_stages[AUB_DECODE_N_STAGE];
> +
> +   AubinatorViewerUrb urb_view;
> +};
> +
>  struct batch_window {
> struct window base;
>  
> @@ -389,6 +399,61 @@ new_shader_window(struct aub_mem *mem, uint64_t address, 
> const char *desc)
> return window;
>  }
>  
> +/* URB windows */
> +
> +static void
> +display_urb_window(struct window *win)
> +{
> +   struct urb_window *window = (struct urb_window *) win;
> +   static const char *stages[] = {
> +  [AUB_DECODE_STAGE_VS] = "VS",
> +  [AUB_DECODE_STAGE_HS] = "HS",
> +  [AUB_DECODE_STAGE_DS] = "DS",
> +  [AUB_DECODE_STAGE_GS] = "GS",
> +  [AUB_DECODE_STAGE_PS] = "PS",
> +  [AUB_DECODE_STAGE_CS] = "CS",
> +   };
> +
> +   ImGui::Text("URB allocation:");
> +   window->urb_view.DrawAllocation("##urb",
> +   ARRAY_SIZE(window->urb_stages),
> +   window->end_urb_offset,
> +   stages,
> +   >urb_stages[0]);
> +}
> +
> +static void
> +destroy_urb_window(struct window *win)
> +{
> +   struct urb_window *window = (struct urb_window *) win;
> +
> +   free(window);
> +}
> +
> +static struct urb_window *
> +new_urb_window(struct aub_viewer_decode_ctx *decode_ctx, uint64_t address)
> +{
> +   struct urb_window *window = xtzalloc(*window);
> +
> +   snprintf(window->base.name, sizeof(window->base.name),
> +"URB view (0x%lx)##%p", address, window);
> +
> +   list_inithead(>base.parent_link);
> +   window->base.position = ImVec2(-1, -1);
> +   window->base.size = ImVec2(700, 300);
> +   window->base.opened = true;
> +   window->base.display = display_urb_window;
> +   window->base.destroy = destroy_urb_window;
> +
> +   window->end_urb_offset = decode_ctx->end_urb_offset;
> +   memcpy(window->urb_stages, decode_ctx->urb_stages, 
> sizeof(window->urb_stages));
> +   window->urb_view = AubinatorViewerUrb();
> +
> +   list_addtail(>base.link, );
> +
> +   return window;
> +}
> +
>  /* Memory editor windows */
>  
>  static uint8_t
> @@ -581,6 +646,15 @@ batch_display_shader(void *user_data, const char 
> *shader_desc, uint64_t address)
> list_add(_window->base.parent_link, 
> >base.children_windows);
>  }
>  
> +static void
> +batch_display_urb(void *user_data, const struct aub_decode_urb_stage_state 
> *stages)
> +{
> +   struct batch_window *window = (struct batch_window *) user_data;
> +   struct urb_window *urb_window = new_urb_window(>decode_ctx, 0);
> +
> +   list_add(_window->base.parent_link, >base.children_windows);
> +}
> +
>  static void
>  batch_edit_address(void *user_data, uint64_t address, uint32_t len)
>  {
> @@ -740,6 +814,7 @@ new_batch_window(int exec_idx)
>NULL,
>window);
> window->decode_ctx.display_shader = batch_display_shader;
> +   window->decode_ctx.display_urb = batch_display_urb;
> window->decode_ctx.edit_address = batch_edit_address;
>  
> update_batch_window(window, false, exec_idx);
> diff --git a/src/intel/tools/aubinator_viewer_urb.h 
> b/src/intel/tools/aubinator_viewer_urb.h
> new file mode 100644
> index 000..6857bc20a8f
> --- /dev/null
> +++ b/src/intel/tools/aubinator_viewer_urb.h
> @@ -0,0 +1,96 @@
> +#ifndef AUBINATOR_VIEWER_URB_H
> +#define AUBINATOR_VIEWER_URB_H
> +
> +#include "aubinator_viewer.h"
> +
> +#include "imgui.h"
> +
> +struct AubinatorViewerUrb {
> +
> +   float RowHeight;
> +
> +   AubinatorViewerUrb() {
> +  RowHeight = 10.0f;
> +   }
> +
> +   bool _Hovered(const ImVec2& mouse, bool window_hovered,
> + const ImVec2& tl, const ImVec2& br) {
> +  return window_hovered &&
> + tl.x <= mouse.x && tl.y <= mouse.y &&
> + br.x > mouse.x && br.y > mouse.y;
> +   }
> +
> +   void DrawAllocation(const char *label,
> +  

Re: [Mesa-dev] [PATCH v2 10/11] intel: aubinator_viewer: store urb state during decoding

2018-08-08 Thread Rafael Antognolli
I'm not that familiar with this code yet, so take this review with a
grain of salt, but it looks good to me.

Reviewed-by: Rafael Antognolli 

Just a few comments below but nothing really important.

On Tue, Aug 07, 2018 at 06:35:21PM +0100, Lionel Landwerlin wrote:
> Signed-off-by: Lionel Landwerlin 
> ---
>  src/intel/tools/aubinator_viewer.h   |  26 
>  src/intel/tools/aubinator_viewer_decoder.cpp | 150 ---
>  2 files changed, 153 insertions(+), 23 deletions(-)
> 
> diff --git a/src/intel/tools/aubinator_viewer.h 
> b/src/intel/tools/aubinator_viewer.h
> index 2d89d9cf658..4a030efc0d0 100644
> --- a/src/intel/tools/aubinator_viewer.h
> +++ b/src/intel/tools/aubinator_viewer.h
> @@ -33,12 +33,35 @@ struct aub_viewer_decode_cfg {
>  show_dwords(true) {}
>  };
>  
> +enum aub_decode_stage {
> +   AUB_DECODE_STAGE_VS,
> +   AUB_DECODE_STAGE_HS,
> +   AUB_DECODE_STAGE_DS,
> +   AUB_DECODE_STAGE_GS,
> +   AUB_DECODE_STAGE_PS,
> +   AUB_DECODE_STAGE_CS,
> +   AUB_DECODE_N_STAGE,
> +};
> +
> +struct aub_decode_urb_stage_state {
> +   uint32_t start;
> +   uint32_t size;
> +   uint32_t n_entries;
> +
> +   uint32_t const_rd_length;
> +   uint32_t rd_offset;
> +   uint32_t rd_length;
> +   uint32_t wr_offset;
> +   uint32_t wr_length;
> +};
> +
>  struct aub_viewer_decode_ctx {
> struct gen_batch_decode_bo (*get_bo)(void *user_data, uint64_t address);
> unsigned (*get_state_size)(void *user_data,
>uint32_t offset_from_dynamic_state_base_addr);
>  
> void (*display_shader)(void *user_data, const char *shader_desc, uint64_t 
> address);
> +   void (*display_urb)(void *user_data, const struct 
> aub_decode_urb_stage_state *stages);
> void (*edit_address)(void *user_data, uint64_t address, uint32_t length);
>  
> void *user_data;
> @@ -53,6 +76,9 @@ struct aub_viewer_decode_ctx {
> uint64_t dynamic_base;
> uint64_t instruction_base;
>  
> +   enum aub_decode_stage stage;
> +   uint32_t end_urb_offset;
> +   struct aub_decode_urb_stage_state urb_stages[AUB_DECODE_N_STAGE];
>  };
>  
>  void aub_viewer_decode_ctx_init(struct aub_viewer_decode_ctx *ctx,
> diff --git a/src/intel/tools/aubinator_viewer_decoder.cpp 
> b/src/intel/tools/aubinator_viewer_decoder.cpp
> index a2ea3ba4a64..273bc2da376 100644
> --- a/src/intel/tools/aubinator_viewer_decoder.cpp
> +++ b/src/intel/tools/aubinator_viewer_decoder.cpp
> @@ -695,38 +695,125 @@ decode_load_register_imm(struct aub_viewer_decode_ctx 
> *ctx,
> }
>  }
>  
> +static void
> +decode_3dprimitive(struct aub_viewer_decode_ctx *ctx,
> +   struct gen_group *inst,
> +   const uint32_t *p)
> +{
> +   if (ctx->display_urb) {
> +  if (ImGui::Button("Show URB"))
> + ctx->display_urb(ctx->user_data, ctx->urb_stages);
> +   }
> +}
> +
> +static void
> +handle_urb(struct aub_viewer_decode_ctx *ctx,
> +   struct gen_group *inst,
> +   const uint32_t *p)
> +{
> +   struct gen_field_iterator iter;
> +   gen_field_iterator_init(, inst, p, 0, false);
> +   while (gen_field_iterator_next()) {
> +  if (strstr(iter.name, "URB Starting Address")) {
> + ctx->urb_stages[ctx->stage].start = iter.raw_value * 8192;
> +  } else if (strstr(iter.name, "URB Entry Allocation Size")) {
> + ctx->urb_stages[ctx->stage].size = (iter.raw_value + 1) * 64;
> +  } else if (strstr(iter.name, "Number of URB Entries")) {
> + ctx->urb_stages[ctx->stage].n_entries = iter.raw_value;
> +  }
> +   }
> +
> +   ctx->end_urb_offset = MAX2(ctx->urb_stages[ctx->stage].start +
> +  ctx->urb_stages[ctx->stage].n_entries *
> +  ctx->urb_stages[ctx->stage].size,
> +  ctx->end_urb_offset);
> +}
> +
> +static void
> +handle_urb_read(struct aub_viewer_decode_ctx *ctx,
> +struct gen_group *inst,
> +const uint32_t *p)
> +{
> +   struct gen_field_iterator iter;
> +   gen_field_iterator_init(, inst, p, 0, false);
> +   while (gen_field_iterator_next()) {
> +  /* Workaround the "Force * URB Entry Read Length" fields */
> +  if (iter.end_bit - iter.start_bit < 2)
> + continue;
> +
> +  if (strstr(iter.name, "URB Entry Read Offset")) {
> + ctx->urb_stages[ctx->stage].rd_offset = iter.raw_value * 32;
> +  } else if (strstr(iter.name, "URB Entry Read Length")) {
> + ctx->urb_stages[ctx->stage].rd_length = iter.raw_value * 32;
> +  } else if (strstr(iter.name, "URB Entry Output Read Offset")) {
> + ctx->urb_stages[ctx->stage].wr_offset = iter.raw_value * 32;
> +  } else if (strstr(iter.name, "URB Entry Output Length")) {
> + ctx->urb_stages[ctx->stage].wr_length = iter.raw_value * 32;
> +  }
> +   }
> +}
> +
> +static void
> +handle_urb_constant(struct aub_viewer_decode_ctx *ctx,
> +struct gen_group *inst,
> +const uint32_t *p)
> 

Re: [Mesa-dev] [PATCH v2 07/11] intel: tools: aub_mem: reuse already mapped ppgtt buffers

2018-08-08 Thread Rafael Antognolli
On Tue, Aug 07, 2018 at 06:35:18PM +0100, Lionel Landwerlin wrote:
> When we map a PPGTT buffer into a continous address space of aubinator
> to be able to inspect it, we currently add it to the list of BOs to
> unmap once we're finished. An optimization we can apply it to look up
> that list before trying to remap PPGTT buffers again (we already do
> this for GGTT buffers).
> 
> We need to take some care before doing this because the list also
> contains GGTT BOs. As GGTT & PPGTT are 2 different address spaces, we
> can have matching addresses in both that point to different physical
> locations.

So, before this change, we could have the same address for PPGTT and
GGTT on the map list, but they never clashed because we only added the
PPGTT ones at the end, and then unmapped them? Or was there something
else preventing them from conflicting?

> This changes adds a flag on the elements of the list of mapped BOs to
> differenciate between GGTT & PPGTT, which allows use to reuse that
> list when looking up both address spaces.
> 
> Signed-off-by: Lionel Landwerlin 
> ---
>  src/intel/tools/aub_mem.c | 16 +++-
>  1 file changed, 11 insertions(+), 5 deletions(-)
> 
> diff --git a/src/intel/tools/aub_mem.c b/src/intel/tools/aub_mem.c
> index 2d29386e57c..3d4dc8061bd 100644
> --- a/src/intel/tools/aub_mem.c
> +++ b/src/intel/tools/aub_mem.c
> @@ -42,6 +42,7 @@ struct bo_map {
> struct list_head link;
> struct gen_batch_decode_bo bo;
> bool unmap_after_use;
> +   bool ppgtt;
>  };
>  
>  struct ggtt_entry {
> @@ -59,10 +60,11 @@ struct phys_mem {
>  };
>  
>  static void
> -add_gtt_bo_map(struct aub_mem *mem, struct gen_batch_decode_bo bo, bool 
> unmap_after_use)
> +add_gtt_bo_map(struct aub_mem *mem, struct gen_batch_decode_bo bo, bool 
> ppgtt, bool unmap_after_use)
>  {
> struct bo_map *m = calloc(1, sizeof(*m));
>  
> +   m->ppgtt = ppgtt;
> m->bo = bo;
> m->unmap_after_use = unmap_after_use;
> list_add(>link, >maps);
> @@ -190,7 +192,7 @@ aub_mem_local_write(void *_mem, uint64_t address,
>.addr = address,
>.size = size,
> };
> -   add_gtt_bo_map(mem, bo, false);
> +   add_gtt_bo_map(mem, bo, false, false);
>  }
>  
>  void
> @@ -253,7 +255,7 @@ aub_mem_get_ggtt_bo(void *_mem, uint64_t address)
> struct gen_batch_decode_bo bo = {0};
>  
> list_for_each_entry(struct bo_map, i, >maps, link)
> -  if (i->bo.addr <= address && i->bo.addr + i->bo.size > address)
> +  if (!i->ppgtt && i->bo.addr <= address && i->bo.addr + i->bo.size > 
> address)
>   return i->bo;
>  
> address &= ~0xfff;
> @@ -292,7 +294,7 @@ aub_mem_get_ggtt_bo(void *_mem, uint64_t address)
>assert(res != MAP_FAILED);
> }
>  
> -   add_gtt_bo_map(mem, bo, true);
> +   add_gtt_bo_map(mem, bo, false, true);
>  
> return bo;
>  }
> @@ -328,6 +330,10 @@ aub_mem_get_ppgtt_bo(void *_mem, uint64_t address)
> struct aub_mem *mem = _mem;
> struct gen_batch_decode_bo bo = {0};
>  
> +   list_for_each_entry(struct bo_map, i, >maps, link)
> +  if (i->ppgtt && i->bo.addr <= address && i->bo.addr + i->bo.size > 
> address)
> + return i->bo;
> +
> address &= ~0xfff;
>  
> if (!ppgtt_mapped(mem, mem->pml4, address))
> @@ -353,7 +359,7 @@ aub_mem_get_ppgtt_bo(void *_mem, uint64_t address)
>assert(res != MAP_FAILED);
> }
>  
> -   add_gtt_bo_map(mem, bo, true);
> +   add_gtt_bo_map(mem, bo, true, true);
>  
> return bo;
>  }
> -- 
> 2.18.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] Revert "intel/nir: Call nir_lower_io_to_scalar_early"

2018-08-08 Thread Jason Ekstrand
Commit 4434591bf56a6b0 caused substantially more URB messages in
geometry and tessellation shaders.  Before we can really enable this
sort of optimization,  We either need some way of combining them back
together into vectors or we need to do cross-stage vector element
elimination without splitting everything into scalars.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107510
---
 src/intel/compiler/brw_nir.c | 17 +
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c
index 31ffbe613ec..29ad68fdb2a 100644
--- a/src/intel/compiler/brw_nir.c
+++ b/src/intel/compiler/brw_nir.c
@@ -713,18 +713,6 @@ brw_nir_link_shaders(const struct brw_compiler *compiler,
nir_validate_shader(*producer);
nir_validate_shader(*consumer);
 
-   const bool p_is_scalar =
-  compiler->scalar_stage[(*producer)->info.stage];
-   const bool c_is_scalar =
-  compiler->scalar_stage[(*consumer)->info.stage];
-
-   if (p_is_scalar && c_is_scalar) {
-  NIR_PASS_V(*producer, nir_lower_io_to_scalar_early, nir_var_shader_out);
-  NIR_PASS_V(*consumer, nir_lower_io_to_scalar_early, nir_var_shader_in);
-  *producer = brw_nir_optimize(*producer, compiler, p_is_scalar);
-  *consumer = brw_nir_optimize(*consumer, compiler, c_is_scalar);
-   }
-
NIR_PASS_V(*producer, nir_remove_dead_variables, nir_var_shader_out);
NIR_PASS_V(*consumer, nir_remove_dead_variables, nir_var_shader_in);
 
@@ -741,7 +729,12 @@ brw_nir_link_shaders(const struct brw_compiler *compiler,
   NIR_PASS_V(*consumer, nir_lower_indirect_derefs,
  brw_nir_no_indirect_mask(compiler, (*consumer)->info.stage));
 
+  const bool p_is_scalar =
+ compiler->scalar_stage[(*producer)->info.stage];
   *producer = brw_nir_optimize(*producer, compiler, p_is_scalar);
+
+  const bool c_is_scalar =
+ compiler->scalar_stage[(*consumer)->info.stage];
   *consumer = brw_nir_optimize(*consumer, compiler, c_is_scalar);
}
 }
-- 
2.17.1

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


Re: [Mesa-dev] [PATCH v3 14/48] meson: Make shader-cache a trillean instead of boolean

2018-08-08 Thread Dylan Baker
Quoting Eric Anholt (2018-08-07 10:58:52)
> Dylan Baker  writes:
> 
> > So that it can be implicitly disabled on windows, where it doesn't
> > compile.
> 
> I don't see how this option successfully controls the shader cache being
> built.

The entire shader cache code in src/util/disk_cache.[ch] is guarded in "#ifdef
ENABLE_SHADER_CACHE", so if we don't define that then the shader_cache is
disabled.

> Also the "elif with_dri_i965 and get_option('shader-cache')"
> looks like it needs to get updated for the trillian, too.

Fixed locally


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


Re: [Mesa-dev] [PATCH v2 05/11] intel: tools: create libaub

2018-08-08 Thread Rafael Antognolli
Reviewed-by: Rafael Antognolli 

On Tue, Aug 07, 2018 at 06:35:16PM +0100, Lionel Landwerlin wrote:
> Signed-off-by: Lionel Landwerlin 
> ---
>  src/intel/tools/meson.build | 14 --
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/src/intel/tools/meson.build b/src/intel/tools/meson.build
> index d749a80afed..258bf7011b3 100644
> --- a/src/intel/tools/meson.build
> +++ b/src/intel/tools/meson.build
> @@ -18,12 +18,22 @@
>  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
> THE
>  # SOFTWARE.
>  
> +
> +libaub = static_library(
> +  'aub',
> +  files('aub_read.c', 'aub_mem.c'),
> +  include_directories : [inc_common, inc_intel],
> +  link_with : [libintel_common, libintel_dev, libmesa_util],
> +  c_args : [c_vis_args, no_override_init_args],
> +  install : false
> +)
> +
>  aubinator = executable(
>'aubinator',
> -  files('aubinator.c', 'intel_aub.h', 'aub_read.h', 'aub_read.c', 
> 'aub_mem.h', 'aub_mem.c'),
> +  files('aubinator.c'),
>dependencies : [dep_expat, dep_zlib, dep_dl, dep_thread, dep_m],
>include_directories : [inc_common, inc_intel],
> -  link_with : [libintel_common, libintel_compiler, libintel_dev, 
> libmesa_util],
> +  link_with : [libintel_common, libintel_compiler, libintel_dev, 
> libmesa_util, libaub],
>c_args : [c_vis_args, no_override_init_args],
>build_by_default : true,
>install : true
> -- 
> 2.18.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] intel: Switch the order of the 2x MSAA sample positions

2018-08-08 Thread Jason Ekstrand
The Vulkan 1.1.82 spec flipped the order to better match D3D.

Cc: mesa-sta...@lists.freedesktop.org
---
 src/intel/blorp/blorp_blit.c   | 11 ++-
 src/intel/common/gen_sample_positions.h|  8 
 src/mesa/drivers/dri/i965/brw_multisample_state.h  |  8 
 src/mesa/drivers/dri/i965/gen6_multisample_state.c |  4 ++--
 4 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
index 561897894c3..013f7a14fa2 100644
--- a/src/intel/blorp/blorp_blit.c
+++ b/src/intel/blorp/blorp_blit.c
@@ -776,6 +776,13 @@ blorp_nir_manual_blend_bilinear(nir_builder *b, 
nir_ssa_def *pos,
* grid of samples with in a pixel. Sample number layout shows the
* rectangular grid of samples roughly corresponding to the real sample
* locations with in a pixel.
+   *
+   * In the case of 2x MSAA, the layout of sample indices is reversed from
+   * the layout of sample numbers:
+   *   -
+   *   | 1 | 0 |
+   *   -
+   *
* In case of 4x MSAA, layout of sample indices matches the layout of
* sample numbers:
*   -
@@ -819,7 +826,9 @@ blorp_nir_manual_blend_bilinear(nir_builder *b, nir_ssa_def 
*pos,
 key->x_scale * key->y_scale));
   sample = nir_f2i32(b, sample);
 
-  if (tex_samples == 8) {
+  if (tex_samples == 2) {
+ sample = nir_isub(b, nir_imm_int(b, 1), sample);
+  } else if (tex_samples == 8) {
  sample = nir_iand(b, nir_ishr(b, nir_imm_int(b, 0x64210573),
nir_ishl(b, sample, nir_imm_int(b, 2))),
nir_imm_int(b, 0xf));
diff --git a/src/intel/common/gen_sample_positions.h 
b/src/intel/common/gen_sample_positions.h
index f0ce95dd1fb..da48dcb5ed0 100644
--- a/src/intel/common/gen_sample_positions.h
+++ b/src/intel/common/gen_sample_positions.h
@@ -42,10 +42,10 @@ prefix##0YOffset   = 0.5;
  * c   1
  */
 #define GEN_SAMPLE_POS_2X(prefix) \
-prefix##0XOffset   = 0.25; \
-prefix##0YOffset   = 0.25; \
-prefix##1XOffset   = 0.75; \
-prefix##1YOffset   = 0.75;
+prefix##0XOffset   = 0.75; \
+prefix##0YOffset   = 0.75; \
+prefix##1XOffset   = 0.25; \
+prefix##1YOffset   = 0.25;
 
 /**
  * Sample positions:
diff --git a/src/mesa/drivers/dri/i965/brw_multisample_state.h 
b/src/mesa/drivers/dri/i965/brw_multisample_state.h
index 6cf324e561c..2142a17a484 100644
--- a/src/mesa/drivers/dri/i965/brw_multisample_state.h
+++ b/src/mesa/drivers/dri/i965/brw_multisample_state.h
@@ -38,13 +38,13 @@
 /**
  * 1x MSAA has a single sample at the center: (0.5, 0.5) -> (0x8, 0x8).
  *
- * 2x MSAA sample positions are (0.25, 0.25) and (0.75, 0.75):
+ * 2x MSAA sample positions are (0.75, 0.75) and (0.25, 0.25):
  *   4 c
- * 4 0
- * c   1
+ * 4 1
+ * c   0
  */
 static const uint32_t
-brw_multisample_positions_1x_2x = 0x0088cc44;
+brw_multisample_positions_1x_2x = 0x008844cc;
 
 /**
  * Sample positions:
diff --git a/src/mesa/drivers/dri/i965/gen6_multisample_state.c 
b/src/mesa/drivers/dri/i965/gen6_multisample_state.c
index bfa84fb9b77..78ff3942075 100644
--- a/src/mesa/drivers/dri/i965/gen6_multisample_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_multisample_state.c
@@ -70,7 +70,7 @@ gen6_get_sample_position(struct gl_context *ctx,
  *
  * 2X MSAA sample index / number layout
  *   -
- *   | 0 | 1 |
+ *   | 1 | 0 |
  *   -
  *
  * 4X MSAA sample index / number layout
@@ -107,7 +107,7 @@ gen6_get_sample_position(struct gl_context *ctx,
 void
 gen6_set_sample_maps(struct gl_context *ctx)
 {
-   uint8_t map_2x[2] = {0, 1};
+   uint8_t map_2x[2] = {1, 0};
uint8_t map_4x[4] = {0, 1, 2, 3};
uint8_t map_8x[8] = {3, 7, 5, 0, 1, 2, 4, 6};
uint8_t map_16x[16] = { 15, 10, 9, 7, 4, 1, 3, 13,
-- 
2.17.1

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


[Mesa-dev] [Bug 106394] Black Mesa cannot compile shaders because of missing GL_EXT_gpu_shader4

2018-08-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=106394

--- Comment #6 from b...@besd.de  ---
While the patches allow the non-beta and beta version of Black-Mesa to start, I
still get out of memory errors for both.
The beta version does this right after you select to start a new game (in the
loading game data stage), the non-beta version only allows to select the lowest
graphics options (otherwise crashes) and then runs out of memory sometime after
you put on the hazmat suit and go down the elevators.

I had a similar effect when modifying the shaders so they would just compile
without caring whether they actually work.

So while this is a significant improvement (thanks Marek!) I think there is
still some memory leak, dont know where though system memory looks fine at
first glance.

This is the first time I got the 32-bit drivers to compile, but for comparison:
Bioshock Infinite runs fine on ultra settings.

-- 
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


[Mesa-dev] [Bug 107524] Broken packDouble2x32 at llvmpipe

2018-08-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107524

Roland Scheidegger  changed:

   What|Removed |Added

 CC||airl...@freedesktop.org

--- Comment #1 from Roland Scheidegger  ---
I think your analysis is correct, gallivm code cannot handle this (I believe it
should work with softpipe?).
I'm not too familiar with the double support, in particular I'm not entirely
sure if such swizzles are even supposed to be supported for double opcodes,
though I don't really see a compelling reason why not (otherwise could of
course always get rid of them with a mov).
But at a quick glance, lp_build_tgsi_inst_llvm() will ignore the second and
fourth channel when fetching the arguments, emit_fetch_temporary() and others
will instead for 64bit src do a second fetch themselves, however they will
always use swizzle + 1 for it. This probably means that when the swizzle is .yx
it will instead actually fetch .yz for the double src (if you'd try .wz I think
you'd get an assertion failure).
I don't quite know how to fix this in some elegant way (as those fetch args are
propagated through lots of function, so those emit_fetch_temporary() and
friends functions simply have no knowledge what the second channel actually
should be for 64bit opcodes). Maybe Dave has some idea? I think one way or
another (at least if such swizzles are considered valid), the swizzle for the
second source has to be propagated through explicitly.

-- 
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] egl/wayland: do not leak wl_buffer when it is locked

2018-08-08 Thread Daniel Stone
Hi Juan,

On Wed, 8 Aug 2018 at 17:40, Juan A. Suarez Romero  wrote:
> On Wed, 2018-08-08 at 17:21 +0100, Daniel Stone wrote:
> > On Thu, 2 Aug 2018 at 10:02, Juan A. Suarez Romero  
> > wrote:
> > > If color buffer is locked, do not set its wayland buffer to NULL;
> > > otherwise it can not be freed later.
> >
> > It can: see the 'if (i == ARRAY_SIZE(...))' branch inside wl_buffer_release.
>
> I think I didn't explain wrongly :)
>
> If color buffer is locked, we set color_buffer.wl_buffer to NULL, and thus we
> can't free wl_buffer later.

If a surface is resized, we will orphan all its wl_buffers by clearing
their pointers to NULL, hence losing the ability to directly free
them. But when a new buffer has been attached and displayed, a
'release' event will be delivered for the old buffer (handled by
wl_buffer_release as an event listener), which will detect that the
wl_buffer is not in the list and should be immediately destroyed.

In fact, I have to rescind my R-b since I'm pretty sure this breaks resizing:
  - buffer 1 is allocated with original size, committed to server
(locked == true)
  - user resizes surface, release_buffers() is called but leaves
wl_buffer intact in color_buffers list
  - buffers 2..4 are allocated with new size and committed to server
(locked == true)
  - release event for buffer 1 is delivered, locked = false
  - get_back_bo() finds buffer 1 has a wl_buffer and is not locked,
but dri_image is NULL so a new image is created
  - swap_buffers_with_damage() finds buffer 1 (with new DRIimage)
still has wl_buffer (old) and attaches that buffer

So we need to either find a way to still destroy the wl_buffer inside
wl_buffer_release(), or at least do it later, e.g. in get_back_bo().

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


Re: [Mesa-dev] [PATCH] egl/wayland: do not leak wl_buffer when it is locked

2018-08-08 Thread Juan A. Suarez Romero
On Wed, 2018-08-08 at 18:39 +0200, Juan A. Suarez Romero wrote:
> On Wed, 2018-08-08 at 17:21 +0100, Daniel Stone wrote:
> > Hi Juan,
> > 
> > On Thu, 2 Aug 2018 at 10:02, Juan A. Suarez Romero  
> > wrote:
> > > If color buffer is locked, do not set its wayland buffer to NULL;
> > > otherwise it can not be freed later.
> > 
> > It can: see the 'if (i == ARRAY_SIZE(...))' branch inside wl_buffer_release.
> 
> I think I didn't explain wrongly :)

I mean, I explained it wrongly :D


> 
> If color buffer is locked, we set color_buffer.wl_buffer to NULL, and thus we
> can't free wl_buffer later.
> 
> > 
> > > This also fixes dEQP-EGL.functional.swap_buffers_with_damage.* tests.
> > 
> > How does it fix them? Is it just leaks, or is there a functional difference?
> 
> Besides this wl_buffer leak, the tests crashes. Found out that fixing the leak
> the crash goes away.
> 
> > 
> > > --- a/src/egl/drivers/dri2/platform_wayland.c
> > > +++ b/src/egl/drivers/dri2/platform_wayland.c
> > > @@ -412,8 +412,11 @@ dri2_wl_release_buffers(struct dri2_egl_surface 
> > > *dri2_surf)
> > > 
> > > for (int i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
> > >if (dri2_surf->color_buffers[i].wl_buffer &&
> > > -  !dri2_surf->color_buffers[i].locked)
> > > +  !dri2_surf->color_buffers[i].locked) {
> > >   wl_buffer_destroy(dri2_surf->color_buffers[i].wl_buffer);
> > > + dri2_surf->color_buffers[i].wl_buffer = NULL;
> > > +  }
> > > +
> > >if (dri2_surf->color_buffers[i].dri_image)
> > >   
> > > dri2_dpy->image->destroyImage(dri2_surf->color_buffers[i].dri_image);
> > >if (dri2_surf->color_buffers[i].linear_copy)
> > > @@ -422,11 +425,9 @@ dri2_wl_release_buffers(struct dri2_egl_surface 
> > > *dri2_surf)
> > >   munmap(dri2_surf->color_buffers[i].data,
> > >  dri2_surf->color_buffers[i].data_size);
> > > 
> > > -  dri2_surf->color_buffers[i].wl_buffer = NULL;
> > >dri2_surf->color_buffers[i].dri_image = NULL;
> > >dri2_surf->color_buffers[i].linear_copy = NULL;
> > >dri2_surf->color_buffers[i].data = NULL;
> > > -  dri2_surf->color_buffers[i].locked = false;
> > 
> > So in this case, we still occupy a slot with (wl_buffer != NULL &&
> > locked == true) when we resize a surface when an old buffer is still
> > locked.
> > 
> > I _think_ the main functional difference is that the buffer is now
> > destroyed inside dri2_wl_destroy_surface() when the surface is
> > destroyed, even if it is locked. Destroying a surface with a locked
> > buffer is bad: calling wl_buffer_destroy() may provoke a fatal
> > protocol error, as destroying whilst still in use is illegal. On the
> > other hand, destroying the event queue without destroying the object
> > may cause a use-after-free later when the event does arrive, if the
> > connection is still alive (we should make that an assert really).
> > 
> > On the balance of things, I think destroying the buffer immediately
> > (running the risk of a protocol error), is less bad. It would be even
> > better if we could rely on clients to have destroyed their
> > surface-wrapper object (causing all buffers to be released) by the
> > time they destroy their EGLSurface, but that's of course never going
> > to happen. So, assuming there's no unexpected consequences I haven't
> > seen, this is:
> > Reviewed-by: Daniel Stone 
> > 
> 
> I understand this patch does not require any further work, right? Except
> clarifying the commit messsage as explaining above.
> 
> 
> > Cheers,
> > Daniel
> > 
> 
> ___
> 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 10/11] mesa: expose EXT_texture_buffer_object

2018-08-08 Thread Emil Velikov
On 8 August 2018 at 17:29, Marek Olšák  wrote:
> On Wed, Aug 8, 2018 at 12:17 PM, Emil Velikov  
> wrote:
>> On 8 August 2018 at 12:04, Emil Velikov  wrote:
>>> On 8 August 2018 at 06:42, Marek Olšák  wrote:
 From: Marek Olšák 

 This is needed for exposing the samplerBuffer functions under
 EXT_gpu_shader4.

 glTexBufferEXT is defined in glapi, but "make check" fails.
 What am I doing wrong?
>>> There should be one in src/mapi/glapi/gen/
>>> One of these days we should stop rolling our own and use the canonical
>>> registry/gl.xlm
>>>
>>> Until then, make a separate xml file - see for example
>>> a0d6732182ee62834993187e8cbd84fa4e03d786
>>>
>> To elaborate a bit:
>>
>> Here you're adding the desktop GL extension EXT_texture_buffer_object.
>> Where currently we have only the ES one EXT_texture_buffer in
>> es_EXT.xml.
>> Hence the aliasing you have in there will be applicable only for GLES,
>> and for said extension.
>>
>> That is, unless I'm completely loosing my marbles ;-)
>
> All XML files are included by gl_and_es_API.xml, so they are merged.
> As far as I can see, the XML files don't have the option to expose
> functions in ES only. apiexec.py can do it, but not for aliases like
> glTexBufferEXT, i.e. if glTexBuffer is available in the API, all its
> aliases are also available (ARB, EXT, OES).
>
Interesting - was under the impression that only "es" allias will be created.

Thanks for the correction.
Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 0/3] Use GitLab CI to build Mesa

2018-08-08 Thread Daniel Stone
Hi Juan,

On Wed, 8 Aug 2018 at 16:45, Juan A. Suarez Romero  wrote:
> This is a first part of a more complete proposal to use GitLab CI to build and
> test Mesa. This first part just adds the required pieces to build Mesa, using 
> the
> different supported tools (meson, autotools, and scons).

This is great - I'm super excited to see it happen!

> Unfortunately, Rocker is a tool that is not maintained anymore
> (https://github.com/grammarly/rocker). We still use it because it provides
> everything we need, and fortunately we don't need any more features.
>
> Maybe there are other alternatives out there, but we were happy with this and
> hence our proposal. If we want to use Docker rather than Rocker, then we could
> use template tools like Jinja, and forget about caching during build, which 
> will
> impact on the build time.

This bit is a bit concerning, especially since it makes CI harder to
approach for people who might want to work on it. There are quite a
few alternate tools (buildah comes to mind, as well as umoci/skopeo)
which might end up being better, particularly for scriptability. But
I'm not volunteering to do that work, so take this with a grain of
salt!

> ## Involved stages
>
> The dependencies required to build Mesa doesn't change very frequently, so
> building them everytime is a waste of time. As Docker allows to create images
> based on the content of other images, we have defined the setup in several
> stages.
>
> On a first stage a "base" image is built. This image contains almost all the
> dependencies required to build Mesa. Worth to mention that libdrm is excluded
> here, as this is a dependency that really changes quite frequently, so we
> postpone the installation for further stages.
>
> One we have the "base" image, we create different images with the different 
> LLVM
> compilers. This ensure that when using a specific image we only have that LLVM
> version, and not any other.
>
> An important point here is that, these builts appears in the pipeline, they 
> are
> not actually built if not required. That is, in the case of the base image, if
> the Rockerfile used to create the image has changed with respect to the one 
> used
> to create the image that is already in the registry, then the image is rebuilt
> (as this means something changed, very likely some dependency). But if the
> Rockerfile didn't change, then there is no need to rebuild the image, and just
> keep using the one already in the registry. This is also done for the LLVM
> images. This helps to improve the speed, as most of the times they don't need 
> to
> be built again.

It would be nice to have a GitLab CI variable which can be used to
force rebuilds of these regardless.

> The third stage is the one that builds Mesa itself. Here we just define which
> tool to use and which LLVM version. This is done by passing the right 
> parameters
> to the `rocker build` tool. It will pick the right base image, install the
> missing dependencies (mainly, libdrm), select which drivers should be built
> (based on the LLVM version and parsing the configure.ac file), and create the
> image.

You can eke out a little bit of a speed improvement by using the
go-faster runes from before 'apt-get update' here:
https://gitlab.freedesktop.org/wayland/weston/blob/master/.gitlab-ci.yml#L6

Anyway, this all looks great, and I'm really excited to see it! The series is:
Acked-by: Daniel Stone 

... but please do not deploy it just yet. Right now we only have a
single CI runner for all of fd.o, which is a pretty elderly (SNB?)
Xeon, on a different continent from our GitLab instance. The network
is chokingly bad, but even if it weren't we'd be bottlenecked on
machine time. I'm working around to try to find sponsorship to get us
some more runners, located in decent data centres in the US, and will
let you know as soon as anything happens there. In the meantime, if
you have any ideas or know any people who would be interested in
sponsoring runners (very ideally US-based) or just covering the bill
for time on cloud VMs, please let me know!

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


Re: [Mesa-dev] [PATCH] egl/wayland: do not leak wl_buffer when it is locked

2018-08-08 Thread Juan A. Suarez Romero
On Wed, 2018-08-08 at 17:21 +0100, Daniel Stone wrote:
> Hi Juan,
> 
> On Thu, 2 Aug 2018 at 10:02, Juan A. Suarez Romero  
> wrote:
> > If color buffer is locked, do not set its wayland buffer to NULL;
> > otherwise it can not be freed later.
> 
> It can: see the 'if (i == ARRAY_SIZE(...))' branch inside wl_buffer_release.

I think I didn't explain wrongly :)

If color buffer is locked, we set color_buffer.wl_buffer to NULL, and thus we
can't free wl_buffer later.

> 
> > This also fixes dEQP-EGL.functional.swap_buffers_with_damage.* tests.
> 
> How does it fix them? Is it just leaks, or is there a functional difference?

Besides this wl_buffer leak, the tests crashes. Found out that fixing the leak
the crash goes away.

> 
> > --- a/src/egl/drivers/dri2/platform_wayland.c
> > +++ b/src/egl/drivers/dri2/platform_wayland.c
> > @@ -412,8 +412,11 @@ dri2_wl_release_buffers(struct dri2_egl_surface 
> > *dri2_surf)
> > 
> > for (int i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
> >if (dri2_surf->color_buffers[i].wl_buffer &&
> > -  !dri2_surf->color_buffers[i].locked)
> > +  !dri2_surf->color_buffers[i].locked) {
> >   wl_buffer_destroy(dri2_surf->color_buffers[i].wl_buffer);
> > + dri2_surf->color_buffers[i].wl_buffer = NULL;
> > +  }
> > +
> >if (dri2_surf->color_buffers[i].dri_image)
> >   
> > dri2_dpy->image->destroyImage(dri2_surf->color_buffers[i].dri_image);
> >if (dri2_surf->color_buffers[i].linear_copy)
> > @@ -422,11 +425,9 @@ dri2_wl_release_buffers(struct dri2_egl_surface 
> > *dri2_surf)
> >   munmap(dri2_surf->color_buffers[i].data,
> >  dri2_surf->color_buffers[i].data_size);
> > 
> > -  dri2_surf->color_buffers[i].wl_buffer = NULL;
> >dri2_surf->color_buffers[i].dri_image = NULL;
> >dri2_surf->color_buffers[i].linear_copy = NULL;
> >dri2_surf->color_buffers[i].data = NULL;
> > -  dri2_surf->color_buffers[i].locked = false;
> 
> So in this case, we still occupy a slot with (wl_buffer != NULL &&
> locked == true) when we resize a surface when an old buffer is still
> locked.
> 
> I _think_ the main functional difference is that the buffer is now
> destroyed inside dri2_wl_destroy_surface() when the surface is
> destroyed, even if it is locked. Destroying a surface with a locked
> buffer is bad: calling wl_buffer_destroy() may provoke a fatal
> protocol error, as destroying whilst still in use is illegal. On the
> other hand, destroying the event queue without destroying the object
> may cause a use-after-free later when the event does arrive, if the
> connection is still alive (we should make that an assert really).
> 
> On the balance of things, I think destroying the buffer immediately
> (running the risk of a protocol error), is less bad. It would be even
> better if we could rely on clients to have destroyed their
> surface-wrapper object (causing all buffers to be released) by the
> time they destroy their EGLSurface, but that's of course never going
> to happen. So, assuming there's no unexpected consequences I haven't
> seen, this is:
> Reviewed-by: Daniel Stone 
> 

I understand this patch does not require any further work, right? Except
clarifying the commit messsage as explaining above.


> Cheers,
> Daniel
> 

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


Re: [Mesa-dev] [PATCH 10/11] mesa: expose EXT_texture_buffer_object

2018-08-08 Thread Marek Olšák
On Wed, Aug 8, 2018 at 12:17 PM, Emil Velikov  wrote:
> On 8 August 2018 at 12:04, Emil Velikov  wrote:
>> On 8 August 2018 at 06:42, Marek Olšák  wrote:
>>> From: Marek Olšák 
>>>
>>> This is needed for exposing the samplerBuffer functions under
>>> EXT_gpu_shader4.
>>>
>>> glTexBufferEXT is defined in glapi, but "make check" fails.
>>> What am I doing wrong?
>> There should be one in src/mapi/glapi/gen/
>> One of these days we should stop rolling our own and use the canonical
>> registry/gl.xlm
>>
>> Until then, make a separate xml file - see for example
>> a0d6732182ee62834993187e8cbd84fa4e03d786
>>
> To elaborate a bit:
>
> Here you're adding the desktop GL extension EXT_texture_buffer_object.
> Where currently we have only the ES one EXT_texture_buffer in
> es_EXT.xml.
> Hence the aliasing you have in there will be applicable only for GLES,
> and for said extension.
>
> That is, unless I'm completely loosing my marbles ;-)

All XML files are included by gl_and_es_API.xml, so they are merged.
As far as I can see, the XML files don't have the option to expose
functions in ES only. apiexec.py can do it, but not for aliases like
glTexBufferEXT, i.e. if glTexBuffer is available in the API, all its
aliases are also available (ARB, EXT, OES).

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


Re: [Mesa-dev] [PATCH 10/11] mesa: expose EXT_texture_buffer_object

2018-08-08 Thread Dylan Baker
Quoting Emil Velikov (2018-08-08 04:04:51)
> On 8 August 2018 at 06:42, Marek Olšák  wrote:
> > From: Marek Olšák 
> >
> > This is needed for exposing the samplerBuffer functions under
> > EXT_gpu_shader4.
> >
> > glTexBufferEXT is defined in glapi, but "make check" fails.
> > What am I doing wrong?
> There should be one in src/mapi/glapi/gen/
> One of these days we should stop rolling our own and use the canonical
> registry/gl.xlm
> 
> Until then, make a separate xml file - see for example
> a0d6732182ee62834993187e8cbd84fa4e03d786
> 
> HTH
> Emil

I have a branch where I started using the Khronos XML that has a few of the
generators converted, just in case there's someone out there who really wants to
work on that :)

Dylan


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


Re: [Mesa-dev] [PATCH v4 2/2] wayland/egl: update surface size on window resize

2018-08-08 Thread Daniel Stone
Hi Juan,

On Tue, 7 Aug 2018 at 16:50, Juan A. Suarez Romero  wrote:
> According to EGL 1.5 spec, section 3.10.1.1 ("Native Window Resizing"):
>
>   "If the native window corresponding to _surface_ has been resized
>prior to the swap, _surface_ must be resized to match. _surface_ will
>normally be resized by the EGL implementation at the time the native
>window is resized. If the implementation cannot do this transparently
>to the client, then *eglSwapBuffers* must detect the change and
>resize surface prior to copying its pixels to the native window."
>
> So far, resizing a native window in Wayland/EGL was interpreted in Mesa
> as a request to resize, which is not executed until the first draw call.
> And hence, surface size is not updated until executing it. Thus,
> querying the surface size with eglQuerySurface() after a window resize
> still returns the old values.
>
> This commit updates the surface size values as soon as the resize is
> done, even when the real resize is done in the draw call. This makes the
> semantics that any native window resize request take effect inmediately,
> and if user calls eglQuerySurface() it will return the new resized
> values.

I'm pretty confident that these two patches do the right thing; series is:
Reviewed-by: Daniel Stone 

Thanks a lot for your patience & persistence!

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


Re: [Mesa-dev] [PATCH] egl/wayland: do not leak wl_buffer when it is locked

2018-08-08 Thread Daniel Stone
Hi Juan,

On Thu, 2 Aug 2018 at 10:02, Juan A. Suarez Romero  wrote:
> If color buffer is locked, do not set its wayland buffer to NULL;
> otherwise it can not be freed later.

It can: see the 'if (i == ARRAY_SIZE(...))' branch inside wl_buffer_release.

> This also fixes dEQP-EGL.functional.swap_buffers_with_damage.* tests.

How does it fix them? Is it just leaks, or is there a functional difference?

> --- a/src/egl/drivers/dri2/platform_wayland.c
> +++ b/src/egl/drivers/dri2/platform_wayland.c
> @@ -412,8 +412,11 @@ dri2_wl_release_buffers(struct dri2_egl_surface 
> *dri2_surf)
>
> for (int i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
>if (dri2_surf->color_buffers[i].wl_buffer &&
> -  !dri2_surf->color_buffers[i].locked)
> +  !dri2_surf->color_buffers[i].locked) {
>   wl_buffer_destroy(dri2_surf->color_buffers[i].wl_buffer);
> + dri2_surf->color_buffers[i].wl_buffer = NULL;
> +  }
> +
>if (dri2_surf->color_buffers[i].dri_image)
>   
> dri2_dpy->image->destroyImage(dri2_surf->color_buffers[i].dri_image);
>if (dri2_surf->color_buffers[i].linear_copy)
> @@ -422,11 +425,9 @@ dri2_wl_release_buffers(struct dri2_egl_surface 
> *dri2_surf)
>   munmap(dri2_surf->color_buffers[i].data,
>  dri2_surf->color_buffers[i].data_size);
>
> -  dri2_surf->color_buffers[i].wl_buffer = NULL;
>dri2_surf->color_buffers[i].dri_image = NULL;
>dri2_surf->color_buffers[i].linear_copy = NULL;
>dri2_surf->color_buffers[i].data = NULL;
> -  dri2_surf->color_buffers[i].locked = false;

So in this case, we still occupy a slot with (wl_buffer != NULL &&
locked == true) when we resize a surface when an old buffer is still
locked.

I _think_ the main functional difference is that the buffer is now
destroyed inside dri2_wl_destroy_surface() when the surface is
destroyed, even if it is locked. Destroying a surface with a locked
buffer is bad: calling wl_buffer_destroy() may provoke a fatal
protocol error, as destroying whilst still in use is illegal. On the
other hand, destroying the event queue without destroying the object
may cause a use-after-free later when the event does arrive, if the
connection is still alive (we should make that an assert really).

On the balance of things, I think destroying the buffer immediately
(running the risk of a protocol error), is less bad. It would be even
better if we could rely on clients to have destroyed their
surface-wrapper object (causing all buffers to be released) by the
time they destroy their EGLSurface, but that's of course never going
to happen. So, assuming there's no unexpected consequences I haven't
seen, this is:
Reviewed-by: Daniel Stone 

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


Re: [Mesa-dev] [PATCH 10/11] mesa: expose EXT_texture_buffer_object

2018-08-08 Thread Emil Velikov
On 8 August 2018 at 12:04, Emil Velikov  wrote:
> On 8 August 2018 at 06:42, Marek Olšák  wrote:
>> From: Marek Olšák 
>>
>> This is needed for exposing the samplerBuffer functions under
>> EXT_gpu_shader4.
>>
>> glTexBufferEXT is defined in glapi, but "make check" fails.
>> What am I doing wrong?
> There should be one in src/mapi/glapi/gen/
> One of these days we should stop rolling our own and use the canonical
> registry/gl.xlm
>
> Until then, make a separate xml file - see for example
> a0d6732182ee62834993187e8cbd84fa4e03d786
>
To elaborate a bit:

Here you're adding the desktop GL extension EXT_texture_buffer_object.
Where currently we have only the ES one EXT_texture_buffer in
es_EXT.xml.
Hence the aliasing you have in there will be applicable only for GLES,
and for said extension.

That is, unless I'm completely loosing my marbles ;-)

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


Re: [Mesa-dev] [PATCH 10/11] mesa: expose EXT_texture_buffer_object

2018-08-08 Thread Marek Olšák
Thanks. I'll remove the dispatch_sanity change.

Marek

On Wed, Aug 8, 2018 at 12:07 PM, Ilia Mirkin  wrote:
> It's not the alias itself that breaks it -- but you can only have one
> entry per alias group.
>
> On Wed, Aug 8, 2018 at 12:03 PM, Marek Olšák  wrote:
>> Yes, it's aliased. It's weird, because adding other aliased functions
>> into dispatch_sanity didn't break the test.
>>
>> Marek
>>
>> On Wed, Aug 8, 2018 at 12:00 PM, Ilia Mirkin  wrote:
>>> Sorry, I thought I was answering your question.
>>>
>>> If glTexBufferEXT is aliased to glTexBuffer (/glTexBufferARB), which
>>> are already in the list of dispatch functions, you should not add the
>>> aliased name, otherwise you'll get failures. I did not, however, check
>>> if glTexBufferEXT is aliased in the dispatch tables. If it's not,
>>> ignore what I said.
>>>
>>> Cheers,
>>>
>>>   -ilia
>>>
>>> On Wed, Aug 8, 2018 at 11:56 AM, Marek Olšák  wrote:
 What does that mean?

 Marek

 On Wed, Aug 8, 2018 at 9:05 AM, Ilia Mirkin  wrote:
> Aliased functions shouldn't be added separately to the function list.
>
> On Wed, Aug 8, 2018 at 1:42 AM, Marek Olšák  wrote:
>> From: Marek Olšák 
>>
>> This is needed for exposing the samplerBuffer functions under
>> EXT_gpu_shader4.
>>
>> glTexBufferEXT is defined in glapi, but "make check" fails.
>> What am I doing wrong?
>> ---
>>  docs/relnotes/18.3.0.html   | 1 +
>>  src/mesa/main/extensions_table.h| 1 +
>>  src/mesa/main/tests/dispatch_sanity.cpp | 1 +
>>  3 files changed, 3 insertions(+)
>>
>> diff --git a/docs/relnotes/18.3.0.html b/docs/relnotes/18.3.0.html
>> index 786145ad8da..6274c9147a1 100644
>> --- a/docs/relnotes/18.3.0.html
>> +++ b/docs/relnotes/18.3.0.html
>> @@ -45,20 +45,21 @@ TBD.
>>
>>
>>  New features
>>
>>  
>>  Note: some of the new features are only available with certain drivers.
>>  
>>
>>  
>>  GL_AMD_framebuffer_multisample_advanced on radeonsi.
>> +GL_EXT_texture_buffer_object on i965, nv50, nvc0, r600, 
>> radeonsi.
>>  
>>
>>  Bug fixes
>>
>>  
>>  TBD
>>  
>>
>>  Changes
>>
>> diff --git a/src/mesa/main/extensions_table.h 
>> b/src/mesa/main/extensions_table.h
>> index bdba49d5380..5eb5c3278e9 100644
>> --- a/src/mesa/main/extensions_table.h
>> +++ b/src/mesa/main/extensions_table.h
>> @@ -263,20 +263,21 @@ EXT(EXT_shadow_funcs, 
>> ARB_shadow
>>  EXT(EXT_stencil_two_side, EXT_stencil_two_side  
>>  , GLL,  x ,  x ,  x , 2001)
>>  EXT(EXT_stencil_wrap, dummy_true
>>  , GLL,  x ,  x ,  x , 2002)
>>  EXT(EXT_subtexture  , dummy_true
>>  , GLL,  x ,  x ,  x , 1995)
>>  EXT(EXT_tessellation_point_size , ARB_tessellation_shader   
>>  ,  x ,  x ,  x ,  31, 2013)
>>  EXT(EXT_tessellation_shader , ARB_tessellation_shader   
>>  ,  x ,  x ,  x ,  31, 2013)
>>  EXT(EXT_texture , dummy_true
>>  , GLL,  x ,  x ,  x , 1996)
>>  EXT(EXT_texture3D   , dummy_true
>>  , GLL,  x ,  x ,  x , 1996)
>>  EXT(EXT_texture_array   , EXT_texture_array 
>>  , GLL, GLC,  x ,  x , 2006)
>>  EXT(EXT_texture_border_clamp, ARB_texture_border_clamp  
>>  ,  x ,  x ,  x , ES2, 2014)
>>  EXT(EXT_texture_buffer  , OES_texture_buffer
>>  ,  x ,  x ,  x ,  31, 2014)
>> +EXT(EXT_texture_buffer_object   , ARB_texture_buffer_object 
>>  , GLL, GLC,  x ,  x , 2007)
>>  EXT(EXT_texture_compression_dxt1, 
>> ANGLE_texture_compression_dxt  , GLL, GLC, ES1, ES2, 2004)
>>  EXT(EXT_texture_compression_latc, 
>> EXT_texture_compression_latc   , GLL,  x ,  x ,  x , 2006)
>>  EXT(EXT_texture_compression_rgtc, 
>> ARB_texture_compression_rgtc   , GLL, GLC,  x ,  x , 2004)
>>  EXT(EXT_texture_compression_s3tc, 
>> EXT_texture_compression_s3tc   , GLL, GLC,  x ,  x , 2000)
>>  EXT(EXT_texture_cube_map, ARB_texture_cube_map  
>>  , GLL,  x ,  x ,  x , 2001)
>>  EXT(EXT_texture_cube_map_array  , 
>> OES_texture_cube_map_array ,  x ,  x ,  x ,  31, 2014)
>>  EXT(EXT_texture_edge_clamp  , dummy_true
>>  , GLL,  x ,  x ,  x , 1997)
>>  EXT(EXT_texture_env_add , dummy_true
>>  , 

[Mesa-dev] [Bug 107524] Broken packDouble2x32 at llvmpipe

2018-08-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107524

Matwey V. Kornilov  changed:

   What|Removed |Added

 CC||bri...@vmware.com

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


[Mesa-dev] [Bug 107524] Broken packDouble2x32 at llvmpipe

2018-08-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107524

Bug ID: 107524
   Summary: Broken packDouble2x32 at llvmpipe
   Product: Mesa
   Version: git
  Hardware: All
OS: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/Gallium/llvmpipe
  Assignee: mesa-dev@lists.freedesktop.org
  Reporter: matwey.korni...@gmail.com
QA Contact: mesa-dev@lists.freedesktop.org

I've tested Mesa llvmpipe from recent master (e02f061b690d) and found the
following behavior.

The following fragment shader works as expected on Intel GPU (Intel HD Graphics
620 (Kaby Lake GT2)) and shows black screen at llvmpipe.

#version 330
#extension GL_ARB_gpu_shader_fp64 : require
in vec2 UV;
out vec4 color;
uniform usampler2D image_texture;
uniform sampler1D colormap;
uniform float c;
uniform float z;

void main() {
double raw_value = packDouble2x32(texture(image_texture,
UV).gr);
double value = c * (raw_value - z);
color = texture(colormap, float(clamp(value, 0.0, 1.0)));
}

At the same time, the following tiny modification fixes the shader at llvmpipe:

#version 330
#extension GL_ARB_gpu_shader_fp64 : require
in vec2 UV;
out vec4 color;
uniform usampler2D image_texture;
uniform sampler1D colormap;
uniform float c;
uniform float z;

void main() {
double raw_value = packDouble2x32(uvec2(texture(image_texture,
UV).g, texture(image_texture, UV).r));
double value = c * (raw_value - z);
color = texture(colormap, float(clamp(value, 0.0, 1.0)));
}

I've compared TGSI output from both of them and found the following difference:
In broken case DADD tries to operate on .yxyx

  5: DADD TEMP[1].xy, TEMP[1].yxyx, TEMP[2].xyxy

I am not sure that DADD knows what to do with swapped yx.

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


Re: [Mesa-dev] [PATCH 3/4] anv: Use central api generation scripts.

2018-08-08 Thread Dylan Baker
Quoting Eric Engestrom (2018-08-08 03:46:05)
> On Tuesday, 2018-08-07 16:49:17 -0700, Dylan Baker wrote:
> > Quoting Bas Nieuwenhuizen (2018-08-07 16:14:33)
> > >
> > >  anv_extensions_c = custom_target(
> > > @@ -36,10 +37,11 @@ anv_extensions_c = custom_target(
> > >input : ['anv_extensions_gen.py', vk_api_xml],
> > >output : 'anv_extensions.c',
> > >command : [
> > > +   'env', 'PYTHONPATH=@0@'.format(join_paths(meson.source_root(), 
> > > 'src/vulkan/util/')),
> >
> > This is really gross, you're adding a dependency on a unix console command. 
> > I
> > know that anv is only built on Unix-like oses, but this will eventually end 
> > up
> > being used in some code that needs to run on Windows (or mac, does mac have
> > env?).
> >
> > I know that some people will object, but IMHO a better solution than mucking
> > with the python path (either through sys.path or through PYTHONPATH, is to
> > put all of the generators in a src/generators directory and be done with it.
> > Sure the intel specific bits (for example) aren't in the src/intel folder,
> > that's a small price to avoid having to call env just to run a python 
> > script.
> >
> > Dylan
> >
> > P.S: Sorry if this goes through twice, I've been having trouble with my mail
> > setup.
> 
> I agree, using `env` is not nice. I'm not sure what you mean with
> src/generators though, can't we just move the extensions generators to
> src/vulkan/util/? (the `util` bit might need to be renamed though)

Sure, we can put them wherever.

> 
> Side note: can we also define that whole path only once (in
> src/vulkan/util/meson.build) and reuse it, instead of doing the dance
> every time?


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


Re: [Mesa-dev] [PATCH 10/11] mesa: expose EXT_texture_buffer_object

2018-08-08 Thread Ilia Mirkin
It's not the alias itself that breaks it -- but you can only have one
entry per alias group.

On Wed, Aug 8, 2018 at 12:03 PM, Marek Olšák  wrote:
> Yes, it's aliased. It's weird, because adding other aliased functions
> into dispatch_sanity didn't break the test.
>
> Marek
>
> On Wed, Aug 8, 2018 at 12:00 PM, Ilia Mirkin  wrote:
>> Sorry, I thought I was answering your question.
>>
>> If glTexBufferEXT is aliased to glTexBuffer (/glTexBufferARB), which
>> are already in the list of dispatch functions, you should not add the
>> aliased name, otherwise you'll get failures. I did not, however, check
>> if glTexBufferEXT is aliased in the dispatch tables. If it's not,
>> ignore what I said.
>>
>> Cheers,
>>
>>   -ilia
>>
>> On Wed, Aug 8, 2018 at 11:56 AM, Marek Olšák  wrote:
>>> What does that mean?
>>>
>>> Marek
>>>
>>> On Wed, Aug 8, 2018 at 9:05 AM, Ilia Mirkin  wrote:
 Aliased functions shouldn't be added separately to the function list.

 On Wed, Aug 8, 2018 at 1:42 AM, Marek Olšák  wrote:
> From: Marek Olšák 
>
> This is needed for exposing the samplerBuffer functions under
> EXT_gpu_shader4.
>
> glTexBufferEXT is defined in glapi, but "make check" fails.
> What am I doing wrong?
> ---
>  docs/relnotes/18.3.0.html   | 1 +
>  src/mesa/main/extensions_table.h| 1 +
>  src/mesa/main/tests/dispatch_sanity.cpp | 1 +
>  3 files changed, 3 insertions(+)
>
> diff --git a/docs/relnotes/18.3.0.html b/docs/relnotes/18.3.0.html
> index 786145ad8da..6274c9147a1 100644
> --- a/docs/relnotes/18.3.0.html
> +++ b/docs/relnotes/18.3.0.html
> @@ -45,20 +45,21 @@ TBD.
>
>
>  New features
>
>  
>  Note: some of the new features are only available with certain drivers.
>  
>
>  
>  GL_AMD_framebuffer_multisample_advanced on radeonsi.
> +GL_EXT_texture_buffer_object on i965, nv50, nvc0, r600, 
> radeonsi.
>  
>
>  Bug fixes
>
>  
>  TBD
>  
>
>  Changes
>
> diff --git a/src/mesa/main/extensions_table.h 
> b/src/mesa/main/extensions_table.h
> index bdba49d5380..5eb5c3278e9 100644
> --- a/src/mesa/main/extensions_table.h
> +++ b/src/mesa/main/extensions_table.h
> @@ -263,20 +263,21 @@ EXT(EXT_shadow_funcs, 
> ARB_shadow
>  EXT(EXT_stencil_two_side, EXT_stencil_two_side   
> , GLL,  x ,  x ,  x , 2001)
>  EXT(EXT_stencil_wrap, dummy_true 
> , GLL,  x ,  x ,  x , 2002)
>  EXT(EXT_subtexture  , dummy_true 
> , GLL,  x ,  x ,  x , 1995)
>  EXT(EXT_tessellation_point_size , ARB_tessellation_shader
> ,  x ,  x ,  x ,  31, 2013)
>  EXT(EXT_tessellation_shader , ARB_tessellation_shader
> ,  x ,  x ,  x ,  31, 2013)
>  EXT(EXT_texture , dummy_true 
> , GLL,  x ,  x ,  x , 1996)
>  EXT(EXT_texture3D   , dummy_true 
> , GLL,  x ,  x ,  x , 1996)
>  EXT(EXT_texture_array   , EXT_texture_array  
> , GLL, GLC,  x ,  x , 2006)
>  EXT(EXT_texture_border_clamp, ARB_texture_border_clamp   
> ,  x ,  x ,  x , ES2, 2014)
>  EXT(EXT_texture_buffer  , OES_texture_buffer 
> ,  x ,  x ,  x ,  31, 2014)
> +EXT(EXT_texture_buffer_object   , ARB_texture_buffer_object  
> , GLL, GLC,  x ,  x , 2007)
>  EXT(EXT_texture_compression_dxt1, 
> ANGLE_texture_compression_dxt  , GLL, GLC, ES1, ES2, 2004)
>  EXT(EXT_texture_compression_latc, 
> EXT_texture_compression_latc   , GLL,  x ,  x ,  x , 2006)
>  EXT(EXT_texture_compression_rgtc, 
> ARB_texture_compression_rgtc   , GLL, GLC,  x ,  x , 2004)
>  EXT(EXT_texture_compression_s3tc, 
> EXT_texture_compression_s3tc   , GLL, GLC,  x ,  x , 2000)
>  EXT(EXT_texture_cube_map, ARB_texture_cube_map   
> , GLL,  x ,  x ,  x , 2001)
>  EXT(EXT_texture_cube_map_array  , OES_texture_cube_map_array 
> ,  x ,  x ,  x ,  31, 2014)
>  EXT(EXT_texture_edge_clamp  , dummy_true 
> , GLL,  x ,  x ,  x , 1997)
>  EXT(EXT_texture_env_add , dummy_true 
> , GLL,  x ,  x ,  x , 1999)
>  EXT(EXT_texture_env_combine , dummy_true 
> , GLL,  x ,  x ,  x , 2000)
>  EXT(EXT_texture_env_dot3, EXT_texture_env_dot3  

Re: [Mesa-dev] [PATCH 10/11] mesa: expose EXT_texture_buffer_object

2018-08-08 Thread Marek Olšák
Yes, it's aliased. It's weird, because adding other aliased functions
into dispatch_sanity didn't break the test.

Marek

On Wed, Aug 8, 2018 at 12:00 PM, Ilia Mirkin  wrote:
> Sorry, I thought I was answering your question.
>
> If glTexBufferEXT is aliased to glTexBuffer (/glTexBufferARB), which
> are already in the list of dispatch functions, you should not add the
> aliased name, otherwise you'll get failures. I did not, however, check
> if glTexBufferEXT is aliased in the dispatch tables. If it's not,
> ignore what I said.
>
> Cheers,
>
>   -ilia
>
> On Wed, Aug 8, 2018 at 11:56 AM, Marek Olšák  wrote:
>> What does that mean?
>>
>> Marek
>>
>> On Wed, Aug 8, 2018 at 9:05 AM, Ilia Mirkin  wrote:
>>> Aliased functions shouldn't be added separately to the function list.
>>>
>>> On Wed, Aug 8, 2018 at 1:42 AM, Marek Olšák  wrote:
 From: Marek Olšák 

 This is needed for exposing the samplerBuffer functions under
 EXT_gpu_shader4.

 glTexBufferEXT is defined in glapi, but "make check" fails.
 What am I doing wrong?
 ---
  docs/relnotes/18.3.0.html   | 1 +
  src/mesa/main/extensions_table.h| 1 +
  src/mesa/main/tests/dispatch_sanity.cpp | 1 +
  3 files changed, 3 insertions(+)

 diff --git a/docs/relnotes/18.3.0.html b/docs/relnotes/18.3.0.html
 index 786145ad8da..6274c9147a1 100644
 --- a/docs/relnotes/18.3.0.html
 +++ b/docs/relnotes/18.3.0.html
 @@ -45,20 +45,21 @@ TBD.


  New features

  
  Note: some of the new features are only available with certain drivers.
  

  
  GL_AMD_framebuffer_multisample_advanced on radeonsi.
 +GL_EXT_texture_buffer_object on i965, nv50, nvc0, r600, radeonsi.
  

  Bug fixes

  
  TBD
  

  Changes

 diff --git a/src/mesa/main/extensions_table.h 
 b/src/mesa/main/extensions_table.h
 index bdba49d5380..5eb5c3278e9 100644
 --- a/src/mesa/main/extensions_table.h
 +++ b/src/mesa/main/extensions_table.h
 @@ -263,20 +263,21 @@ EXT(EXT_shadow_funcs, 
 ARB_shadow
  EXT(EXT_stencil_two_side, EXT_stencil_two_side
, GLL,  x ,  x ,  x , 2001)
  EXT(EXT_stencil_wrap, dummy_true  
, GLL,  x ,  x ,  x , 2002)
  EXT(EXT_subtexture  , dummy_true  
, GLL,  x ,  x ,  x , 1995)
  EXT(EXT_tessellation_point_size , ARB_tessellation_shader 
,  x ,  x ,  x ,  31, 2013)
  EXT(EXT_tessellation_shader , ARB_tessellation_shader 
,  x ,  x ,  x ,  31, 2013)
  EXT(EXT_texture , dummy_true  
, GLL,  x ,  x ,  x , 1996)
  EXT(EXT_texture3D   , dummy_true  
, GLL,  x ,  x ,  x , 1996)
  EXT(EXT_texture_array   , EXT_texture_array   
, GLL, GLC,  x ,  x , 2006)
  EXT(EXT_texture_border_clamp, ARB_texture_border_clamp
,  x ,  x ,  x , ES2, 2014)
  EXT(EXT_texture_buffer  , OES_texture_buffer  
,  x ,  x ,  x ,  31, 2014)
 +EXT(EXT_texture_buffer_object   , ARB_texture_buffer_object   
, GLL, GLC,  x ,  x , 2007)
  EXT(EXT_texture_compression_dxt1, 
 ANGLE_texture_compression_dxt  , GLL, GLC, ES1, ES2, 2004)
  EXT(EXT_texture_compression_latc, 
 EXT_texture_compression_latc   , GLL,  x ,  x ,  x , 2006)
  EXT(EXT_texture_compression_rgtc, 
 ARB_texture_compression_rgtc   , GLL, GLC,  x ,  x , 2004)
  EXT(EXT_texture_compression_s3tc, 
 EXT_texture_compression_s3tc   , GLL, GLC,  x ,  x , 2000)
  EXT(EXT_texture_cube_map, ARB_texture_cube_map
, GLL,  x ,  x ,  x , 2001)
  EXT(EXT_texture_cube_map_array  , OES_texture_cube_map_array  
,  x ,  x ,  x ,  31, 2014)
  EXT(EXT_texture_edge_clamp  , dummy_true  
, GLL,  x ,  x ,  x , 1997)
  EXT(EXT_texture_env_add , dummy_true  
, GLL,  x ,  x ,  x , 1999)
  EXT(EXT_texture_env_combine , dummy_true  
, GLL,  x ,  x ,  x , 2000)
  EXT(EXT_texture_env_dot3, EXT_texture_env_dot3
, GLL,  x ,  x ,  x , 2000)
 diff --git a/src/mesa/main/tests/dispatch_sanity.cpp 
 b/src/mesa/main/tests/dispatch_sanity.cpp
 index 449dd3652cc..a7562b766f3 100644
 --- a/src/mesa/main/tests/dispatch_sanity.cpp
 +++ 

Re: [Mesa-dev] [PATCH 10/11] mesa: expose EXT_texture_buffer_object

2018-08-08 Thread Ilia Mirkin
Sorry, I thought I was answering your question.

If glTexBufferEXT is aliased to glTexBuffer (/glTexBufferARB), which
are already in the list of dispatch functions, you should not add the
aliased name, otherwise you'll get failures. I did not, however, check
if glTexBufferEXT is aliased in the dispatch tables. If it's not,
ignore what I said.

Cheers,

  -ilia

On Wed, Aug 8, 2018 at 11:56 AM, Marek Olšák  wrote:
> What does that mean?
>
> Marek
>
> On Wed, Aug 8, 2018 at 9:05 AM, Ilia Mirkin  wrote:
>> Aliased functions shouldn't be added separately to the function list.
>>
>> On Wed, Aug 8, 2018 at 1:42 AM, Marek Olšák  wrote:
>>> From: Marek Olšák 
>>>
>>> This is needed for exposing the samplerBuffer functions under
>>> EXT_gpu_shader4.
>>>
>>> glTexBufferEXT is defined in glapi, but "make check" fails.
>>> What am I doing wrong?
>>> ---
>>>  docs/relnotes/18.3.0.html   | 1 +
>>>  src/mesa/main/extensions_table.h| 1 +
>>>  src/mesa/main/tests/dispatch_sanity.cpp | 1 +
>>>  3 files changed, 3 insertions(+)
>>>
>>> diff --git a/docs/relnotes/18.3.0.html b/docs/relnotes/18.3.0.html
>>> index 786145ad8da..6274c9147a1 100644
>>> --- a/docs/relnotes/18.3.0.html
>>> +++ b/docs/relnotes/18.3.0.html
>>> @@ -45,20 +45,21 @@ TBD.
>>>
>>>
>>>  New features
>>>
>>>  
>>>  Note: some of the new features are only available with certain drivers.
>>>  
>>>
>>>  
>>>  GL_AMD_framebuffer_multisample_advanced on radeonsi.
>>> +GL_EXT_texture_buffer_object on i965, nv50, nvc0, r600, radeonsi.
>>>  
>>>
>>>  Bug fixes
>>>
>>>  
>>>  TBD
>>>  
>>>
>>>  Changes
>>>
>>> diff --git a/src/mesa/main/extensions_table.h 
>>> b/src/mesa/main/extensions_table.h
>>> index bdba49d5380..5eb5c3278e9 100644
>>> --- a/src/mesa/main/extensions_table.h
>>> +++ b/src/mesa/main/extensions_table.h
>>> @@ -263,20 +263,21 @@ EXT(EXT_shadow_funcs, 
>>> ARB_shadow
>>>  EXT(EXT_stencil_two_side, EXT_stencil_two_side 
>>>   , GLL,  x ,  x ,  x , 2001)
>>>  EXT(EXT_stencil_wrap, dummy_true   
>>>   , GLL,  x ,  x ,  x , 2002)
>>>  EXT(EXT_subtexture  , dummy_true   
>>>   , GLL,  x ,  x ,  x , 1995)
>>>  EXT(EXT_tessellation_point_size , ARB_tessellation_shader  
>>>   ,  x ,  x ,  x ,  31, 2013)
>>>  EXT(EXT_tessellation_shader , ARB_tessellation_shader  
>>>   ,  x ,  x ,  x ,  31, 2013)
>>>  EXT(EXT_texture , dummy_true   
>>>   , GLL,  x ,  x ,  x , 1996)
>>>  EXT(EXT_texture3D   , dummy_true   
>>>   , GLL,  x ,  x ,  x , 1996)
>>>  EXT(EXT_texture_array   , EXT_texture_array
>>>   , GLL, GLC,  x ,  x , 2006)
>>>  EXT(EXT_texture_border_clamp, ARB_texture_border_clamp 
>>>   ,  x ,  x ,  x , ES2, 2014)
>>>  EXT(EXT_texture_buffer  , OES_texture_buffer   
>>>   ,  x ,  x ,  x ,  31, 2014)
>>> +EXT(EXT_texture_buffer_object   , ARB_texture_buffer_object
>>>   , GLL, GLC,  x ,  x , 2007)
>>>  EXT(EXT_texture_compression_dxt1, 
>>> ANGLE_texture_compression_dxt  , GLL, GLC, ES1, ES2, 2004)
>>>  EXT(EXT_texture_compression_latc, EXT_texture_compression_latc 
>>>   , GLL,  x ,  x ,  x , 2006)
>>>  EXT(EXT_texture_compression_rgtc, ARB_texture_compression_rgtc 
>>>   , GLL, GLC,  x ,  x , 2004)
>>>  EXT(EXT_texture_compression_s3tc, EXT_texture_compression_s3tc 
>>>   , GLL, GLC,  x ,  x , 2000)
>>>  EXT(EXT_texture_cube_map, ARB_texture_cube_map 
>>>   , GLL,  x ,  x ,  x , 2001)
>>>  EXT(EXT_texture_cube_map_array  , OES_texture_cube_map_array   
>>>   ,  x ,  x ,  x ,  31, 2014)
>>>  EXT(EXT_texture_edge_clamp  , dummy_true   
>>>   , GLL,  x ,  x ,  x , 1997)
>>>  EXT(EXT_texture_env_add , dummy_true   
>>>   , GLL,  x ,  x ,  x , 1999)
>>>  EXT(EXT_texture_env_combine , dummy_true   
>>>   , GLL,  x ,  x ,  x , 2000)
>>>  EXT(EXT_texture_env_dot3, EXT_texture_env_dot3 
>>>   , GLL,  x ,  x ,  x , 2000)
>>> diff --git a/src/mesa/main/tests/dispatch_sanity.cpp 
>>> b/src/mesa/main/tests/dispatch_sanity.cpp
>>> index 449dd3652cc..a7562b766f3 100644
>>> --- a/src/mesa/main/tests/dispatch_sanity.cpp
>>> +++ b/src/mesa/main/tests/dispatch_sanity.cpp
>>> @@ -499,20 +499,21 @@ const struct function 
>>> common_desktop_functions_possible[] = {
>>> { "glClearBufferuiv", 30, -1 },
>>> { "glClearBufferfv", 30, -1 },
>>> { "glClearBufferfi", 30, -1 },
>>> { "glGetStringi", 30, -1 },
>>>
>>> /* GL 3.1 */

Re: [Mesa-dev] [PATCH 10/11] mesa: expose EXT_texture_buffer_object

2018-08-08 Thread Marek Olšák
What does that mean?

Marek

On Wed, Aug 8, 2018 at 9:05 AM, Ilia Mirkin  wrote:
> Aliased functions shouldn't be added separately to the function list.
>
> On Wed, Aug 8, 2018 at 1:42 AM, Marek Olšák  wrote:
>> From: Marek Olšák 
>>
>> This is needed for exposing the samplerBuffer functions under
>> EXT_gpu_shader4.
>>
>> glTexBufferEXT is defined in glapi, but "make check" fails.
>> What am I doing wrong?
>> ---
>>  docs/relnotes/18.3.0.html   | 1 +
>>  src/mesa/main/extensions_table.h| 1 +
>>  src/mesa/main/tests/dispatch_sanity.cpp | 1 +
>>  3 files changed, 3 insertions(+)
>>
>> diff --git a/docs/relnotes/18.3.0.html b/docs/relnotes/18.3.0.html
>> index 786145ad8da..6274c9147a1 100644
>> --- a/docs/relnotes/18.3.0.html
>> +++ b/docs/relnotes/18.3.0.html
>> @@ -45,20 +45,21 @@ TBD.
>>
>>
>>  New features
>>
>>  
>>  Note: some of the new features are only available with certain drivers.
>>  
>>
>>  
>>  GL_AMD_framebuffer_multisample_advanced on radeonsi.
>> +GL_EXT_texture_buffer_object on i965, nv50, nvc0, r600, radeonsi.
>>  
>>
>>  Bug fixes
>>
>>  
>>  TBD
>>  
>>
>>  Changes
>>
>> diff --git a/src/mesa/main/extensions_table.h 
>> b/src/mesa/main/extensions_table.h
>> index bdba49d5380..5eb5c3278e9 100644
>> --- a/src/mesa/main/extensions_table.h
>> +++ b/src/mesa/main/extensions_table.h
>> @@ -263,20 +263,21 @@ EXT(EXT_shadow_funcs, 
>> ARB_shadow
>>  EXT(EXT_stencil_two_side, EXT_stencil_two_side  
>>  , GLL,  x ,  x ,  x , 2001)
>>  EXT(EXT_stencil_wrap, dummy_true
>>  , GLL,  x ,  x ,  x , 2002)
>>  EXT(EXT_subtexture  , dummy_true
>>  , GLL,  x ,  x ,  x , 1995)
>>  EXT(EXT_tessellation_point_size , ARB_tessellation_shader   
>>  ,  x ,  x ,  x ,  31, 2013)
>>  EXT(EXT_tessellation_shader , ARB_tessellation_shader   
>>  ,  x ,  x ,  x ,  31, 2013)
>>  EXT(EXT_texture , dummy_true
>>  , GLL,  x ,  x ,  x , 1996)
>>  EXT(EXT_texture3D   , dummy_true
>>  , GLL,  x ,  x ,  x , 1996)
>>  EXT(EXT_texture_array   , EXT_texture_array 
>>  , GLL, GLC,  x ,  x , 2006)
>>  EXT(EXT_texture_border_clamp, ARB_texture_border_clamp  
>>  ,  x ,  x ,  x , ES2, 2014)
>>  EXT(EXT_texture_buffer  , OES_texture_buffer
>>  ,  x ,  x ,  x ,  31, 2014)
>> +EXT(EXT_texture_buffer_object   , ARB_texture_buffer_object 
>>  , GLL, GLC,  x ,  x , 2007)
>>  EXT(EXT_texture_compression_dxt1, ANGLE_texture_compression_dxt 
>>  , GLL, GLC, ES1, ES2, 2004)
>>  EXT(EXT_texture_compression_latc, EXT_texture_compression_latc  
>>  , GLL,  x ,  x ,  x , 2006)
>>  EXT(EXT_texture_compression_rgtc, ARB_texture_compression_rgtc  
>>  , GLL, GLC,  x ,  x , 2004)
>>  EXT(EXT_texture_compression_s3tc, EXT_texture_compression_s3tc  
>>  , GLL, GLC,  x ,  x , 2000)
>>  EXT(EXT_texture_cube_map, ARB_texture_cube_map  
>>  , GLL,  x ,  x ,  x , 2001)
>>  EXT(EXT_texture_cube_map_array  , OES_texture_cube_map_array
>>  ,  x ,  x ,  x ,  31, 2014)
>>  EXT(EXT_texture_edge_clamp  , dummy_true
>>  , GLL,  x ,  x ,  x , 1997)
>>  EXT(EXT_texture_env_add , dummy_true
>>  , GLL,  x ,  x ,  x , 1999)
>>  EXT(EXT_texture_env_combine , dummy_true
>>  , GLL,  x ,  x ,  x , 2000)
>>  EXT(EXT_texture_env_dot3, EXT_texture_env_dot3  
>>  , GLL,  x ,  x ,  x , 2000)
>> diff --git a/src/mesa/main/tests/dispatch_sanity.cpp 
>> b/src/mesa/main/tests/dispatch_sanity.cpp
>> index 449dd3652cc..a7562b766f3 100644
>> --- a/src/mesa/main/tests/dispatch_sanity.cpp
>> +++ b/src/mesa/main/tests/dispatch_sanity.cpp
>> @@ -499,20 +499,21 @@ const struct function 
>> common_desktop_functions_possible[] = {
>> { "glClearBufferuiv", 30, -1 },
>> { "glClearBufferfv", 30, -1 },
>> { "glClearBufferfi", 30, -1 },
>> { "glGetStringi", 30, -1 },
>>
>> /* GL 3.1 */
>> { "glDrawArraysInstanced", 31, -1 },
>> { "glDrawElementsInstanced", 31, -1 },
>> { "glPrimitiveRestartIndex", 31, -1 },
>> { "glTexBuffer", 31, -1 },
>> +   { "glTexBufferEXT", 31, -1 },
>>
>> /* GL_ARB_texture_buffer_range */
>> { "glTexBufferRange", 43, -1 },
>>
>> /* GL_ARB_shader_objects */
>> { "glDeleteObjectARB", 31, -1 },
>> { "glGetHandleARB", 31, -1 },
>> { "glDetachObjectARB", 31, -1 },
>> { "glCreateShaderObjectARB", 31, -1 },
>> { "glCreateProgramObjectARB", 

Re: [Mesa-dev] [PATCH 3/7] dri: Define DRI_MutableRenderBuffer extensions

2018-08-08 Thread Tapani Pälli



On 07.08.2018 21:16, Chad Versace wrote:

On Mon 06 Aug 2018, Chad Versace wrote:

On Fri 03 Aug 2018, Tapani Pälli wrote:

One tiny nit below but for patches 3,4 and 5:

Reviewed-by: Tapani Pälli 

Special thanks for the documentation. I want to go through rest of changes
within Android but I'm currently experiencing some horrible issues with the
image building. I'm hoping to resolve those soon and get back to business.


Any luck with the Android patches?


I have the build working (for O) now but can test stuff only tomorrow, 
will get back to you then.



btw, I plan to start working on and/or reviewing
VK_ANDROID_external_memory_android_hardware_buffer this week.
I'll coordinate with you when I start.


OK cool, Celadon is in process of migrating to P and when that is 
successfully done I'll get back to looking at this too.


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


[Mesa-dev] [PATCH 3/3] gitlab-ci: Build from the released tarballs

2018-08-08 Thread Juan A. Suarez Romero
The `distcheck` stage creates a tarball ready for the distribution, and
compiles it with the autotools to ensure everything works fine.

But it does not try with the other tools: scons and meson.

Hence, let's add a new stage that takes the generated tarball and builds
it using meson and scons.

Signed-off-by: Juan A. Suarez Romero 
---
 .gitlab-ci.yml | 24 
 1 file changed, 24 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 31f69ceb29e..ffed0ec8c65 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,6 +7,7 @@ stages:
   - base
   - llvm
   - mesa
+  - tarball
 
 variables:
   DOCKER_IMAGE: $CI_REGISTRY_IMAGE
@@ -48,6 +49,14 @@ after_script:
   script:
 - ../rocker build -f gitlab-ci/Rockerfile.mesa --var BUILD=$BUILD --var 
LLVM=$LLVM --var TAG=$CI_COMMIT_REF_SLUG .
 
+.build_tarball: _tarball
+  stage: tarball
+  dependencies:
+- distcheck
+  script:
+- tar -xf release-output/mesa-*.tar.xz
+- ../rocker build -f gitlab-ci/Rockerfile.mesa --var BUILD=$BUILD --var 
LLVM=$LLVM mesa-*
+
 base:
   stage: base
   script:
@@ -178,3 +187,18 @@ windows:
   variables:
 BUILD: "windows"
   <<: *build_mesa
+
+tarball:meson:
+  variables:
+BUILD: "meson"
+  <<: *build_tarball
+
+tarball:scons:
+  variables:
+BUILD: "scons"
+  <<: *build_tarball
+
+tarball:windows:
+  variables:
+BUILD: "windows"
+  <<: *build_tarball
-- 
2.17.1

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


[Mesa-dev] [PATCH 2/3] gitlab-ci: build base images if dependencies changed

2018-08-08 Thread Juan A. Suarez Romero
Most of times, the base and LLVM images do not require to be rebuilt,
as the dependencies remains the same.

To avoid rebuilding these images everytime, store in the image the
Dockerfile's sha256sum: if the Dockerfile changes (because new
dependencies were added or changed), then rebuild the image and push it.

Signed-off-by: Juan A. Suarez Romero 
---
 .gitlab-ci.yml|  9 ++---
 gitlab-ci/Rockerfile.base |  4 +++-
 gitlab-ci/Rockerfile.llvm |  4 +++-
 gitlab-ci/inspect-remote-image.sh | 21 +
 4 files changed, 33 insertions(+), 5 deletions(-)
 create mode 100755 gitlab-ci/inspect-remote-image.sh

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5cee333dd45..31f69ceb29e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,7 +23,7 @@ before_script:
   - rm -fr ../ccache
   - mv ccache ../
   - export MAKEFLAGS=-j$(nproc)
-  - apk --no-cache add libc6-compat
+  - apk --no-cache add libc6-compat curl jq
   - wget 
https://github.com/grammarly/rocker/releases/download/1.3.1/rocker-1.3.1-linux_amd64.tar.gz
   - tar xvf rocker-1.3.1-linux_amd64.tar.gz
   - rm rocker-1.3.1-linux_amd64.tar.gz
@@ -37,8 +37,11 @@ after_script:
   stage: llvm
   cache: {}
   script:
-- ../rocker build -f gitlab-ci/Rockerfile.llvm --var LLVM=$LLVM
-- docker push $CI_REGISTRY_IMAGE:llvm-$LLVM
+- DOCKERFILE_SHA256=$(cat gitlab-ci/Rockerfile.base 
gitlab-ci/Rockerfile.llvm | sha256sum | cut -c-64)
+- IMAGE_DOCKERFILE_SHA256=$(./gitlab-ci/inspect-remote-image.sh 
gitlab-ci-token $CI_BUILD_TOKEN $CI_PROJECT_PATH "llvm-$LLVM" 
".config.Labels[\"dockerfile.sha256\"]" || echo -n "")
+- if [ "$DOCKERFILE_SHA256" != "$IMAGE_DOCKERFILE_SHA256" ] ; then 
FORCE_BUILD=true ; fi
+- if [ "$FORCE_BUILD" ] ; then ../rocker build -f 
gitlab-ci/Rockerfile.llvm --var DOCKERFILE_SHA256=$DOCKERFILE_SHA256 --var 
LLVM=$LLVM ; fi
+- if [ "$FORCE_BUILD" ] ; then docker push $CI_REGISTRY_IMAGE:llvm-$LLVM ; 
fi
 
 .build_mesa: _mesa
   stage: mesa
diff --git a/gitlab-ci/Rockerfile.base b/gitlab-ci/Rockerfile.base
index a0cb5e5290d..2056aceacdf 100644
--- a/gitlab-ci/Rockerfile.base
+++ b/gitlab-ci/Rockerfile.base
@@ -2,7 +2,8 @@
 # Base image for building Mesa.
 #
 # ~~~
-#  rocker build -f Rockerfile.base [--attach] [--pull]
+#  rocker build -f Rockerfile.base [--attach] [--pull]   \
+#--var DOCKERFILE_SHA256=`sha256sum Rockerfile.base | cut -c-64)`
 # ~~~
 #
 # Environment variables that are used in the build:
@@ -16,6 +17,7 @@
 FROM ubuntu:xenial
 
 LABEL maintainer "Juan A. Suarez Romero "
+LABEL dockerfile.sha256 {{ .DOCKERFILE_SHA256 }}
 
 ENV LC_ALL=C.UTF-8
 
diff --git a/gitlab-ci/Rockerfile.llvm b/gitlab-ci/Rockerfile.llvm
index ed75f4f0f02..cb2906d9a40 100644
--- a/gitlab-ci/Rockerfile.llvm
+++ b/gitlab-ci/Rockerfile.llvm
@@ -2,7 +2,8 @@
 # This builds the base image for building Mesa.
 #
 # ~~~
-#  rocker build -f Rockerfile.llvm [--pull] \
+#  rocker build -f Rockerfile.llvm [--pull] \
+#--var DOCKERFILE_SHA256=`sha256sum Rockerfile.base | cut -c-64)`   \
 #--var LLVM=3.3 # 3.3, 3.6, 3.8, 3.9, 4.0, 5.0, 6.0
 # ~~~
 #
@@ -30,6 +31,7 @@
 FROM {{ $image }}:base
 
 LABEL maintainer "Juan A. Suarez Romero "
+LABEL dockerfile.sha256 {{ .DOCKERFILE_SHA256 }}
 
 {{ if ge .LLVM "3.9" }}
 RUN apt-get update\
diff --git a/gitlab-ci/inspect-remote-image.sh 
b/gitlab-ci/inspect-remote-image.sh
new file mode 100755
index 000..e3810023b00
--- /dev/null
+++ b/gitlab-ci/inspect-remote-image.sh
@@ -0,0 +1,21 @@
+if [ $# != 5 ]; then
+echo "Usage: $0 "
+exit 0
+fi
+
+USERNAME=$1
+PASSWORD=$2
+IMAGE=$3
+TAG=$4
+PROPERTY=$5
+
+AUTHPOINT=$(curl -L -D - -s https://${CI_REGISTRY}/v2/ | grep Www-Authenticate)
+
+REALM=$(echo -n ${AUTHPOINT} | cut -d \" -f 2)
+SERVICE=$(echo -n ${AUTHPOINT} | cut -d \" -f 4)
+
+TOKEN=$(curl -L -s --user "${USERNAME}:${PASSWORD}" 
"${REALM}?client_id=docker_token=true=${SERVICE}=repository:${IMAGE}:pull"
 | jq -r ".token")
+
+DIGEST=$(curl -L -s -H "Accept: 
application/vnd.docker.distribution.manifest.v2+json" -H "Authorization: Bearer 
${TOKEN}" "https://${CI_REGISTRY}/v2/${IMAGE}/manifests/${TAG}; | jq -r 
".config.digest")
+
+curl -L -s -H "Authorization: Bearer ${TOKEN}" 
"https://${CI_REGISTRY}/v2/${IMAGE}/blobs/${DIGEST}; | jq -r "${PROPERTY}"
-- 
2.17.1

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


[Mesa-dev] [PATCH 1/3] gitlab-ci: build Mesa using GitLab CI

2018-08-08 Thread Juan A. Suarez Romero
Creates different Docker images containing Mesa built with different
tools (autotools, meson, scons, etc).

The build is done in 3 levels: the first level creates a base image
with all the requirements to build Mesa.

The second level (based of the first one), builds different images with
different versions of LLVM. As Gallium drivers heavily relies on LLVM,
this will help to test the build with different LLVM versions.

Finally, the latest level creates different images versions of Mesa.
The main differences is the tool to build them: autotools, meson, scons,
building Gallium drivers with different LLVM versions, and so on.

As the purpose is just to test that everything can be built correctly,
all the images are discarded, except one (the autotools), which is
stored in the registry. Thus, anyone can just pull it locally and test
against their local system.

In order to build the images, Rocker is used. This is a tool that
extends the Dockerfiles with new features that are quite interested
here. The main features we use is the support for templating, and the
support for mounting external directories during the image building.
This help to use tools like ccache to improve the build speed.

Signed-off-by: Juan A. Suarez Romero 
---
 .gitlab-ci.yml| 177 +
 gitlab-ci/Rockerfile.base | 199 ++
 gitlab-ci/Rockerfile.llvm |  57 +++
 gitlab-ci/Rockerfile.mesa | 145 +++
 4 files changed, 578 insertions(+)
 create mode 100644 .gitlab-ci.yml
 create mode 100644 gitlab-ci/Rockerfile.base
 create mode 100644 gitlab-ci/Rockerfile.llvm
 create mode 100644 gitlab-ci/Rockerfile.mesa

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 000..5cee333dd45
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,177 @@
+image: docker:latest
+
+services:
+  - docker:dind
+
+stages:
+  - base
+  - llvm
+  - mesa
+
+variables:
+  DOCKER_IMAGE: $CI_REGISTRY_IMAGE
+  CCACHE_DIR: $CI_PROJECT_DIR/../ccache
+  LLVM: "6.0"
+
+cache:
+  paths:
+- ccache/
+  key: "$CI_JOB_STAGE"
+
+before_script:
+  - mkdir -p ccache
+  - rm -fr ../ccache
+  - mv ccache ../
+  - export MAKEFLAGS=-j$(nproc)
+  - apk --no-cache add libc6-compat
+  - wget 
https://github.com/grammarly/rocker/releases/download/1.3.1/rocker-1.3.1-linux_amd64.tar.gz
+  - tar xvf rocker-1.3.1-linux_amd64.tar.gz
+  - rm rocker-1.3.1-linux_amd64.tar.gz
+  - mv rocker ..
+  - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
+
+after_script:
+  - mv ../ccache ./
+
+.build_llvm: _llvm
+  stage: llvm
+  cache: {}
+  script:
+- ../rocker build -f gitlab-ci/Rockerfile.llvm --var LLVM=$LLVM
+- docker push $CI_REGISTRY_IMAGE:llvm-$LLVM
+
+.build_mesa: _mesa
+  stage: mesa
+  script:
+- ../rocker build -f gitlab-ci/Rockerfile.mesa --var BUILD=$BUILD --var 
LLVM=$LLVM --var TAG=$CI_COMMIT_REF_SLUG .
+
+base:
+  stage: base
+  script:
+- DOCKERFILE_SHA256=$(cat gitlab-ci/Rockerfile.base | sha256sum | cut 
-c-64)
+- IMAGE_DOCKERFILE_SHA256=$(./gitlab-ci/inspect-remote-image.sh 
gitlab-ci-token $CI_BUILD_TOKEN $CI_PROJECT_PATH "base" 
".config.Labels[\"dockerfile.sha256\"]" || echo -n "")
+- if [ "$DOCKERFILE_SHA256" != "$IMAGE_DOCKERFILE_SHA256" ] ; then 
FORCE_BUILD=true ; fi
+- if [ "$FORCE_BUILD" ] ; then ../rocker build -f 
gitlab-ci/Rockerfile.base --var DOCKERFILE_SHA256=$DOCKERFILE_SHA256 ; fi
+- if [ "$FORCE_BUILD" ] ; then docker push $CI_REGISTRY_IMAGE:base ; fi
+
+llvm:3.3:
+  variables:
+LLVM: "3.3"
+  <<: *build_llvm
+
+llvm:3.6:
+  variables:
+LLVM: "3.6"
+  <<: *build_llvm
+
+llvm:3.8:
+  variables:
+LLVM: "3.8"
+  <<: *build_llvm
+
+llvm:3.9:
+  variables:
+LLVM: "3.9"
+  <<: *build_llvm
+
+llvm:4.0:
+  variables:
+LLVM: "4.0"
+  <<: *build_llvm
+
+llvm:5.0:
+  variables:
+LLVM: "5.0"
+  <<: *build_llvm
+
+llvm:6.0:
+  variables:
+LLVM: "6.0"
+  <<: *build_llvm
+
+meson:
+  variables:
+BUILD: "meson"
+  <<: *build_mesa
+
+autotools:
+  variables:
+BUILD: "autotools"
+  after_script:
+- mv ../ccache ./
+- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
+  <<: *build_mesa
+
+distcheck:
+  variables:
+BUILD: "distcheck"
+  artifacts:
+name: "release"
+paths:
+  - release-output/
+expire_in: 1 week
+  <<: *build_mesa
+
+gallium:llvm:3.3:
+  variables:
+BUILD: "gallium"
+LLVM: "3.3"
+  <<: *build_mesa
+
+gallium:llvm:3.6:
+  variables:
+BUILD: "gallium"
+LLVM: "3.6"
+  <<: *build_mesa
+
+gallium:llvm:3.8:
+  variables:
+BUILD: "gallium"
+LLVM: "3.8"
+  <<: *build_mesa
+
+gallium:llvm:3.9:
+  variables:
+BUILD: "gallium"
+LLVM: "3.9"
+  <<: *build_mesa
+
+gallium:llvm:4.0:
+  variables:
+BUILD: "gallium"
+LLVM: "4.0"
+  <<: *build_mesa
+
+gallium:llvm:5.0:
+  variables:
+BUILD: "gallium"
+LLVM: "5.0"
+  <<: *build_mesa
+
+gallium:llvm:6.0:
+  variables:
+BUILD: "gallium"
+LLVM: "6.0"

[Mesa-dev] [PATCH 0/3] Use GitLab CI to build Mesa

2018-08-08 Thread Juan A. Suarez Romero
Hello.

This is a first part of a more complete proposal to use GitLab CI to build and
test Mesa. This first part just adds the required pieces to build Mesa, using 
the
different supported tools (meson, autotools, and scons).

A second part, to be sent in the future, will use the results of the former to
run different tests and verify everything works fine.

An example of the pipeline that will result from this patchset can be seen at
https://gitlab.freedesktop.org/jasuarez/mesa/pipelines/3070.

I hope I can explain here all the rationale behind this proposal. Any question
is welcomed.


## Brief introduction

This proposal is based on a setup we are using at Igalia for the different
releases we were in charge of. The idea is to build different Docker images
containing Mesa with different setups; thus we are build an image using Meson,
another using Autotools, and so on. Even more, as the Gallium drivers depend on
the LLVM version, we also use different setups with different LLVM versions.

Some of those images are later used to run different test suites in different
hardware. So we just save those Docker images for further pulling in a next step
in the pipeline. For those that we are not using for testing, we plainly discard
them. At least, they helped to verify that the setup builds correctly.

A very complete example of this setup pipeline can be seen in
https://gitlab.com/igalia/graphics/mesa/pipelines/26539728

As said before, right now we are just focusing on building the images, rather
than testing them. In a second part to be sent we will focus on the testing.


## Why Docker

When we started the initial setup, we have something clear: just build
everything once, and tests as in many devices as possible. The reasons are
different: we have powerful machines for building, but then for testing we have
different hosts with different power skills; some low-end NUCS, some with few
memory, and so on. And also, we wanted to ensure that the discrepancies when
testing were not due the different software configuration (different distros,
different versions, different installed packages, ...): use the same software as
much as possible. And then we have another requirement: have an easy way to
distribute the result in the testing machines.

And Containers is something that really helps to achive this. And inside
Containers, Docker is a de-facto, so we started to use Docker. Wich Docker, we
can build self-contained images with everything we need to run Mesa, and
distribute it very easily. And the fact that it allows to use layers to build
the images, makes quite easy to reuse previous results in the future builds.


## Why Rocker

As said before, Docker is a great tool, but it has a couple of drawbacks when
building the images.

On one side, the Dockerfile syntax is quite rigid, and does not allow for
complex configuration. For instance, it's quite difficult to create a Dockerfile
where you can allow to use Meson or Autotools to build Mesa, specified as
parameter when building the image. Either you create an unreadable Dockerfile,
or ends up creating different Dockerfiles, even when most of them shares a lot
of common code. And if you start to add more options, like LLVM version, it
becomes crazy.

One way to solve this problem is to create a Dockerfile with templates, like
Jinja or any similar tool, and then generate the final Dockerfile with the
proper options.

The other problem with Docker, more complex to build, is how to allow to
cache. We are using ccache to speed up the build time, but the problem is that
Docker does not allow to mount external directories when building an image. And
thus, we can't reuse the cache generated in previous builds. There are some
proposals like creating different images, or building the image using `docker
run` (which allows to mount those directories) plus `docker commit` to generate
the final image. But all of them leads to Dockerfiles quite difficult to
maintain. So solution is normally just not use cache, with the impact this has.

In our case, we solved both problems using Rocker instead of Docker. Rocker is
like a `docker build` with steroids, that fixes the above problems. It is a tool
that is able to create Docker images based on Rockerfiles, that are like
Dockerfiles but with enriched syntax, that provides the same power as a
template. And, which is more important, allows to mount external directories
when building the image; we use this feature to mount the ccache results
directory.

Unfortunately, Rocker is a tool that is not maintained anymore
(https://github.com/grammarly/rocker). We still use it because it provides
everything we need, and fortunately we don't need any more features.

Maybe there are other alternatives out there, but we were happy with this and
hence our proposal. If we want to use Docker rather than Rocker, then we could
use template tools like Jinja, and forget about caching during build, which will
impact on the build time.


## Involved 

Re: [Mesa-dev] [PATCH 0/4] Merge vulkan API generators.

2018-08-08 Thread Tapani Pälli



On 08.08.2018 17:31, Lionel Landwerlin wrote:

On 08/08/18 12:05, Lionel Landwerlin wrote:

On 08/08/18 00:14, Bas Nieuwenhuizen wrote:

radv was always just mirroring a derived version of the anv
version, sometimes hacked together and sometimes very behind.

As we grow more vulkan drivers this repetition makes even less
sense, so lets merge them. I took the anv generators as the
template and made radv use them.

This includes some messy stuff in the build system due to
difficulties with python includes. I tested with meson and
autotools. Android.mk is updated but not tested.


We have an android build target in our CI. I can give this series a go.

-
Lionel


Oh my bad, we don't actually have the Vulkan driver on Android as a 
target (just GL atm).




I can try building with these changes on Android tomorrow.

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


Re: [Mesa-dev] [PATCH mesa] anv: set error in all failure paths

2018-08-08 Thread Lionel Landwerlin

Reviewed-by: Lionel Landwerlin 

On 08/08/18 15:45, Eric Engestrom wrote:

Cc: Jason Ekstrand 
Fixes: 5b196f39bddc689742d3 "anv/pipeline: Compile to NIR in compile_graphics"
Signed-off-by: Eric Engestrom 
---
  src/intel/vulkan/anv_pipeline.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 23af0f1c9248858d6762..4074c8fd364f9b815f83 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -979,8 +979,10 @@ anv_pipeline_compile_graphics(struct anv_pipeline 
*pipeline,
 [s],
 [s].prog_data.base,
 [s].bind_map);
-  if (stages[s].nir == NULL)
+  if (stages[s].nir == NULL) {
+ result = vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
   goto fail;
+  }
 }
  
 /* Walk backwards to link */



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


[Mesa-dev] [Bug 107488] gl.h:2090: error: redefinition of typedef ‘GLeglImageOES’

2018-08-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107488

Brian Paul  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #3 from Brian Paul  ---
Fixed by 6ff4795c622762d6498c73b407070f9c6157878e

-- 
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 mesa] anv: set error in all failure paths

2018-08-08 Thread Tapani Pälli

Yep currently result is not set on this path;

Reviewed-by: Tapani Pälli 

On 08.08.2018 17:45, Eric Engestrom wrote:

Cc: Jason Ekstrand 
Fixes: 5b196f39bddc689742d3 "anv/pipeline: Compile to NIR in compile_graphics"
Signed-off-by: Eric Engestrom 
---
  src/intel/vulkan/anv_pipeline.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 23af0f1c9248858d6762..4074c8fd364f9b815f83 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -979,8 +979,10 @@ anv_pipeline_compile_graphics(struct anv_pipeline 
*pipeline,
 [s],
 [s].prog_data.base,
 [s].bind_map);
-  if (stages[s].nir == NULL)
+  if (stages[s].nir == NULL) {
+ result = vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
   goto fail;
+  }
 }
  
 /* Walk backwards to link */



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


Re: [Mesa-dev] [PATCH] travis: make drivers explicit in Meson targets

2018-08-08 Thread Eric Engestrom
On Wednesday, 2018-08-08 16:36:55 +0200, Juan A. Suarez Romero wrote:
> Like in the autotools target, make the list of drivers to be built in
> each of the Meson targets explicit.
> 
> This will help to identify missing dependencies and other issues more
> easily.
> 
> CC: Emil Velikov 

Technically, we could simply always put the [] around the list, but then
it would become a shell glob so we would have to quote it, but it's
already inside quotes, so escape...
Yeah, let's just leave it like you did :)

Reviewed-by: Eric Engestrom 

> ---
>  .travis.yml | 17 ++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/.travis.yml b/.travis.yml
> index 9f91d2c9b69..430c159c9c5 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -35,7 +35,9 @@ matrix:
>  - env:
>  - LABEL="meson Vulkan"
>  - BUILD=meson
> -- MESON_OPTIONS="-Ddri-drivers=[] -Dgallium-drivers=[]"
> +- DRI_DRIVERS=""
> +- GALLIUM_DRIVERS=""
> +- VULKAN_DRIVERS="intel,amd"
>  - LLVM_VERSION=6.0
>  - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
>addons:
> @@ -55,7 +57,9 @@ matrix:
>  - env:
>  - LABEL="meson loaders/classic DRI"
>  - BUILD=meson
> -- MESON_OPTIONS="-Dvulkan-drivers=[] -Dgallium-drivers=[]"
> +- DRI_DRIVERS="i915,i965,r100,r200,swrast,nouveau"
> +- GALLIUM_DRIVERS=""
> +- VULKAN_DRIVERS=""
>addons:
>  apt:
>packages:
> @@ -463,7 +467,6 @@ matrix:
>  - env:
>  - LABEL="macOS meson"
>  - BUILD=meson
> -- MESON_OPTIONS="-Degl=false"
>os: osx
>  
>  before_install:
> @@ -647,6 +650,14 @@ script:
>- |
>  if test "x$BUILD" = xmeson; then
>  
> +  if test "x$TRAVIS_OS_NAME" == xosx; then
> +MESON_OPTIONS="-Degl=false"
> +  fi
> +
> +  if test "x$TRAVIS_OS_NAME" == xlinux; then
> +MESON_OPTIONS="-Ddri-drivers=${DRI_DRIVERS:-[]} 
> -Dgallium-drivers=${GALLIUM_DRIVERS:-[]} 
> -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}"
> +  fi
> +
># Travis CI has moved to LLVM 5.0, and meson is detecting
># automatically the available version in /usr/local/bin based on
># the PATH env variable order preference.
> -- 
> 2.17.1
> 
> ___
> 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] i965: Advertise 8 bits subpixel precision for viewport bounds on gen6+

2018-08-08 Thread Danylo Piliaiev

Hi,

Since the exact value is not important for users,  Roland offered 
compelling explanation

and the value is also 8 on Windows - could the patch be reviewed/pushed?

- Danil

On 06/19/2018 03:44 PM, Roland Scheidegger wrote:

My guess would be 8 because that's what the rasterization subpixel
precision is, so precision beyond that doesn't really do much, even if
this actually is a float.
Plus, with maximum sized fb (16kx16k dimension) you don't actually
really get a lot more than 8 fixed points bits anyway (near those 16k).
So imho 8 makes most sense.

Roland


Am 19.06.2018 um 10:35 schrieb danylo:

Hi Lionel,

Indeed the value 8 here is questionable. I picked it because other
drivers advertise the same value e.g. in Mesa radeon returns 8 for gl
and vulkan or on Windows Intel's driver returns 8. But why 8? It's some
kind of mystery.


"If the implementation truely has floating point viewport bounds, it
may report a sufficiently high value to indicate this. "

8 seems to be a sufficiently high value (it seems if someone even checks
the value it's going like 'precision > 0' - it is used as a flag). But
still it's probably not good enough argument...

Floating point (IEEE 754) has 24 bits of significand precision, in other
way - 6 to 9 significant decimal digits. And drivers return 8, the only
8 in float-point is 8 exponent bits.

Unless someone knows why 8, there two paths:

   * Left it to be 8 - be the same as other drivers
   * Make 24 - to reflect 24 bits of significand precision of float


- Danil


On 18.06.18 17:27, Lionel Landwerlin wrote:

Hey Danylo,

Thanks for this patch.
I'm not really an expert here but my understanding is that it should
reflect the number of bits in fixed point precision.
We use 32bits floats in the packets sent to the hardware.
Quoting the spec :

"If the implementation truely has floating point viewport bounds, it
may report a sufficiently high value to indicate this. "

Maybe we should use something a bit bigger than 8?

Cheers,

-
Lionel

On 18/06/18 13:50, Danylo Piliaiev wrote:

We use floating-points for viewport bounds so VIEWPORT_SUBPIXEL_BITS
should reflect this.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105975

Signed-off-by: Danylo Piliaiev 
---
  src/mesa/drivers/dri/i965/brw_context.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c 
b/src/mesa/drivers/dri/i965/brw_context.c
index 9ced230..eacf326 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -688,7 +688,7 @@ brw_initialize_context_constants(struct brw_context *brw)
 /* ARB_viewport_array, OES_viewport_array */
 if (devinfo->gen >= 6) {
ctx->Const.MaxViewports = GEN6_NUM_VIEWPORTS;
-  ctx->Const.ViewportSubpixelBits = 0;
+  ctx->Const.ViewportSubpixelBits = 8;
  
/* Cast to float before negating because MaxViewportWidth is unsigned.

 */





___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-dev=02%7C01%7Csroland%40vmware.com%7Ce1ac7ef5378f4227aff508d5d5bfa182%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C636649941389721543=of%2FIoIzosaje7A3euJESjJMySE3eFjNifMg5SXzeEJU%3D=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 mesa] anv: set error in all failure paths

2018-08-08 Thread Eric Engestrom
Cc: Jason Ekstrand 
Fixes: 5b196f39bddc689742d3 "anv/pipeline: Compile to NIR in compile_graphics"
Signed-off-by: Eric Engestrom 
---
 src/intel/vulkan/anv_pipeline.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 23af0f1c9248858d6762..4074c8fd364f9b815f83 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -979,8 +979,10 @@ anv_pipeline_compile_graphics(struct anv_pipeline 
*pipeline,
[s],
[s].prog_data.base,
[s].bind_map);
-  if (stages[s].nir == NULL)
+  if (stages[s].nir == NULL) {
+ result = vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
  goto fail;
+  }
}
 
/* Walk backwards to link */
-- 
Cheers,
  Eric

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


[Mesa-dev] [PATCH] travis: make drivers explicit in Meson targets

2018-08-08 Thread Juan A. Suarez Romero
Like in the autotools target, make the list of drivers to be built in
each of the Meson targets explicit.

This will help to identify missing dependencies and other issues more
easily.

CC: Emil Velikov 
---
 .travis.yml | 17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 9f91d2c9b69..430c159c9c5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,7 +35,9 @@ matrix:
 - env:
 - LABEL="meson Vulkan"
 - BUILD=meson
-- MESON_OPTIONS="-Ddri-drivers=[] -Dgallium-drivers=[]"
+- DRI_DRIVERS=""
+- GALLIUM_DRIVERS=""
+- VULKAN_DRIVERS="intel,amd"
 - LLVM_VERSION=6.0
 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
   addons:
@@ -55,7 +57,9 @@ matrix:
 - env:
 - LABEL="meson loaders/classic DRI"
 - BUILD=meson
-- MESON_OPTIONS="-Dvulkan-drivers=[] -Dgallium-drivers=[]"
+- DRI_DRIVERS="i915,i965,r100,r200,swrast,nouveau"
+- GALLIUM_DRIVERS=""
+- VULKAN_DRIVERS=""
   addons:
 apt:
   packages:
@@ -463,7 +467,6 @@ matrix:
 - env:
 - LABEL="macOS meson"
 - BUILD=meson
-- MESON_OPTIONS="-Degl=false"
   os: osx
 
 before_install:
@@ -647,6 +650,14 @@ script:
   - |
 if test "x$BUILD" = xmeson; then
 
+  if test "x$TRAVIS_OS_NAME" == xosx; then
+MESON_OPTIONS="-Degl=false"
+  fi
+
+  if test "x$TRAVIS_OS_NAME" == xlinux; then
+MESON_OPTIONS="-Ddri-drivers=${DRI_DRIVERS:-[]} 
-Dgallium-drivers=${GALLIUM_DRIVERS:-[]} -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}"
+  fi
+
   # Travis CI has moved to LLVM 5.0, and meson is detecting
   # automatically the available version in /usr/local/bin based on
   # the PATH env variable order preference.
-- 
2.17.1

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


Re: [Mesa-dev] [PATCH mesa] intel/tools: add missing variable initialisation

2018-08-08 Thread Eric Engestrom
On Wednesday, 2018-08-08 15:29:49 +0100, Lionel Landwerlin wrote:
> Reviewed-by: Lionel Landwerlin 
> 
> bo_addr doesn't have a warning?

Nope; I guess bo_type guards it perfectly ;)

> 
> On 08/08/18 15:27, Eric Engestrom wrote:
> > Cc: Lionel Landwerlin 
> > Signed-off-by: Eric Engestrom 
> > ---
> >   src/intel/tools/error2aub.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/src/intel/tools/error2aub.c b/src/intel/tools/error2aub.c
> > index 3407dcec0b795168c4c8..2030593691cc4ba6dba0 100644
> > --- a/src/intel/tools/error2aub.c
> > +++ b/src/intel/tools/error2aub.c
> > @@ -205,7 +205,7 @@ main(int argc, char *argv[])
> > BO_TYPE_UNKNOWN = 0,
> > BO_TYPE_BATCH,
> > BO_TYPE_USER,
> > -   } bo_type;
> > +   } bo_type = BO_TYPE_UNKNOWN;
> >  uint64_t bo_addr;
> >  char *line = NULL;
> 
> 
> ___
> 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 0/4] Merge vulkan API generators.

2018-08-08 Thread Lionel Landwerlin

On 08/08/18 12:05, Lionel Landwerlin wrote:

On 08/08/18 00:14, Bas Nieuwenhuizen wrote:

radv was always just mirroring a derived version of the anv
version, sometimes hacked together and sometimes very behind.

As we grow more vulkan drivers this repetition makes even less
sense, so lets merge them. I took the anv generators as the
template and made radv use them.

This includes some messy stuff in the build system due to
difficulties with python includes. I tested with meson and
autotools. Android.mk is updated but not tested.


We have an android build target in our CI. I can give this series a go.

-
Lionel


Oh my bad, we don't actually have the Vulkan driver on Android as a 
target (just GL atm).


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


Re: [Mesa-dev] [PATCH mesa] intel/tools: add missing variable initialisation

2018-08-08 Thread Eric Engestrom
On Wednesday, 2018-08-08 15:27:13 +0100, Eric Engestrom wrote:
> Cc: Lionel Landwerlin 

Actually:
Cc: Jason Ekstrand 
Fixes: 6a60beba4089315685b8 "intel/tools: Add an error state to aub translator"

> Signed-off-by: Eric Engestrom 
> ---
>  src/intel/tools/error2aub.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/intel/tools/error2aub.c b/src/intel/tools/error2aub.c
> index 3407dcec0b795168c4c8..2030593691cc4ba6dba0 100644
> --- a/src/intel/tools/error2aub.c
> +++ b/src/intel/tools/error2aub.c
> @@ -205,7 +205,7 @@ main(int argc, char *argv[])
>BO_TYPE_UNKNOWN = 0,
>BO_TYPE_BATCH,
>BO_TYPE_USER,
> -   } bo_type;
> +   } bo_type = BO_TYPE_UNKNOWN;
> uint64_t bo_addr;
>  
> char *line = NULL;
> -- 
> Cheers,
>   Eric
> 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH mesa] intel/tools: add missing variable initialisation

2018-08-08 Thread Lionel Landwerlin

Reviewed-by: Lionel Landwerlin 

bo_addr doesn't have a warning?

On 08/08/18 15:27, Eric Engestrom wrote:

Cc: Lionel Landwerlin 
Signed-off-by: Eric Engestrom 
---
  src/intel/tools/error2aub.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/tools/error2aub.c b/src/intel/tools/error2aub.c
index 3407dcec0b795168c4c8..2030593691cc4ba6dba0 100644
--- a/src/intel/tools/error2aub.c
+++ b/src/intel/tools/error2aub.c
@@ -205,7 +205,7 @@ main(int argc, char *argv[])
BO_TYPE_UNKNOWN = 0,
BO_TYPE_BATCH,
BO_TYPE_USER,
-   } bo_type;
+   } bo_type = BO_TYPE_UNKNOWN;
 uint64_t bo_addr;
  
 char *line = NULL;



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


[Mesa-dev] [PATCH mesa] intel/tools: add missing variable initialisation

2018-08-08 Thread Eric Engestrom
Cc: Lionel Landwerlin 
Signed-off-by: Eric Engestrom 
---
 src/intel/tools/error2aub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/tools/error2aub.c b/src/intel/tools/error2aub.c
index 3407dcec0b795168c4c8..2030593691cc4ba6dba0 100644
--- a/src/intel/tools/error2aub.c
+++ b/src/intel/tools/error2aub.c
@@ -205,7 +205,7 @@ main(int argc, char *argv[])
   BO_TYPE_UNKNOWN = 0,
   BO_TYPE_BATCH,
   BO_TYPE_USER,
-   } bo_type;
+   } bo_type = BO_TYPE_UNKNOWN;
uint64_t bo_addr;
 
char *line = NULL;
-- 
Cheers,
  Eric

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


[Mesa-dev] [Bug 107457] [Tracker] Mesa 18.2 release tracker

2018-08-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107457

Mark Janes  changed:

   What|Removed |Added

 Depends on||107223


Referenced Bugs:

https://bugs.freedesktop.org/show_bug.cgi?id=107223
[Bug 107223] [GEN9+] 50% perf drop in SynMark Fill* tests (E2E RBC gets
disabled?)
-- 
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 10/11] mesa: expose EXT_texture_buffer_object

2018-08-08 Thread Ilia Mirkin
Aliased functions shouldn't be added separately to the function list.

On Wed, Aug 8, 2018 at 1:42 AM, Marek Olšák  wrote:
> From: Marek Olšák 
>
> This is needed for exposing the samplerBuffer functions under
> EXT_gpu_shader4.
>
> glTexBufferEXT is defined in glapi, but "make check" fails.
> What am I doing wrong?
> ---
>  docs/relnotes/18.3.0.html   | 1 +
>  src/mesa/main/extensions_table.h| 1 +
>  src/mesa/main/tests/dispatch_sanity.cpp | 1 +
>  3 files changed, 3 insertions(+)
>
> diff --git a/docs/relnotes/18.3.0.html b/docs/relnotes/18.3.0.html
> index 786145ad8da..6274c9147a1 100644
> --- a/docs/relnotes/18.3.0.html
> +++ b/docs/relnotes/18.3.0.html
> @@ -45,20 +45,21 @@ TBD.
>
>
>  New features
>
>  
>  Note: some of the new features are only available with certain drivers.
>  
>
>  
>  GL_AMD_framebuffer_multisample_advanced on radeonsi.
> +GL_EXT_texture_buffer_object on i965, nv50, nvc0, r600, radeonsi.
>  
>
>  Bug fixes
>
>  
>  TBD
>  
>
>  Changes
>
> diff --git a/src/mesa/main/extensions_table.h 
> b/src/mesa/main/extensions_table.h
> index bdba49d5380..5eb5c3278e9 100644
> --- a/src/mesa/main/extensions_table.h
> +++ b/src/mesa/main/extensions_table.h
> @@ -263,20 +263,21 @@ EXT(EXT_shadow_funcs, ARB_shadow
>  EXT(EXT_stencil_two_side, EXT_stencil_two_side   
> , GLL,  x ,  x ,  x , 2001)
>  EXT(EXT_stencil_wrap, dummy_true 
> , GLL,  x ,  x ,  x , 2002)
>  EXT(EXT_subtexture  , dummy_true 
> , GLL,  x ,  x ,  x , 1995)
>  EXT(EXT_tessellation_point_size , ARB_tessellation_shader
> ,  x ,  x ,  x ,  31, 2013)
>  EXT(EXT_tessellation_shader , ARB_tessellation_shader
> ,  x ,  x ,  x ,  31, 2013)
>  EXT(EXT_texture , dummy_true 
> , GLL,  x ,  x ,  x , 1996)
>  EXT(EXT_texture3D   , dummy_true 
> , GLL,  x ,  x ,  x , 1996)
>  EXT(EXT_texture_array   , EXT_texture_array  
> , GLL, GLC,  x ,  x , 2006)
>  EXT(EXT_texture_border_clamp, ARB_texture_border_clamp   
> ,  x ,  x ,  x , ES2, 2014)
>  EXT(EXT_texture_buffer  , OES_texture_buffer 
> ,  x ,  x ,  x ,  31, 2014)
> +EXT(EXT_texture_buffer_object   , ARB_texture_buffer_object  
> , GLL, GLC,  x ,  x , 2007)
>  EXT(EXT_texture_compression_dxt1, ANGLE_texture_compression_dxt  
> , GLL, GLC, ES1, ES2, 2004)
>  EXT(EXT_texture_compression_latc, EXT_texture_compression_latc   
> , GLL,  x ,  x ,  x , 2006)
>  EXT(EXT_texture_compression_rgtc, ARB_texture_compression_rgtc   
> , GLL, GLC,  x ,  x , 2004)
>  EXT(EXT_texture_compression_s3tc, EXT_texture_compression_s3tc   
> , GLL, GLC,  x ,  x , 2000)
>  EXT(EXT_texture_cube_map, ARB_texture_cube_map   
> , GLL,  x ,  x ,  x , 2001)
>  EXT(EXT_texture_cube_map_array  , OES_texture_cube_map_array 
> ,  x ,  x ,  x ,  31, 2014)
>  EXT(EXT_texture_edge_clamp  , dummy_true 
> , GLL,  x ,  x ,  x , 1997)
>  EXT(EXT_texture_env_add , dummy_true 
> , GLL,  x ,  x ,  x , 1999)
>  EXT(EXT_texture_env_combine , dummy_true 
> , GLL,  x ,  x ,  x , 2000)
>  EXT(EXT_texture_env_dot3, EXT_texture_env_dot3   
> , GLL,  x ,  x ,  x , 2000)
> diff --git a/src/mesa/main/tests/dispatch_sanity.cpp 
> b/src/mesa/main/tests/dispatch_sanity.cpp
> index 449dd3652cc..a7562b766f3 100644
> --- a/src/mesa/main/tests/dispatch_sanity.cpp
> +++ b/src/mesa/main/tests/dispatch_sanity.cpp
> @@ -499,20 +499,21 @@ const struct function 
> common_desktop_functions_possible[] = {
> { "glClearBufferuiv", 30, -1 },
> { "glClearBufferfv", 30, -1 },
> { "glClearBufferfi", 30, -1 },
> { "glGetStringi", 30, -1 },
>
> /* GL 3.1 */
> { "glDrawArraysInstanced", 31, -1 },
> { "glDrawElementsInstanced", 31, -1 },
> { "glPrimitiveRestartIndex", 31, -1 },
> { "glTexBuffer", 31, -1 },
> +   { "glTexBufferEXT", 31, -1 },
>
> /* GL_ARB_texture_buffer_range */
> { "glTexBufferRange", 43, -1 },
>
> /* GL_ARB_shader_objects */
> { "glDeleteObjectARB", 31, -1 },
> { "glGetHandleARB", 31, -1 },
> { "glDetachObjectARB", 31, -1 },
> { "glCreateShaderObjectARB", 31, -1 },
> { "glCreateProgramObjectARB", 31, -1 },
> --
> 2.17.1
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [Bug 106394] Black Mesa cannot compile shaders because of missing GL_EXT_gpu_shader4

2018-08-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=106394

--- Comment #5 from Gregor Münch  ---
Just tested the patch series with Black Mesa (non beta) and it started working.

-- 
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] swr: bump minimum supported LLVM version to 6.0

2018-08-08 Thread Juan A. Suarez Romero
On Mon, 2018-08-06 at 11:52 +0200, Juan A. Suarez Romero wrote:
> RADV now requires LLVM 6.0 or greater, and thus we can't build dist
> tarball because swr requires LLVM 5.0.
> 
> Let's bump required LLVM to 6.0 in swr too.
> 
> Fixes: fd1121e839 ("amd: remove support for LLVM 5.0")
> Cc: Tim Rowley 
> Cc: Emil Velikov 
> Cc: Dylan Baker 
> Cc: Eric Engestrom 

CC: "Cherniak, Bruce" 

> ---
>  configure.ac| 7 +++
>  src/gallium/drivers/swr/Makefile.am | 2 +-
>  src/gallium/drivers/swr/SConscript  | 4 ++--
>  3 files changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 7d898aeda9e..10d37584696 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -110,7 +110,7 @@ LLVM_REQUIRED_OPENCL=3.9.0
>  LLVM_REQUIRED_R600=3.9.0
>  LLVM_REQUIRED_RADEONSI=6.0.0
>  LLVM_REQUIRED_RADV=6.0.0
> -LLVM_REQUIRED_SWR=5.0.0
> +LLVM_REQUIRED_SWR=6.0.0
>  
>  dnl Check for progs
>  AC_PROG_CPP
> @@ -2797,9 +2797,8 @@ if test -n "$with_gallium_drivers"; then
>  fi
>  
>  # XXX: Keep in sync with LLVM_REQUIRED_SWR
> -AM_CONDITIONAL(SWR_INVALID_LLVM_VERSION, test "x$LLVM_VERSION" != x5.0.0 -a \
> -  "x$LLVM_VERSION" != x5.0.1 -a \
> -  "x$LLVM_VERSION" != x5.0.2)
> +AM_CONDITIONAL(SWR_INVALID_LLVM_VERSION, test "x$LLVM_VERSION" != x6.0.0 -a \
> +  "x$LLVM_VERSION" != x6.0.1)
>  
>  if test "x$enable_llvm" = "xyes" -a "$with_gallium_drivers"; then
>  llvm_require_version $LLVM_REQUIRED_GALLIUM "gallium"
> diff --git a/src/gallium/drivers/swr/Makefile.am 
> b/src/gallium/drivers/swr/Makefile.am
> index 5cc3f77478a..d20a6bdbed3 100644
> --- a/src/gallium/drivers/swr/Makefile.am
> +++ b/src/gallium/drivers/swr/Makefile.am
> @@ -375,7 +375,7 @@ include $(top_srcdir)/install-gallium-links.mk
>  dist-hook:
>  if SWR_INVALID_LLVM_VERSION
>   @echo "*"
> - @echo "LLVM 5.0.x required to create the tarball"
> + @echo "LLVM 6.0.x required to create the tarball"
>   @echo "*"
>   @test
>  endif
> diff --git a/src/gallium/drivers/swr/SConscript 
> b/src/gallium/drivers/swr/SConscript
> index 224372eb3f5..a89d02c5db0 100644
> --- a/src/gallium/drivers/swr/SConscript
> +++ b/src/gallium/drivers/swr/SConscript
> @@ -12,8 +12,8 @@ if not env['llvm']:
>  env['swr'] = False
>  Return()
>  
> -if env['LLVM_VERSION'] < distutils.version.LooseVersion('5.0'):
> -print("warning: swr requires LLVM >= 5.0: not building swr")
> +if env['LLVM_VERSION'] < distutils.version.LooseVersion('6.0'):
> +print("warning: swr requires LLVM >= 6.0: not building swr")
>  env['swr'] = False
>  Return()
>  

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


Re: [Mesa-dev] [PATCH] swr: bump minimum supported LLVM version to 6.0

2018-08-08 Thread Eric Engestrom
On Monday, 2018-08-06 11:52:48 +0200, Juan A. Suarez Romero wrote:
> RADV now requires LLVM 6.0 or greater, and thus we can't build dist
> tarball because swr requires LLVM 5.0.
> 
> Let's bump required LLVM to 6.0 in swr too.
> 
> Fixes: fd1121e839 ("amd: remove support for LLVM 5.0")
> Cc: Tim Rowley 
> Cc: Emil Velikov 
> Cc: Dylan Baker 
> Cc: Eric Engestrom 

Same bump is needed in meson, but with that:
Reviewed-by: Eric Engestrom 

8<
diff --git a/meson.build b/meson.build
index 123956ed1b8b3b7872d8..90d3b0c0146fcafdab89 100644
--- a/meson.build
+++ b/meson.build
@@ -1161,7 +1161,7 @@ endif
 if with_amd_vk or with_gallium_radeonsi
   _llvm_version = '>= 6.0.0'
 elif with_gallium_swr
-  _llvm_version = '>= 5.0.0'
+  _llvm_version = '>= 6.0.0'
 elif with_gallium_opencl or with_gallium_r600
   _llvm_version = '>= 3.9.0'
 else
>8

> ---
>  configure.ac| 7 +++
>  src/gallium/drivers/swr/Makefile.am | 2 +-
>  src/gallium/drivers/swr/SConscript  | 4 ++--
>  3 files changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 7d898aeda9e..10d37584696 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -110,7 +110,7 @@ LLVM_REQUIRED_OPENCL=3.9.0
>  LLVM_REQUIRED_R600=3.9.0
>  LLVM_REQUIRED_RADEONSI=6.0.0
>  LLVM_REQUIRED_RADV=6.0.0
> -LLVM_REQUIRED_SWR=5.0.0
> +LLVM_REQUIRED_SWR=6.0.0
>  
>  dnl Check for progs
>  AC_PROG_CPP
> @@ -2797,9 +2797,8 @@ if test -n "$with_gallium_drivers"; then
>  fi
>  
>  # XXX: Keep in sync with LLVM_REQUIRED_SWR
> -AM_CONDITIONAL(SWR_INVALID_LLVM_VERSION, test "x$LLVM_VERSION" != x5.0.0 -a \
> -  "x$LLVM_VERSION" != x5.0.1 -a \
> -  "x$LLVM_VERSION" != x5.0.2)
> +AM_CONDITIONAL(SWR_INVALID_LLVM_VERSION, test "x$LLVM_VERSION" != x6.0.0 -a \
> +  "x$LLVM_VERSION" != x6.0.1)
>  
>  if test "x$enable_llvm" = "xyes" -a "$with_gallium_drivers"; then
>  llvm_require_version $LLVM_REQUIRED_GALLIUM "gallium"
> diff --git a/src/gallium/drivers/swr/Makefile.am 
> b/src/gallium/drivers/swr/Makefile.am
> index 5cc3f77478a..d20a6bdbed3 100644
> --- a/src/gallium/drivers/swr/Makefile.am
> +++ b/src/gallium/drivers/swr/Makefile.am
> @@ -375,7 +375,7 @@ include $(top_srcdir)/install-gallium-links.mk
>  dist-hook:
>  if SWR_INVALID_LLVM_VERSION
>   @echo "*"
> - @echo "LLVM 5.0.x required to create the tarball"
> + @echo "LLVM 6.0.x required to create the tarball"
>   @echo "*"
>   @test
>  endif
> diff --git a/src/gallium/drivers/swr/SConscript 
> b/src/gallium/drivers/swr/SConscript
> index 224372eb3f5..a89d02c5db0 100644
> --- a/src/gallium/drivers/swr/SConscript
> +++ b/src/gallium/drivers/swr/SConscript
> @@ -12,8 +12,8 @@ if not env['llvm']:
>  env['swr'] = False
>  Return()
>  
> -if env['LLVM_VERSION'] < distutils.version.LooseVersion('5.0'):
> -print("warning: swr requires LLVM >= 5.0: not building swr")
> +if env['LLVM_VERSION'] < distutils.version.LooseVersion('6.0'):
> +print("warning: swr requires LLVM >= 6.0: not building swr")
>  env['swr'] = False
>  Return()
>  
> -- 
> 2.17.1
> 
> ___
> 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 0/4] Merge vulkan API generators.

2018-08-08 Thread Lionel Landwerlin

On 08/08/18 00:14, Bas Nieuwenhuizen wrote:

radv was always just mirroring a derived version of the anv
version, sometimes hacked together and sometimes very behind.

As we grow more vulkan drivers this repetition makes even less
sense, so lets merge them. I took the anv generators as the
template and made radv use them.

This includes some messy stuff in the build system due to
difficulties with python includes. I tested with meson and
autotools. Android.mk is updated but not tested.


We have an android build target in our CI. I can give this series a go.

-
Lionel



Bas Nieuwenhuizen (4):
   vulkan: Add central copy of entrypoints/extensions code.
   vulkan/util: Add support to not generate the trampolines.
   anv: Use central api generation scripts.
   radv: Integrate with common generators.

  src/amd/vulkan/Android.mk   |  16 +-
  src/amd/vulkan/Makefile.am  |  29 +-
  src/amd/vulkan/meson.build  |  91 ++--
  src/amd/vulkan/radv_device.c|  56 ++-
  src/amd/vulkan/radv_entrypoints_gen.py  | 462 +---
  src/amd/vulkan/radv_extensions.py   | 236 +--
  src/amd/vulkan/radv_extensions_gen.py   |  44 ++
  src/amd/vulkan/radv_icd.py  |   1 +
  src/amd/vulkan/radv_private.h   |   9 +-
  src/amd/vulkan/radv_wsi.c   |   6 +-
  src/intel/Android.vulkan.mk |   9 +
  src/intel/Makefile.vulkan.am|  25 +-
  src/intel/vulkan/anv_device.c   |  46 ++
  src/intel/vulkan/anv_entrypoints_gen.py | 537 +---
  src/intel/vulkan/anv_extensions.py  |  68 +--
  src/intel/vulkan/anv_extensions_gen.py  | 177 +---
  src/intel/vulkan/meson.build|  15 +-
  src/vulkan/Makefile.am  |   3 +
  src/vulkan/util/meson.build |   2 +
  src/vulkan/util/vk_entrypoints_gen.py   | 522 +++
  src/vulkan/util/vk_extensions.py|  93 
  src/vulkan/util/vk_extensions_gen.py| 205 +
  22 files changed, 1131 insertions(+), 1521 deletions(-)
  create mode 100644 src/amd/vulkan/radv_extensions_gen.py
  create mode 100644 src/vulkan/util/vk_entrypoints_gen.py
  create mode 100644 src/vulkan/util/vk_extensions.py
  create mode 100644 src/vulkan/util/vk_extensions_gen.py



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


Re: [Mesa-dev] [PATCH 10/11] mesa: expose EXT_texture_buffer_object

2018-08-08 Thread Emil Velikov
On 8 August 2018 at 06:42, Marek Olšák  wrote:
> From: Marek Olšák 
>
> This is needed for exposing the samplerBuffer functions under
> EXT_gpu_shader4.
>
> glTexBufferEXT is defined in glapi, but "make check" fails.
> What am I doing wrong?
There should be one in src/mapi/glapi/gen/
One of these days we should stop rolling our own and use the canonical
registry/gl.xlm

Until then, make a separate xml file - see for example
a0d6732182ee62834993187e8cbd84fa4e03d786

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


Re: [Mesa-dev] [PATCH] travis: remove libedit-dev dependency in LLVM 6.0 targets

2018-08-08 Thread Emil Velikov
On 8 August 2018 at 11:20, Juan A. Suarez Romero  wrote:
> In LLVM <6.0 we added explicitly libedit-dev, as it was required to
> satisfy apt dependencies.
>
> In LLVM 6.0, this is not required anymore, so let's remove it.
>
> CC: Emil Velikov 
Bit-by-bit we'll remove all the hacks/workarounds. Thank you for
dropping this one.

Reviewed-by: Emil Velikov 

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


  1   2   >