Mesa (master): glsl: report correct number of allowed vertex inputs and fragment outputs

2016-03-09 Thread Iago Toral Quiroga
Module: Mesa
Branch: master
Commit: 3e3de9ec0a2c5d6ffac65a4b66022b3e41d7b019
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=3e3de9ec0a2c5d6ffac65a4b66022b3e41d7b019

Author: Iago Toral Quiroga 
Date:   Wed Mar  9 11:48:25 2016 +0100

glsl: report correct number of allowed vertex inputs and fragment outputs

Before we would always report 16 for both and we would only fail if either
one exceeded 16. Now we fail if the maximum for each is exceeded, even if
it is smaller than 16 and we report the correct maximum.

Also, expand the size of to_assign[] to 32. There is code at the top
of the function handling max_index up to 32, so this just makes the
code more consistent.

Reviewed-by: Timothy Arceri 

---

 src/compiler/glsl/linker.cpp | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 4cec107..76b700d 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -2417,7 +2417,8 @@ assign_attribute_or_color_locations(gl_shader_program 
*prog,
 /* Reversed because we want a descending order sort below. */
 return r->slots - l->slots;
   }
-   } to_assign[16];
+   } to_assign[32];
+   assert(max_index <= 32);
 
unsigned num_attr = 0;
 
@@ -2625,11 +2626,11 @@ assign_attribute_or_color_locations(gl_shader_program 
*prog,
 continue;
   }
 
-  if (num_attr >= ARRAY_SIZE(to_assign)) {
+  if (num_attr >= max_index) {
  linker_error(prog, "too many %s (max %u)",
   target_index == MESA_SHADER_VERTEX ?
   "vertex shader inputs" : "fragment shader outputs",
-  (unsigned)ARRAY_SIZE(to_assign));
+  max_index);
  return false;
   }
   to_assign[num_attr].slots = slots;

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


Mesa (master): nouveau: Fix clang reserved-user-defined-literal error.

2016-03-09 Thread Vinson Lee
Module: Mesa
Branch: master
Commit: d46feee697671a0815dc8dac4ffb70d1e9142bc2
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d46feee697671a0815dc8dac4ffb70d1e9142bc2

Author: Vinson Lee 
Date:   Wed Mar  9 00:53:02 2016 -0800

nouveau: Fix clang reserved-user-defined-literal error.

  CXX  codegen/nv50_ir.lo
In file included from codegen/nv50_ir.cpp:28:
./nouveau_debug.h:19:30: error: invalid suffix on literal; C++11 requires a 
space between literal and identifier
  [-Wreserved-user-defined-literal]
   fprintf(stderr, "%s:%d - "fmt, __FUNCTION__, __LINE__, ##args)
 ^

Signed-off-by: Vinson Lee 
Reviewed-by: Samuel Pitoiset 

---

 src/gallium/drivers/nouveau/nouveau_debug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nouveau_debug.h 
b/src/gallium/drivers/nouveau/nouveau_debug.h
index d17df81..546a4ad 100644
--- a/src/gallium/drivers/nouveau/nouveau_debug.h
+++ b/src/gallium/drivers/nouveau/nouveau_debug.h
@@ -16,7 +16,7 @@
 #define NOUVEAU_DEBUG 0
 
 #define NOUVEAU_ERR(fmt, args...) \
-   fprintf(stderr, "%s:%d - "fmt, __FUNCTION__, __LINE__, ##args)
+   fprintf(stderr, "%s:%d - " fmt, __FUNCTION__, __LINE__, ##args)
 
 #define NOUVEAU_DBG(ch, args...)   \
if ((NOUVEAU_DEBUG) & (NOUVEAU_DEBUG_##ch))\

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


Mesa (master): mesa: Make glGetInteger64v convert float/ doubles to 32-bit integers.

2016-03-09 Thread Kenneth Graunke
Module: Mesa
Branch: master
Commit: 3823b53ff88b36cfe0c46a2207abe8568237283d
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=3823b53ff88b36cfe0c46a2207abe8568237283d

Author: Kenneth Graunke 
Date:   Tue Mar  8 20:45:26 2016 -0800

mesa: Make glGetInteger64v convert float/doubles to 32-bit integers.

According to the GL 4.4 core specification, section 2.2.2 ("Data
Conversions For State Query Commands"):

"If a command returning integer data is called, such as GetIntegerv or
 GetInteger64v, a boolean value of TRUE or FALSE is interpreted as one
 or zero, respectively. A floating-point value is rounded to the nearest
 integer, unless the value is an RGBA color component, a DepthRange
 value, or a depth buffer clear value. In these cases, the query command
 converts the floating-point value to an integer according to the INT
 entry of table 18.2; a value not in [−1, 1] converts to an undefined
 value."

The INT entry of table 18.2 shows that b = 32, meaning the expectation
is to convert it to a 32-bit integer value.

Fixes:
dEQP-GLES3.functional.state_query.floats.blend_color_getinteger64
dEQP-GLES3.functional.state_query.floats.color_clear_value_getinteger64
dEQP-GLES3.functional.state_query.floats.depth_clear_value_getinteger64

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94456
Signed-off-by: Kenneth Graunke 
Reviewed-by: Dave Airlie 

---

 src/mesa/main/get.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 4cc82d8..67c4f99 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1717,19 +1717,19 @@ _mesa_GetInteger64v(GLenum pname, GLint64 *params)
   break;
 
case TYPE_FLOATN_4:
-  params[3] = FLOAT_TO_INT64(((GLfloat *) p)[3]);
+  params[3] = FLOAT_TO_INT(((GLfloat *) p)[3]);
case TYPE_FLOATN_3:
-  params[2] = FLOAT_TO_INT64(((GLfloat *) p)[2]);
+  params[2] = FLOAT_TO_INT(((GLfloat *) p)[2]);
case TYPE_FLOATN_2:
-  params[1] = FLOAT_TO_INT64(((GLfloat *) p)[1]);
+  params[1] = FLOAT_TO_INT(((GLfloat *) p)[1]);
case TYPE_FLOATN:
-  params[0] = FLOAT_TO_INT64(((GLfloat *) p)[0]);
+  params[0] = FLOAT_TO_INT(((GLfloat *) p)[0]);
   break;
 
case TYPE_DOUBLEN_2:
-  params[1] = FLOAT_TO_INT64(((GLdouble *) p)[1]);
+  params[1] = FLOAT_TO_INT(((GLdouble *) p)[1]);
case TYPE_DOUBLEN:
-  params[0] = FLOAT_TO_INT64(((GLdouble *) p)[0]);
+  params[0] = FLOAT_TO_INT(((GLdouble *) p)[0]);
   break;
 
case TYPE_INT_4:

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


Mesa (vulkan): anv/blit2d: Use the tiling enum for simplicity

2016-03-09 Thread Nanley Chery
Module: Mesa
Branch: vulkan
Commit: 7fbbad01706f08645e832e6dd2f5eeaf1e3c6894
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7fbbad01706f08645e832e6dd2f5eeaf1e3c6894

Author: Nanley Chery 
Date:   Tue Mar  8 09:37:43 2016 -0800

anv/blit2d: Use the tiling enum for simplicity

Signed-off-by: Nanley Chery 
Reviewed-by: Anuj Phogat 

---

 src/intel/vulkan/anv_meta_blit2d.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/intel/vulkan/anv_meta_blit2d.c 
b/src/intel/vulkan/anv_meta_blit2d.c
index d49b470..6f07342 100644
--- a/src/intel/vulkan/anv_meta_blit2d.c
+++ b/src/intel/vulkan/anv_meta_blit2d.c
@@ -110,8 +110,7 @@ anv_meta_blit2d(struct anv_cmd_buffer *cmd_buffer,
   struct isl_tile_info tile_info;
 
   anv_image_info.isl_tiling_flags = 1 << src->tiling;
-  image_info.tiling = anv_image_info.isl_tiling_flags ==
-  ISL_TILING_LINEAR_BIT ?
+  image_info.tiling = src->tiling == ISL_TILING_LINEAR ?
   VK_IMAGE_TILING_LINEAR : VK_IMAGE_TILING_OPTIMAL;
   image_info.usage = src_usage;
   image_info.format = src_format,
@@ -125,8 +124,7 @@ anv_meta_blit2d(struct anv_cmd_buffer *cmd_buffer,
_buffer->pool->alloc, _image);
 
   anv_image_info.isl_tiling_flags = 1 << dst->tiling;
-  image_info.tiling = anv_image_info.isl_tiling_flags ==
-  ISL_TILING_LINEAR_BIT ?
+  image_info.tiling = dst->tiling == ISL_TILING_LINEAR ?
   VK_IMAGE_TILING_LINEAR : VK_IMAGE_TILING_OPTIMAL;
   image_info.usage = dst_usage;
   image_info.format = dst_format,

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


Mesa (vulkan): anv/meta: Split anv_meta_blit.c into three files

2016-03-09 Thread Nanley Chery
Module: Mesa
Branch: vulkan
Commit: 627728cce55b8b67bb30bdd206affb6f0885315b
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=627728cce55b8b67bb30bdd206affb6f0885315b

Author: Nanley Chery 
Date:   Mon Mar  7 15:15:33 2016 -0800

anv/meta: Split anv_meta_blit.c into three files

The new organization is as follows:
* anv_meta_blit.c: Blit and state setup/teardown commands
* anv_meta_copy.c: Copy and update commands
* anv_meta_blit2d.c: 2D Blitter API commands

Also, change the formatting to contain most lines
within 80 columns.

Signed-off-by: Nanley Chery 
Reviewed-by: Anuj Phogat 

---

 src/intel/vulkan/Makefile.am   |   2 +
 src/intel/vulkan/anv_meta_blit.c   | 612 +
 src/intel/vulkan/anv_meta_blit2d.c | 213 +
 src/intel/vulkan/anv_meta_copy.c   | 441 ++
 4 files changed, 662 insertions(+), 606 deletions(-)

Diff:   
http://cgit.freedesktop.org/mesa/mesa/diff/?id=627728cce55b8b67bb30bdd206affb6f0885315b
___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (vulkan): anv/meta: Prefix anv_ to meta_emit_blit()

2016-03-09 Thread Nanley Chery
Module: Mesa
Branch: vulkan
Commit: 514c0557178b0325c59a28d68b0f250f0eeaddf5
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=514c0557178b0325c59a28d68b0f250f0eeaddf5

Author: Nanley Chery 
Date:   Tue Mar  8 12:45:55 2016 -0800

anv/meta: Prefix anv_ to meta_emit_blit()

Follow the convention for non-static functions.

Signed-off-by: Nanley Chery 
Reviewed-by: Anuj Phogat 

---

 src/intel/vulkan/anv_meta.h| 2 +-
 src/intel/vulkan/anv_meta_blit.c   | 4 ++--
 src/intel/vulkan/anv_meta_blit2d.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/intel/vulkan/anv_meta.h b/src/intel/vulkan/anv_meta.h
index fb562db..e2e0043 100644
--- a/src/intel/vulkan/anv_meta.h
+++ b/src/intel/vulkan/anv_meta.h
@@ -106,7 +106,7 @@ anv_meta_end_blit2d(struct anv_cmd_buffer *cmd_buffer,
 struct anv_meta_saved_state *save);
 
 void
-meta_emit_blit(struct anv_cmd_buffer *cmd_buffer,
+anv_meta_emit_blit(struct anv_cmd_buffer *cmd_buffer,
struct anv_image *src_image,
struct anv_image_view *src_iview,
VkOffset3D src_offset,
diff --git a/src/intel/vulkan/anv_meta_blit.c b/src/intel/vulkan/anv_meta_blit.c
index 7bddc6b..2c3c917 100644
--- a/src/intel/vulkan/anv_meta_blit.c
+++ b/src/intel/vulkan/anv_meta_blit.c
@@ -120,7 +120,7 @@ meta_prepare_blit(struct anv_cmd_buffer *cmd_buffer,
 }
 
 void
-meta_emit_blit(struct anv_cmd_buffer *cmd_buffer,
+anv_meta_emit_blit(struct anv_cmd_buffer *cmd_buffer,
struct anv_image *src_image,
struct anv_image_view *src_iview,
VkOffset3D src_offset,
@@ -438,7 +438,7 @@ void anv_CmdBlitImage(
  },
  cmd_buffer, 0, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
 
-  meta_emit_blit(cmd_buffer,
+  anv_meta_emit_blit(cmd_buffer,
  src_image, _iview,
  pRegions[r].srcOffsets[0], src_extent,
  dest_image, _iview,
diff --git a/src/intel/vulkan/anv_meta_blit2d.c 
b/src/intel/vulkan/anv_meta_blit2d.c
index b165abd..d49b470 100644
--- a/src/intel/vulkan/anv_meta_blit2d.c
+++ b/src/intel/vulkan/anv_meta_blit2d.c
@@ -195,7 +195,7 @@ anv_meta_blit2d(struct anv_cmd_buffer *cmd_buffer,
  _info, cmd_buffer, img_o, dst_usage);
 
   /* Perform blit */
-  meta_emit_blit(cmd_buffer,
+  anv_meta_emit_blit(cmd_buffer,
  anv_image_from_handle(src_image),
  _iview,
  src_offset_el,

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


Mesa (vulkan): anv/meta: Store src and dst usage flags in a variable

2016-03-09 Thread Nanley Chery
Module: Mesa
Branch: vulkan
Commit: ddbc6458464b86fa3f4f87f0f2db2f117fa04cdc
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ddbc6458464b86fa3f4f87f0f2db2f117fa04cdc

Author: Nanley Chery 
Date:   Mon Mar  7 14:18:27 2016 -0800

anv/meta: Store src and dst usage flags in a variable

Signed-off-by: Nanley Chery 
Reviewed-by: Anuj Phogat 

---

 src/intel/vulkan/anv_meta_blit.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/intel/vulkan/anv_meta_blit.c b/src/intel/vulkan/anv_meta_blit.c
index ecd4d2d..82b79b8 100644
--- a/src/intel/vulkan/anv_meta_blit.c
+++ b/src/intel/vulkan/anv_meta_blit.c
@@ -440,6 +440,8 @@ anv_meta_blit2d(struct anv_cmd_buffer *cmd_buffer,
VkDevice vk_device = anv_device_to_handle(cmd_buffer->device);
VkFormat src_format = vk_format_for_size(src->bs);
VkFormat dst_format = vk_format_for_size(dst->bs);
+   VkImageUsageFlags src_usage = VK_IMAGE_USAGE_SAMPLED_BIT;
+   VkImageUsageFlags dst_usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
 
for (unsigned r = 0; r < num_rects; ++r) {
 
@@ -472,7 +474,7 @@ anv_meta_blit2d(struct anv_cmd_buffer *cmd_buffer,
   anv_image_info.isl_tiling_flags = 1 << src->tiling;
   image_info.tiling = anv_image_info.isl_tiling_flags == 
ISL_TILING_LINEAR_BIT ?
 VK_IMAGE_TILING_LINEAR : VK_IMAGE_TILING_OPTIMAL;
-  image_info.usage = VK_IMAGE_USAGE_SAMPLED_BIT;
+  image_info.usage = src_usage;
   image_info.format = src_format,
   isl_tiling_get_info(_buffer->device->isl_dev, src->tiling, src->bs, 
_info);
   image_info.extent.height = rects[r].height +
@@ -485,7 +487,7 @@ anv_meta_blit2d(struct anv_cmd_buffer *cmd_buffer,
   anv_image_info.isl_tiling_flags = 1 << dst->tiling;
   image_info.tiling = anv_image_info.isl_tiling_flags == 
ISL_TILING_LINEAR_BIT ?
 VK_IMAGE_TILING_LINEAR : VK_IMAGE_TILING_OPTIMAL;
-  image_info.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
+  image_info.usage = dst_usage;
   image_info.format = dst_format,
   isl_tiling_get_info(_buffer->device->isl_dev, dst->tiling, dst->bs, 
_info);
   image_info.extent.height = rects[r].height +
@@ -533,7 +535,7 @@ anv_meta_blit2d(struct anv_cmd_buffer *cmd_buffer,
 
   struct anv_image_view src_iview;
   anv_image_view_init(_iview, cmd_buffer->device,
- _info, cmd_buffer, img_o, VK_IMAGE_USAGE_SAMPLED_BIT);
+ _info, cmd_buffer, img_o, src_usage);
 
   iview_info.image = dst_image;
   iview_info.format = dst_format;
@@ -548,7 +550,7 @@ anv_meta_blit2d(struct anv_cmd_buffer *cmd_buffer,
 (uint32_t*)_offset_el.y);
   struct anv_image_view dst_iview;
   anv_image_view_init(_iview, cmd_buffer->device,
- _info, cmd_buffer, img_o, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
+ _info, cmd_buffer, img_o, dst_usage);
 
   /* Perform blit */
   meta_emit_blit(cmd_buffer,

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


Mesa (vulkan): anv/meta: Minimize height of images used for copies

2016-03-09 Thread Nanley Chery
Module: Mesa
Branch: vulkan
Commit: 7ebbc3946ae9cffb3c3db522dcbe2f1041633164
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7ebbc3946ae9cffb3c3db522dcbe2f1041633164

Author: Nanley Chery 
Date:   Fri Mar  4 11:43:19 2016 -0800

anv/meta: Minimize height of images used for copies

In addition to demystifying the value being added to the height,
this future-proofs the code for new tiling modes and keeps the
image height as small as possible.

v2: Actually use the smallest height possible.

Signed-off-by: Nanley Chery 
Reviewed-by: Anuj Phogat 

---

 src/intel/vulkan/anv_meta_blit.c | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/intel/vulkan/anv_meta_blit.c b/src/intel/vulkan/anv_meta_blit.c
index b8a42f9..ecd4d2d 100644
--- a/src/intel/vulkan/anv_meta_blit.c
+++ b/src/intel/vulkan/anv_meta_blit.c
@@ -450,8 +450,7 @@ anv_meta_blit2d(struct anv_cmd_buffer *cmd_buffer,
  .format = 0, /* TEMPLATE */
  .extent = {
 .width = 0, /* TEMPLATE */
-/* Pad to highest tile height to compensate for a vertical 
intratile offset */
-.height = MIN(rects[r].height + 64, 1 << 14),
+.height = 0, /* TEMPLATE */
 .depth = 1,
  },
  .mipLevels = 1,
@@ -465,11 +464,19 @@ anv_meta_blit2d(struct anv_cmd_buffer *cmd_buffer,
  .isl_tiling_flags = 0, /* TEMPLATE */
   };
 
+  /* The image height is the rect height + src/dst y-offset from the
+   * tile-aligned base address.
+   */
+  struct isl_tile_info tile_info;
+
   anv_image_info.isl_tiling_flags = 1 << src->tiling;
   image_info.tiling = anv_image_info.isl_tiling_flags == 
ISL_TILING_LINEAR_BIT ?
 VK_IMAGE_TILING_LINEAR : VK_IMAGE_TILING_OPTIMAL;
   image_info.usage = VK_IMAGE_USAGE_SAMPLED_BIT;
   image_info.format = src_format,
+  isl_tiling_get_info(_buffer->device->isl_dev, src->tiling, src->bs, 
_info);
+  image_info.extent.height = rects[r].height +
+ rects[r].src_y % tile_info.height;
   image_info.extent.width = src->pitch / src->bs;
   VkImage src_image;
   anv_image_create(vk_device, _image_info,
@@ -480,6 +487,9 @@ anv_meta_blit2d(struct anv_cmd_buffer *cmd_buffer,
 VK_IMAGE_TILING_LINEAR : VK_IMAGE_TILING_OPTIMAL;
   image_info.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
   image_info.format = dst_format,
+  isl_tiling_get_info(_buffer->device->isl_dev, dst->tiling, dst->bs, 
_info);
+  image_info.extent.height = rects[r].height +
+ rects[r].dst_y % tile_info.height;
   image_info.extent.width = dst->pitch / dst->bs;
   VkImage dst_image;
   anv_image_create(vk_device, _image_info,

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


Mesa (vulkan): anv/meta: Make meta_emit_blit() public

2016-03-09 Thread Nanley Chery
Module: Mesa
Branch: vulkan
Commit: f39168392243d6dacefbc8708b764c5978ff24df
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f39168392243d6dacefbc8708b764c5978ff24df

Author: Nanley Chery 
Date:   Mon Mar  7 22:38:05 2016 -0800

anv/meta: Make meta_emit_blit() public

This can be reverted if the only other consumer, anv_meta_blit2d(),
uses a different method.

Signed-off-by: Nanley Chery 
Reviewed-by: Anuj Phogat 

---

 src/intel/vulkan/anv_meta.h  | 11 +++
 src/intel/vulkan/anv_meta_blit.c |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_meta.h b/src/intel/vulkan/anv_meta.h
index 587c044..fb562db 100644
--- a/src/intel/vulkan/anv_meta.h
+++ b/src/intel/vulkan/anv_meta.h
@@ -105,6 +105,17 @@ void
 anv_meta_end_blit2d(struct anv_cmd_buffer *cmd_buffer,
 struct anv_meta_saved_state *save);
 
+void
+meta_emit_blit(struct anv_cmd_buffer *cmd_buffer,
+   struct anv_image *src_image,
+   struct anv_image_view *src_iview,
+   VkOffset3D src_offset,
+   VkExtent3D src_extent,
+   struct anv_image *dest_image,
+   struct anv_image_view *dest_iview,
+   VkOffset3D dest_offset,
+   VkExtent3D dest_extent,
+   VkFilter blit_filter);
 #ifdef __cplusplus
 }
 #endif
diff --git a/src/intel/vulkan/anv_meta_blit.c b/src/intel/vulkan/anv_meta_blit.c
index 82b79b8..57833bf 100644
--- a/src/intel/vulkan/anv_meta_blit.c
+++ b/src/intel/vulkan/anv_meta_blit.c
@@ -160,7 +160,7 @@ meta_region_extent_el(const VkFormat format,
};
 }
 
-static void
+void
 meta_emit_blit(struct anv_cmd_buffer *cmd_buffer,
struct anv_image *src_image,
struct anv_image_view *src_iview,

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


Mesa (vulkan): anv/cmd_buffer: Pull the core of flush_state into genX_cmd_buffer

2016-03-09 Thread Jason Ekstrand
Module: Mesa
Branch: vulkan
Commit: 248ab61740c4082517424f5aa94b2f4e7b210d76
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=248ab61740c4082517424f5aa94b2f4e7b210d76

Author: Jason Ekstrand 
Date:   Tue Mar  8 17:10:05 2016 -0800

anv/cmd_buffer: Pull the core of flush_state into genX_cmd_buffer

---

 src/intel/vulkan/anv_genX.h|   3 +
 src/intel/vulkan/gen7_cmd_buffer.c | 147 +--
 src/intel/vulkan/gen8_cmd_buffer.c | 135 +---
 src/intel/vulkan/genX_cmd_buffer.c | 176 +
 4 files changed, 185 insertions(+), 276 deletions(-)

diff --git a/src/intel/vulkan/anv_genX.h b/src/intel/vulkan/anv_genX.h
index f98127b..77d387a 100644
--- a/src/intel/vulkan/anv_genX.h
+++ b/src/intel/vulkan/anv_genX.h
@@ -41,6 +41,9 @@ void genX(cmd_buffer_set_subpass)(struct anv_cmd_buffer 
*cmd_buffer,
 
 void genX(flush_pipeline_select_3d)(struct anv_cmd_buffer *cmd_buffer);
 
+void genX(cmd_buffer_config_l3)(struct anv_cmd_buffer *cmd_buffer,
+bool enable_slm);
+
 void genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer);
 void genX(cmd_buffer_flush_dynamic_state)(struct anv_cmd_buffer *cmd_buffer);
 
diff --git a/src/intel/vulkan/gen7_cmd_buffer.c 
b/src/intel/vulkan/gen7_cmd_buffer.c
index d552f1b..56f0326 100644
--- a/src/intel/vulkan/gen7_cmd_buffer.c
+++ b/src/intel/vulkan/gen7_cmd_buffer.c
@@ -32,44 +32,6 @@
 #include "genxml/gen_macros.h"
 #include "genxml/genX_pack.h"
 
-static uint32_t
-cmd_buffer_flush_push_constants(struct anv_cmd_buffer *cmd_buffer)
-{
-   static const uint32_t push_constant_opcodes[] = {
-  [MESA_SHADER_VERTEX]  = 21,
-  [MESA_SHADER_TESS_CTRL]   = 25, /* HS */
-  [MESA_SHADER_TESS_EVAL]   = 26, /* DS */
-  [MESA_SHADER_GEOMETRY]= 22,
-  [MESA_SHADER_FRAGMENT]= 23,
-  [MESA_SHADER_COMPUTE] = 0,
-   };
-
-   VkShaderStageFlags flushed = 0;
-
-   anv_foreach_stage(stage, cmd_buffer->state.push_constants_dirty) {
-  if (stage == MESA_SHADER_COMPUTE)
- continue;
-
-  struct anv_state state = anv_cmd_buffer_push_constants(cmd_buffer, 
stage);
-
-  if (state.offset == 0) {
- anv_batch_emit(_buffer->batch, GENX(3DSTATE_CONSTANT_VS),
-._3DCommandSubOpcode = push_constant_opcodes[stage]);
-  } else {
- anv_batch_emit(_buffer->batch, GENX(3DSTATE_CONSTANT_VS),
-._3DCommandSubOpcode = push_constant_opcodes[stage],
-.ConstantBody = {
-   .PointerToConstantBuffer0 = { .offset = 
state.offset },
-   .ConstantBuffer0ReadLength = 
DIV_ROUND_UP(state.alloc_size, 32),
-});
-  }
-   }
-
-   cmd_buffer->state.push_constants_dirty &= ~VK_SHADER_STAGE_ALL_GRAPHICS;
-
-   return flushed;
-}
-
 #if GEN_GEN == 7 && !GEN_IS_HASWELL
 void
 gen7_cmd_buffer_emit_descriptor_pointers(struct anv_cmd_buffer *cmd_buffer,
@@ -344,8 +306,8 @@ emit_lri(struct anv_batch *batch, uint32_t reg, uint32_t 
imm)
 #define GEN7_L3CNTLREG20xb020
 #define GEN7_L3CNTLREG30xb024
 
-static void
-config_l3(struct anv_cmd_buffer *cmd_buffer, bool enable_slm)
+void
+genX(cmd_buffer_config_l3)(struct anv_cmd_buffer *cmd_buffer, bool enable_slm)
 {
/* References for GL state:
 *
@@ -401,7 +363,7 @@ genX(cmd_buffer_flush_compute_state)(struct anv_cmd_buffer 
*cmd_buffer)
assert(pipeline->active_stages == VK_SHADER_STAGE_COMPUTE_BIT);
 
bool needs_slm = cs_prog_data->base.total_shared > 0;
-   config_l3(cmd_buffer, needs_slm);
+   genX(cmd_buffer_config_l3)(cmd_buffer, needs_slm);
 
if (cmd_buffer->state.current_pipeline != GPGPU) {
   anv_batch_emit(_buffer->batch, GENX(PIPELINE_SELECT),
@@ -424,109 +386,6 @@ genX(cmd_buffer_flush_compute_state)(struct 
anv_cmd_buffer *cmd_buffer)
 }
 
 void
-genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer)
-{
-   struct anv_pipeline *pipeline = cmd_buffer->state.pipeline;
-   uint32_t *p;
-
-   uint32_t vb_emit = cmd_buffer->state.vb_dirty & pipeline->vb_used;
-
-   assert((pipeline->active_stages & VK_SHADER_STAGE_COMPUTE_BIT) == 0);
-
-   genX(flush_pipeline_select_3d)(cmd_buffer);
-
-   if (vb_emit) {
-  const uint32_t num_buffers = __builtin_popcount(vb_emit);
-  const uint32_t num_dwords = 1 + num_buffers * 4;
-
-  p = anv_batch_emitn(_buffer->batch, num_dwords,
-  GENX(3DSTATE_VERTEX_BUFFERS));
-  uint32_t vb, i = 0;
-  for_each_bit(vb, vb_emit) {
- struct anv_buffer *buffer = 
cmd_buffer->state.vertex_bindings[vb].buffer;
- uint32_t offset = cmd_buffer->state.vertex_bindings[vb].offset;
-
- struct GENX(VERTEX_BUFFER_STATE) state = {
-.VertexBufferIndex = vb,
-  

Mesa (vulkan): anv/cmd_buffer: Split flush_state into two functions

2016-03-09 Thread Jason Ekstrand
Module: Mesa
Branch: vulkan
Commit: 28cbc45b3c83d645bb2b805a0ed6008e2f9dad61
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=28cbc45b3c83d645bb2b805a0ed6008e2f9dad61

Author: Jason Ekstrand 
Date:   Tue Mar  8 16:54:07 2016 -0800

anv/cmd_buffer: Split flush_state into two functions

---

 src/intel/vulkan/anv_genX.h|  1 +
 src/intel/vulkan/gen7_cmd_buffer.c | 11 ++-
 src/intel/vulkan/gen8_cmd_buffer.c | 11 ++-
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/src/intel/vulkan/anv_genX.h b/src/intel/vulkan/anv_genX.h
index a8b96e4..f98127b 100644
--- a/src/intel/vulkan/anv_genX.h
+++ b/src/intel/vulkan/anv_genX.h
@@ -42,6 +42,7 @@ void genX(cmd_buffer_set_subpass)(struct anv_cmd_buffer 
*cmd_buffer,
 void genX(flush_pipeline_select_3d)(struct anv_cmd_buffer *cmd_buffer);
 
 void genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer);
+void genX(cmd_buffer_flush_dynamic_state)(struct anv_cmd_buffer *cmd_buffer);
 
 void genX(cmd_buffer_flush_compute_state)(struct anv_cmd_buffer *cmd_buffer);
 
diff --git a/src/intel/vulkan/gen7_cmd_buffer.c 
b/src/intel/vulkan/gen7_cmd_buffer.c
index 8dce586..d552f1b 100644
--- a/src/intel/vulkan/gen7_cmd_buffer.c
+++ b/src/intel/vulkan/gen7_cmd_buffer.c
@@ -462,6 +462,8 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer 
*cmd_buffer)
   }
}
 
+   cmd_buffer->state.vb_dirty &= ~vb_emit;
+
if (cmd_buffer->state.dirty & ANV_CMD_DIRTY_PIPELINE) {
   /* If somebody compiled a pipeline after starting a command buffer the
* scratch bo may have grown since we started this cmd buffer (and
@@ -521,6 +523,14 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer 
*cmd_buffer)
if (cmd_buffer->state.dirty & ANV_CMD_DIRTY_DYNAMIC_SCISSOR)
   gen7_cmd_buffer_emit_scissor(cmd_buffer);
 
+   genX(cmd_buffer_flush_dynamic_state)(cmd_buffer);
+}
+
+void
+genX(cmd_buffer_flush_dynamic_state)(struct anv_cmd_buffer *cmd_buffer)
+{
+   struct anv_pipeline *pipeline = cmd_buffer->state.pipeline;
+
if (cmd_buffer->state.dirty & (ANV_CMD_DIRTY_PIPELINE |
   ANV_CMD_DIRTY_RENDER_TARGETS |
   ANV_CMD_DIRTY_DYNAMIC_LINE_WIDTH |
@@ -622,7 +632,6 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer 
*cmd_buffer)
  .BufferEndingAddress = { buffer->bo, buffer->offset + 
buffer->size });
}
 
-   cmd_buffer->state.vb_dirty &= ~vb_emit;
cmd_buffer->state.dirty = 0;
 }
 
diff --git a/src/intel/vulkan/gen8_cmd_buffer.c 
b/src/intel/vulkan/gen8_cmd_buffer.c
index 0d27c27..f1c8223 100644
--- a/src/intel/vulkan/gen8_cmd_buffer.c
+++ b/src/intel/vulkan/gen8_cmd_buffer.c
@@ -279,6 +279,8 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer 
*cmd_buffer)
   }
}
 
+   cmd_buffer->state.vb_dirty &= ~vb_emit;
+
if (cmd_buffer->state.dirty & ANV_CMD_DIRTY_PIPELINE) {
   /* If somebody compiled a pipeline after starting a command buffer the
* scratch bo may have grown since we started this cmd buffer (and
@@ -324,6 +326,14 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer 
*cmd_buffer)
if (cmd_buffer->state.dirty & ANV_CMD_DIRTY_DYNAMIC_SCISSOR)
   gen7_cmd_buffer_emit_scissor(cmd_buffer);
 
+   genX(cmd_buffer_flush_dynamic_state)(cmd_buffer);
+}
+
+void
+genX(cmd_buffer_flush_dynamic_state)(struct anv_cmd_buffer *cmd_buffer)
+{
+   struct anv_pipeline *pipeline = cmd_buffer->state.pipeline;
+
if (cmd_buffer->state.dirty & (ANV_CMD_DIRTY_PIPELINE |
   ANV_CMD_DIRTY_DYNAMIC_LINE_WIDTH)) {
   __emit_sf_state(cmd_buffer);
@@ -452,7 +462,6 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer 
*cmd_buffer)
   );
}
 
-   cmd_buffer->state.vb_dirty &= ~vb_emit;
cmd_buffer->state.dirty = 0;
 }
 

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


Mesa (vulkan): anv: Pull all of the genX_foo functions into anv_genX.h

2016-03-09 Thread Jason Ekstrand
Module: Mesa
Branch: vulkan
Commit: 42b4c0fa6e0909e9622b03d56393ddec173ebe5d
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=42b4c0fa6e0909e9622b03d56393ddec173ebe5d

Author: Jason Ekstrand 
Date:   Tue Mar  8 16:49:06 2016 -0800

anv: Pull all of the genX_foo functions into anv_genX.h

This way we only have to declare them each once and we get it for all gens
at a single go.

---

 src/intel/vulkan/anv_genX.h|  61 
 src/intel/vulkan/anv_private.h | 159 +
 2 files changed, 79 insertions(+), 141 deletions(-)

diff --git a/src/intel/vulkan/anv_genX.h b/src/intel/vulkan/anv_genX.h
new file mode 100644
index 000..a8b96e4
--- /dev/null
+++ b/src/intel/vulkan/anv_genX.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright © 2016 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+/*
+ * Gen-specific function declarations.  This header must *not* be included
+ * directly.  Instead, it is included multiple times by gen8_private.h.
+ * 
+ * In this header file, the usual genx() macro is available.
+ */
+
+VkResult genX(init_device_state)(struct anv_device *device);
+
+void genX(cmd_buffer_emit_state_base_address)(struct anv_cmd_buffer 
*cmd_buffer);
+
+struct anv_state
+genX(cmd_buffer_alloc_null_surface_state)(struct anv_cmd_buffer *cmd_buffer,
+  struct anv_framebuffer *fb);
+
+void genX(cmd_buffer_set_subpass)(struct anv_cmd_buffer *cmd_buffer,
+  struct anv_subpass *subpass);
+
+void genX(flush_pipeline_select_3d)(struct anv_cmd_buffer *cmd_buffer);
+
+void genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer);
+
+void genX(cmd_buffer_flush_compute_state)(struct anv_cmd_buffer *cmd_buffer);
+
+VkResult
+genX(graphics_pipeline_create)(VkDevice _device,
+   struct anv_pipeline_cache *cache,
+   const VkGraphicsPipelineCreateInfo *pCreateInfo,
+   const struct anv_graphics_pipeline_create_info 
*extra,
+   const VkAllocationCallbacks *alloc,
+   VkPipeline *pPipeline);
+
+VkResult
+genX(compute_pipeline_create)(VkDevice _device,
+  struct anv_pipeline_cache *cache,
+  const VkComputePipelineCreateInfo *pCreateInfo,
+  const VkAllocationCallbacks *alloc,
+  VkPipeline *pPipeline);
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index f24ea20..0ef840d 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -691,11 +691,6 @@ struct anv_device {
 pthread_mutex_t mutex;
 };
 
-VkResult gen7_init_device_state(struct anv_device *device);
-VkResult gen75_init_device_state(struct anv_device *device);
-VkResult gen8_init_device_state(struct anv_device *device);
-VkResult gen9_init_device_state(struct anv_device *device);
-
 void anv_device_get_cache_uuid(void *uuid);
 
 
@@ -1294,55 +1289,14 @@ anv_cmd_buffer_new_binding_table_block(struct 
anv_cmd_buffer *cmd_buffer);
 void gen8_cmd_buffer_emit_viewport(struct anv_cmd_buffer *cmd_buffer);
 void gen7_cmd_buffer_emit_scissor(struct anv_cmd_buffer *cmd_buffer);
 
-void gen7_cmd_buffer_emit_state_base_address(struct anv_cmd_buffer 
*cmd_buffer);
-void gen75_cmd_buffer_emit_state_base_address(struct anv_cmd_buffer 
*cmd_buffer);
-void gen8_cmd_buffer_emit_state_base_address(struct anv_cmd_buffer 
*cmd_buffer);
-void gen9_cmd_buffer_emit_state_base_address(struct anv_cmd_buffer 
*cmd_buffer);
-
 void anv_cmd_buffer_emit_state_base_address(struct anv_cmd_buffer *cmd_buffer);
 
 void anv_cmd_state_setup_attachments(struct anv_cmd_buffer *cmd_buffer,
  const 

Mesa (master): gallium/radeon: use explicit drm_major, drm_minor check

2016-03-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 3dc2630e457155a4e8c8613911fe178bc4adf743
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=3dc2630e457155a4e8c8613911fe178bc4adf743

Author: Emil Velikov 
Date:   Tue Mar  8 10:55:19 2016 +

gallium/radeon: use explicit drm_major, drm_minor check

Just like everywhere else in the radeon codebase.

v2: Don't forget about drm_major == 3 (Alex)

Cc: Alex Deucher 
Signed-off-by: Emil Velikov 
Reviewed-by: Marek Olšák 

---

 src/gallium/drivers/radeon/radeon_vce.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeon/radeon_vce.c 
b/src/gallium/drivers/radeon/radeon_vce.c
index 41603b3..087d942 100644
--- a/src/gallium/drivers/radeon/radeon_vce.c
+++ b/src/gallium/drivers/radeon/radeon_vce.c
@@ -404,7 +404,8 @@ struct pipe_video_codec *rvce_create_encoder(struct 
pipe_context *context,
 
if (rscreen->info.drm_major == 3)
enc->use_vm = true;
-   if ((rscreen->info.drm_major > 2) || (rscreen->info.drm_minor >= 42))
+   if ((rscreen->info.drm_major == 2 && rscreen->info.drm_minor >= 42) ||
+rscreen->info.drm_major == 3)
enc->use_vui = true;
if (rscreen->info.family >= CHIP_TONGA &&
  rscreen->info.family != CHIP_STONEY)

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


Mesa (master): egl/x11: check the return value of xcb_dri2_get_buffers_reply()

2016-03-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: b9c5c4af6dbfab28b1f0a78e41b1b2e06ce9
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b9c5c4af6dbfab28b1f0a78e41b1b2e06ce9

Author: Emil Velikov 
Date:   Sat Mar  5 21:25:44 2016 +

egl/x11: check the return value of xcb_dri2_get_buffers_reply()

... before using it. The function can return NULL, which we should check
prior to refererencing it in the next function(s).

Cc: Fabian Vogt 
Cc: "11.1 11.2" 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93667
Signed-off-by: Emil Velikov 
Reviewed-by: Eduardo Lima Mitev 

---

 src/egl/drivers/dri2/platform_x11.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/egl/drivers/dri2/platform_x11.c 
b/src/egl/drivers/dri2/platform_x11.c
index 420f567..3ab9188 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -1006,6 +1006,9 @@ dri2_create_image_khr_pixmap(_EGLDisplay *disp, 
_EGLContext *ctx,
geometry_cookie = xcb_get_geometry (dri2_dpy->conn, drawable);
buffers_reply = xcb_dri2_get_buffers_reply (dri2_dpy->conn,
   buffers_cookie, NULL);
+   if (buffers_reply == NULL)
+ return NULL;
+
buffers = xcb_dri2_get_buffers_buffers (buffers_reply);
if (buffers == NULL) {
   return NULL;

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


Mesa (master): gallium: do not wrap header inclusion in

2016-03-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 373f118c6c750d717fd0727fc3fc191828714c6f
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=373f118c6c750d717fd0727fc3fc191828714c6f

Author: Emil Velikov 
Date:   Wed Nov 25 20:43:03 2015 +

gallium: do not wrap header inclusion in

Add one missing extern C guard within include/pipe/p_video_enums.h, and
remove the wrapping throughout gallium.

On Haiku one could even use the gallium debug_printf() although
that's another topic.

v2: Leave dbghelp.h as is (Jose)

Cc: Jose Fonseca 
Cc: Brian Paul 
Cc: Alexander von Gluck IV 
Signed-off-by: Emil Velikov 
Reviewed-by: Jose Fonseca 

---

 src/gallium/auxiliary/tgsi/tgsi_sanity.h | 4 ++--
 src/gallium/auxiliary/tgsi/tgsi_text.h   | 4 ++--
 src/gallium/auxiliary/util/u_debug.h | 8 +---
 src/gallium/auxiliary/util/u_draw_quad.h | 3 +--
 src/gallium/auxiliary/util/u_helpers.h   | 4 ++--
 src/gallium/auxiliary/util/u_video.h | 8 
 src/gallium/include/pipe/p_format.h  | 4 ++--
 src/gallium/include/pipe/p_video_codec.h | 4 ++--
 src/gallium/include/pipe/p_video_enums.h | 8 
 9 files changed, 28 insertions(+), 19 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.h 
b/src/gallium/auxiliary/tgsi/tgsi_sanity.h
index 1ff7874..b78d1ab 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sanity.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.h
@@ -28,12 +28,12 @@
 #ifndef TGSI_SANITY_H
 #define TGSI_SANITY_H
 
+#include "pipe/p_compiler.h"
+
 #if defined __cplusplus
 extern "C" {
 #endif
 
-#include "pipe/p_compiler.h"
-
 struct tgsi_token;
 
 /* Check the given token stream for errors and common mistakes.
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.h 
b/src/gallium/auxiliary/tgsi/tgsi_text.h
index 6a306e6..a345657 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.h
@@ -28,12 +28,12 @@
 #ifndef TGSI_TEXT_H
 #define TGSI_TEXT_H
 
+#include "pipe/p_compiler.h"
+
 #if defined __cplusplus
 extern "C" {
 #endif
 
-#include "pipe/p_compiler.h"
-
 struct tgsi_token;
 
 boolean
diff --git a/src/gallium/auxiliary/util/u_debug.h 
b/src/gallium/auxiliary/util/u_debug.h
index c2707b4..85d0cb6 100644
--- a/src/gallium/auxiliary/util/u_debug.h
+++ b/src/gallium/auxiliary/util/u_debug.h
@@ -39,6 +39,11 @@
 #define U_DEBUG_H_
 
 
+#if defined(PIPE_OS_HAIKU)
+/* Haiku provides debug_printf in libroot with OS.h */
+#include 
+#endif
+
 #include "os/os_misc.h"
 
 #include "pipe/p_format.h"
@@ -94,9 +99,6 @@ debug_printf(const char *format, ...)
(void) format; /* silence warning */
 #endif
 }
-#else /* is Haiku */
-/* Haiku provides debug_printf in libroot with OS.h */
-#include 
 #endif
 
 
diff --git a/src/gallium/auxiliary/util/u_draw_quad.h 
b/src/gallium/auxiliary/util/u_draw_quad.h
index b298ef2..6553d5d 100644
--- a/src/gallium/auxiliary/util/u_draw_quad.h
+++ b/src/gallium/auxiliary/util/u_draw_quad.h
@@ -32,6 +32,7 @@
 #include "pipe/p_compiler.h"
 #include "pipe/p_context.h"
 
+#include "util/u_draw.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -40,8 +41,6 @@ extern "C" {
 struct pipe_resource;
 struct cso_context;
 
-#include "util/u_draw.h"
-
 extern void 
 util_draw_vertex_buffer(struct pipe_context *pipe, struct cso_context *cso,
 struct pipe_resource *vbuf, uint vbuf_slot,
diff --git a/src/gallium/auxiliary/util/u_helpers.h 
b/src/gallium/auxiliary/util/u_helpers.h
index f25f280..a9a53e4 100644
--- a/src/gallium/auxiliary/util/u_helpers.h
+++ b/src/gallium/auxiliary/util/u_helpers.h
@@ -28,12 +28,12 @@
 #ifndef U_HELPERS_H
 #define U_HELPERS_H
 
+#include "pipe/p_state.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include "pipe/p_state.h"
-
 void util_set_vertex_buffers_mask(struct pipe_vertex_buffer *dst,
   uint32_t *enabled_buffers,
   const struct pipe_vertex_buffer *src,
diff --git a/src/gallium/auxiliary/util/u_video.h 
b/src/gallium/auxiliary/util/u_video.h
index ddc0021..9196afc 100644
--- a/src/gallium/auxiliary/util/u_video.h
+++ b/src/gallium/auxiliary/util/u_video.h
@@ -28,10 +28,6 @@
 #ifndef U_VIDEO_H
 #define U_VIDEO_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include "pipe/p_defines.h"
 #include "pipe/p_video_enums.h"
 
@@ -40,6 +36,10 @@ extern "C" {
 #include "util/u_debug.h"
 #include "util/u_math.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 static inline enum pipe_video_format
 u_reduce_video_profile(enum pipe_video_profile profile)
 {
diff --git a/src/gallium/include/pipe/p_format.h 
b/src/gallium/include/pipe/p_format.h
index ab18523..b22baa9 100644
--- a/src/gallium/include/pipe/p_format.h
+++ b/src/gallium/include/pipe/p_format.h
@@ -29,12 +29,12 @@
 #ifndef PIPE_FORMAT_H
 #define PIPE_FORMAT_H
 
+#include "p_config.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include 

Mesa (master): opencl: fix .gitignore for .install-gallium-links

2016-03-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 69d389c52f91e4d36e740f804a36b50af657a786
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=69d389c52f91e4d36e740f804a36b50af657a786

Author: Dieter Nützel 
Date:   Sun Mar  6 20:37:57 2016 +0100

opencl: fix .gitignore for .install-gallium-links

Fixes: 0b6157e9713 "install-gallium-links: port changes from install-lib-links"

v2: move this to the top level .gitignore and added Fixes:
like Emil Velikov  suggested

Signed-off-by: Dieter Nützel 
Reviewed-by: Eduardo Lima Mitev 
Reviewed-by: Emil Velikov 

---

 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 21aa35c..b4f88f7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,3 +46,4 @@ manifest.txt
 Makefile
 Makefile.in
 .install-mesa-links
+.install-gallium-links

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


Mesa (master): glapi: remove the final function offset tags

2016-03-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: c85544a10c03f287172a6e7dbbe0810db9582075
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c85544a10c03f287172a6e7dbbe0810db9582075

Author: Emil Velikov 
Date:   Tue Nov 24 22:16:54 2015 +

glapi: remove the final function offset tags

A commit earlier this year reworked out python scripts to use a separate
file for these. Followed by removing support from the parser, and
removing all of the offset tags.

Seems like we either missed a few, or people added them by mistake.
Either way let's nuke the ones that are still around.

Cc: Ian Romanick 
Signed-off-by: Emil Velikov 

---

 src/mapi/glapi/gen/ARB_direct_state_access.xml   | 36 
 src/mapi/glapi/gen/ARB_get_texture_sub_image.xml |  4 +--
 src/mapi/glapi/gen/ARB_shader_subroutine.xml | 16 +--
 src/mapi/glapi/gen/ARB_tessellation_shader.xml   |  4 +--
 4 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml 
b/src/mapi/glapi/gen/ARB_direct_state_access.xml
index 293d716..155b6f8 100644
--- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
+++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
@@ -153,32 +153,32 @@
 

 
-   
+   
   
   

 
-   
+   
   
   
   
   

 
-   
+   
   
   
   

 
-   
+   
   
   
   
   

 
-   
+   
   
   
   
@@ -186,29 +186,29 @@
   

 
-   
+   
   
   

 
-   
+   
   
   
   

 
-   
+   
   
   

 
-   
+   
   
   
   

 
-   
+   
   
   
   
@@ -218,35 +218,35 @@
   

 
-   
+   
   
   
   
   

 
-   
+   
   
   
   
   

 
-   
+   
   
   
   
   

 
-   
+   
   
   
   
   

 
-   
+   
   
   
   
@@ -261,19 +261,19 @@
   

 
-   
+   
   
   
   

 
-   
+   
   
   
   

 
-   
+   
   
   
   
diff --git a/src/mapi/glapi/gen/ARB_get_texture_sub_image.xml 
b/src/mapi/glapi/gen/ARB_get_texture_sub_image.xml
index 14e1c20..47e26ab 100644
--- a/src/mapi/glapi/gen/ARB_get_texture_sub_image.xml
+++ b/src/mapi/glapi/gen/ARB_get_texture_sub_image.xml
@@ -7,7 +7,7 @@
 
 
 
-
+
 
 
 
@@ -22,7 +22,7 @@
 
 
 
-
+
 
 
 
diff --git a/src/mapi/glapi/gen/ARB_shader_subroutine.xml 
b/src/mapi/glapi/gen/ARB_shader_subroutine.xml
index 04b75cb..8a7d08c 100644
--- a/src/mapi/glapi/gen/ARB_shader_subroutine.xml
+++ b/src/mapi/glapi/gen/ARB_shader_subroutine.xml
@@ -7,21 +7,21 @@
 
 
 
-
+
 
 
 
 
 
 
-
+
 
 
 
 
 
 
-
+
 
 
 
@@ -29,7 +29,7 @@
 
 
 
-
+
 
 
 
@@ -38,7 +38,7 @@
 
 
 
-
+
 
 
 
@@ -47,19 +47,19 @@
 
 
 
-
+
 
 
 
 
 
-
+
 
 
 
 
 
-
+
 
 
 
diff --git a/src/mapi/glapi/gen/ARB_tessellation_shader.xml 
b/src/mapi/glapi/gen/ARB_tessellation_shader.xml
index 16a2139..77f2228 100644
--- a/src/mapi/glapi/gen/ARB_tessellation_shader.xml
+++ b/src/mapi/glapi/gen/ARB_tessellation_shader.xml
@@ -49,11 +49,11 @@
 
 
 
-
+
 
 
 
-
+
 
 
 

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


Mesa (master): egl: remove remnants of MESA_drm_display

2016-03-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: f3e23ead536e66940053265216b3886fef69d891
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f3e23ead536e66940053265216b3886fef69d891

Author: Emil Velikov 
Date:   Wed Feb 10 12:21:31 2016 +

egl: remove remnants of MESA_drm_display

Last set in st/egl, unused in mesa-demos and superseded by
EGL_KHR_platform_gbm.

Signed-off-by: Emil Velikov 

---

 include/EGL/eglmesaext.h  | 11 ---
 src/egl/main/eglapi.c |  9 -
 src/egl/main/egldisplay.h |  1 -
 3 files changed, 21 deletions(-)

diff --git a/include/EGL/eglmesaext.h b/include/EGL/eglmesaext.h
index 917a204..337dd2c 100644
--- a/include/EGL/eglmesaext.h
+++ b/include/EGL/eglmesaext.h
@@ -34,17 +34,6 @@ extern "C" {
 
 #include 
 
-#ifndef EGL_MESA_drm_display
-#define EGL_MESA_drm_display 1
-
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLDisplay EGLAPIENTRY eglGetDRMDisplayMESA(int fd);
-#endif /* EGL_EGLEXT_PROTOTYPES */
-
-typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDRMDISPLAYMESA) (int fd);
-
-#endif /* EGL_MESA_drm_display */
-
 #ifdef EGL_MESA_drm_image
 /* Mesa's extension to EGL_MESA_drm_image... */
 #ifndef EGL_DRM_BUFFER_USE_CURSOR_MESA
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 031cf75..dd145a1 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -408,7 +408,6 @@ _eglCreateExtensionsString(_EGLDisplay *dpy)
_EGL_CHECK_EXTENSION(KHR_wait_sync);
 
_EGL_CHECK_EXTENSION(MESA_configless_context);
-   _EGL_CHECK_EXTENSION(MESA_drm_display);
_EGL_CHECK_EXTENSION(MESA_drm_image);
_EGL_CHECK_EXTENSION(MESA_image_dma_buf_export);
 
@@ -1197,13 +1196,6 @@ eglGetError(void)
 }
 
 
-static EGLDisplay EGLAPIENTRY
-eglGetDRMDisplayMESA(int fd)
-{
-   _EGLDisplay *dpy = _eglFindDisplay(_EGL_PLATFORM_DRM, (void *) (intptr_t) 
fd);
-   return _eglGetDisplayHandle(dpy);
-}
-
 /**
  ** EGL 1.2
  **/
@@ -1857,7 +1849,6 @@ eglGetProcAddress(const char *procname)
   { "eglGetPlatformDisplay", (_EGLProc) eglGetPlatformDisplay },
   { "eglCreatePlatformWindowSurface", (_EGLProc) 
eglCreatePlatformWindowSurface },
   { "eglCreatePlatformPixmapSurface", (_EGLProc) 
eglCreatePlatformPixmapSurface },
-  { "eglGetDRMDisplayMESA", (_EGLProc) eglGetDRMDisplayMESA },
   { "eglCreateImageKHR", (_EGLProc) eglCreateImageKHR },
   { "eglDestroyImageKHR", (_EGLProc) eglDestroyImage },
   { "eglCreateSyncKHR", (_EGLProc) eglCreateSyncKHR },
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index bca9122..cec6d59 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -115,7 +115,6 @@ struct _egl_extensions
EGLBoolean KHR_wait_sync;
 
EGLBoolean MESA_configless_context;
-   EGLBoolean MESA_drm_display;
EGLBoolean MESA_drm_image;
EGLBoolean MESA_image_dma_buf_export;
 

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


Mesa (master): egl: remove final pieces of KHR_vg_parent_image

2016-03-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 2295a4b1e124be0906907cf535efa022af5b8033
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2295a4b1e124be0906907cf535efa022af5b8033

Author: Emil Velikov 
Date:   Wed Feb 10 12:21:30 2016 +

egl: remove final pieces of KHR_vg_parent_image

Similar to previous commit - unused/unset for a long time.

Signed-off-by: Emil Velikov 

---

 src/egl/main/eglapi.c | 1 -
 src/egl/main/egldisplay.h | 1 -
 2 files changed, 2 deletions(-)

diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 32f6823..031cf75 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -405,7 +405,6 @@ _eglCreateExtensionsString(_EGLDisplay *dpy)
_EGL_CHECK_EXTENSION(KHR_image_pixmap);
_EGL_CHECK_EXTENSION(KHR_reusable_sync);
_EGL_CHECK_EXTENSION(KHR_surfaceless_context);
-   _EGL_CHECK_EXTENSION(KHR_vg_parent_image);
_EGL_CHECK_EXTENSION(KHR_wait_sync);
 
_EGL_CHECK_EXTENSION(MESA_configless_context);
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index 6c64980..bca9122 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -112,7 +112,6 @@ struct _egl_extensions
EGLBoolean KHR_image_pixmap;
EGLBoolean KHR_reusable_sync;
EGLBoolean KHR_surfaceless_context;
-   EGLBoolean KHR_vg_parent_image;
EGLBoolean KHR_wait_sync;
 
EGLBoolean MESA_configless_context;

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


Mesa (master): winsys/amdgpu/addrlib: do not wrap header inclusion in extern "C"

2016-03-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 3ffab9a89cd18f41535598e390294fa67efc6c56
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=3ffab9a89cd18f41535598e390294fa67efc6c56

Author: Emil Velikov 
Date:   Tue Nov 24 16:29:28 2015 +

winsys/amdgpu/addrlib: do not wrap header inclusion in extern "C"

Signed-off-by: Emil Velikov 
Reviewed-by: Marek Olšák 

---

 src/gallium/winsys/amdgpu/drm/addrlib/addrinterface.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/winsys/amdgpu/drm/addrlib/addrinterface.h 
b/src/gallium/winsys/amdgpu/drm/addrlib/addrinterface.h
index 03fbf2b..ead6033 100644
--- a/src/gallium/winsys/amdgpu/drm/addrlib/addrinterface.h
+++ b/src/gallium/winsys/amdgpu/drm/addrlib/addrinterface.h
@@ -33,13 +33,13 @@
 #ifndef __ADDR_INTERFACE_H__
 #define __ADDR_INTERFACE_H__
 
+#include "addrtypes.h"
+
 #if defined(__cplusplus)
 extern "C"
 {
 #endif
 
-#include "addrtypes.h"
-
 #define ADDRLIB_VERSION_MAJOR 5
 #define ADDRLIB_VERSION_MINOR 25
 #define ADDRLIB_VERSION ((ADDRLIB_VERSION_MAJOR << 16) | ADDRLIB_VERSION_MINOR)

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


Mesa (master): util/sha: do not wrap header inclusion in extern "C"

2016-03-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 2af3a0ca6f4ad34774dfba64f2e95344d1f336c0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2af3a0ca6f4ad34774dfba64f2e95344d1f336c0

Author: Emil Velikov 
Date:   Tue Nov 24 16:29:21 2015 +

util/sha: do not wrap header inclusion in extern "C"

Signed-off-by: Emil Velikov 

---

 src/util/mesa-sha1.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/mesa-sha1.h b/src/util/mesa-sha1.h
index 1599405..0be5485 100644
--- a/src/util/mesa-sha1.h
+++ b/src/util/mesa-sha1.h
@@ -23,12 +23,12 @@
 #ifndef SHA1_H
 #define SHA1_H
 
+#include 
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include 
-
 struct mesa_sha1;
 
 struct mesa_sha1 *

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


Mesa (master): gbm: do not wrap header inclusion in extern "C"

2016-03-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 750da80b34fa712cbc45047184f8b84d2f50b81b
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=750da80b34fa712cbc45047184f8b84d2f50b81b

Author: Emil Velikov 
Date:   Tue Nov 24 16:29:18 2015 +

gbm: do not wrap header inclusion in extern "C"

Signed-off-by: Emil Velikov 

---

 src/gbm/main/gbm.h | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h
index 8db2153..63d9a9e 100644
--- a/src/gbm/main/gbm.h
+++ b/src/gbm/main/gbm.h
@@ -28,16 +28,16 @@
 #ifndef _GBM_H_
 #define _GBM_H_
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
 #define __GBM__ 1
 
 #include 
 #include 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /**
  * \file gbm.h
  * \brief Generic Buffer Manager

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


Mesa (master): egl/wayland: do not wrap header inclusion in extern "C"

2016-03-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: d426c17550493da7b0ee285a3016891563ed688f
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d426c17550493da7b0ee285a3016891563ed688f

Author: Emil Velikov 
Date:   Tue Nov 24 16:29:19 2015 +

egl/wayland: do not wrap header inclusion in extern "C"

Signed-off-by: Emil Velikov 

---

 src/egl/wayland/wayland-egl/wayland-egl-priv.h | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/egl/wayland/wayland-egl/wayland-egl-priv.h 
b/src/egl/wayland/wayland-egl/wayland-egl-priv.h
index 74a1552..f1e3ba2 100644
--- a/src/egl/wayland/wayland-egl/wayland-egl-priv.h
+++ b/src/egl/wayland/wayland-egl/wayland-egl-priv.h
@@ -1,10 +1,6 @@
 #ifndef _WAYLAND_EGL_PRIV_H
 #define _WAYLAND_EGL_PRIV_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 /* GCC visibility */
 #if defined(__GNUC__)
 #define WL_EGL_EXPORT __attribute__ ((visibility("default")))
@@ -14,6 +10,10 @@ extern "C" {
 
 #include 
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 struct wl_egl_window {
struct wl_surface *surface;
 

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


Mesa (master): i915: limit extern "C" hack only for libdrm headers

2016-03-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 5351dc1522bc2b647bbe3dd09ec2c8e77608b3c7
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5351dc1522bc2b647bbe3dd09ec2c8e77608b3c7

Author: Emil Velikov 
Date:   Tue Nov 24 16:29:23 2015 +

i915: limit extern "C" hack only for libdrm headers

Signed-off-by: Emil Velikov 

---

 src/mesa/drivers/dri/i915/intel_context.h | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/intel_context.h 
b/src/mesa/drivers/dri/i915/intel_context.h
index aecd7c2..39b328a 100644
--- a/src/mesa/drivers/dri/i915/intel_context.h
+++ b/src/mesa/drivers/dri/i915/intel_context.h
@@ -40,17 +40,16 @@ extern "C" {
#define virtual virt
 #endif
 
-#include "drm.h"
-#include "intel_bufmgr.h"
-
-#include "intel_screen.h"
-#include "intel_tex_obj.h"
-#include "i915_drm.h"
-
+#include 
+#include 
+#include 
 #ifdef __cplusplus
#undef virtual
 #endif
 
+#include "intel_screen.h"
+#include "intel_tex_obj.h"
+
 #include "tnl/t_vertex.h"
 
 #define TAG(x) intel##x

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


Mesa (master): mesa/main: do not wrap header inclusion in extern "C"

2016-03-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: a07192bd6395ea44d28db4f9fe3fd89f4b7aa94a
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a07192bd6395ea44d28db4f9fe3fd89f4b7aa94a

Author: Emil Velikov 
Date:   Tue Nov 24 16:29:26 2015 +

mesa/main: do not wrap header inclusion in extern "C"

Signed-off-by: Emil Velikov 

---

 src/mesa/main/samplerobj.h | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/samplerobj.h b/src/mesa/main/samplerobj.h
index abc6e01..8e9539d 100644
--- a/src/mesa/main/samplerobj.h
+++ b/src/mesa/main/samplerobj.h
@@ -27,14 +27,12 @@
 #ifndef SAMPLEROBJ_H
 #define SAMPLEROBJ_H
 
+#include "mtypes.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-
-#include "mtypes.h"
-
-
 struct dd_function_table;
 
 static inline struct gl_sampler_object *

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


Mesa (master): xmesa: do not wrap header inclusion in extern "C"

2016-03-09 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: cf215d92f624116fa951ef6ea740b519822e7872
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf215d92f624116fa951ef6ea740b519822e7872

Author: Emil Velikov 
Date:   Tue Nov 24 16:29:22 2015 +

xmesa: do not wrap header inclusion in extern "C"

Signed-off-by: Emil Velikov 

---

 src/mesa/drivers/x11/xmesa.h | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/x11/xmesa.h b/src/mesa/drivers/x11/xmesa.h
index b6a2576..cc878e7 100644
--- a/src/mesa/drivers/x11/xmesa.h
+++ b/src/mesa/drivers/x11/xmesa.h
@@ -64,15 +64,15 @@ and create a window, you must do the following to use the 
X/Mesa interface:
 #ifndef XMESA_H
 #define XMESA_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include 
 #include 
 #include "xmesa_x.h"
 #include "GL/gl.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define XMESA_MAJOR_VERSION 6
 #define XMESA_MINOR_VERSION 3
 

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


Mesa (master): gallivm: special case TGSI_OPCODE_STORE

2016-03-09 Thread Nicolai Hähnle
Module: Mesa
Branch: master
Commit: 4eb416bd9d670f55fe9691bcd75950f728a0b782
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4eb416bd9d670f55fe9691bcd75950f728a0b782

Author: Nicolai Hähnle 
Date:   Tue Feb  9 13:02:34 2016 -0500

gallivm: special case TGSI_OPCODE_STORE

This instruction has the resource (buffer or image) as a destination to
represent the writemask for SSBO writes. However, this is obviously not
a "real" destination for the purpose of emitting LLVM IR.

Reviewed-by: Marek Olšák 

---

 src/gallium/auxiliary/gallivm/lp_bld_tgsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c 
b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c
index 1cbe47c..614c655 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c
@@ -315,7 +315,7 @@ lp_build_tgsi_inst_llvm(
   }
}
 
-   if (info->num_dst > 0) {
+   if (info->num_dst > 0 && info->opcode != TGSI_OPCODE_STORE) {
   bld_base->emit_store(bld_base, inst, info, emit_data.output);
}
return TRUE;

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


Mesa (master): st/mesa: shader image atoms must be before framebuffer update

2016-03-09 Thread Nicolai Hähnle
Module: Mesa
Branch: master
Commit: 9f06e7f5c1711ca552b8ef1f292ac39cc1b07472
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9f06e7f5c1711ca552b8ef1f292ac39cc1b07472

Author: Nicolai Hähnle 
Date:   Mon Feb 15 22:49:58 2016 -0500

st/mesa: shader image atoms must be before framebuffer update

The reason is that the shader image atoms call st_finalize_texture, which
may set ST_NEW_FRAMEBUFFER.

This fixes an assertion triggered by a subtest of piglit's
arb_shader_image_load_store-invalid.

v2: add comment explaining order constraints (suggested by Ilia)

Reviewed-by: Ilia Mirkin 
Reviewed-by: Marek Olšák 

---

 src/mesa/state_tracker/st_atom.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index 622621b..fc80adf 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -62,7 +62,12 @@ static const struct st_tracked_state *render_atoms[] =
_update_tessctrl_texture,
_update_tesseval_texture,
_update_sampler, /* depends on update_*_texture for swizzle */
-   _update_framebuffer,
+   _bind_vs_images,
+   _bind_tcs_images,
+   _bind_tes_images,
+   _bind_gs_images,
+   _bind_fs_images,
+   _update_framebuffer, /* depends on update_*_texture and bind_*_images */
_update_msaa,
_update_sample_shading,
_update_vs_constants,
@@ -85,11 +90,6 @@ static const struct st_tracked_state *render_atoms[] =
_bind_tes_ssbos,
_bind_fs_ssbos,
_bind_gs_ssbos,
-   _bind_vs_images,
-   _bind_tcs_images,
-   _bind_tes_images,
-   _bind_gs_images,
-   _bind_fs_images,
_update_pixel_transfer,
_update_tess,
 

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


Mesa (master): tgsi: set correct output mode for RESQ

2016-03-09 Thread Nicolai Hähnle
Module: Mesa
Branch: master
Commit: 10b2b584ee6018ad3ae8ee5c494a02705a906957
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=10b2b584ee6018ad3ae8ee5c494a02705a906957

Author: Nicolai Hähnle 
Date:   Sat Feb  6 20:34:20 2016 -0500

tgsi: set correct output mode for RESQ

Acked-by: Ilia Mirkin 
Reviewed-by: Marek Olšák 

---

 src/gallium/auxiliary/tgsi/tgsi_info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c 
b/src/gallium/auxiliary/tgsi/tgsi_info.c
index 70fc460..462bd15 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_info.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_info.c
@@ -142,7 +142,7 @@ static const struct tgsi_opcode_info 
opcode_info[TGSI_OPCODE_LAST] =
{ 0, 0, 0, 0, 0, 1, 0, NONE, "ENDSUB", TGSI_OPCODE_ENDSUB },
{ 1, 1, 1, 0, 0, 0, 0, OTHR, "TXQ_LZ", TGSI_OPCODE_TXQ_LZ },
{ 1, 1, 1, 0, 0, 0, 0, OTHR, "TXQS", TGSI_OPCODE_TXQS },
-   { 1, 1, 0, 0, 0, 0, 0, NONE, "RESQ", TGSI_OPCODE_RESQ },
+   { 1, 1, 0, 0, 0, 0, 0, OTHR, "RESQ", TGSI_OPCODE_RESQ },
{ 0, 0, 0, 0, 0, 0, 0, NONE, "", 106 }, /* removed */
{ 0, 0, 0, 0, 0, 0, 0, NONE, "NOP", TGSI_OPCODE_NOP },
{ 1, 2, 0, 0, 0, 0, 0, COMP, "FSEQ", TGSI_OPCODE_FSEQ },

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


Mesa (master): 29 new commits

2016-03-09 Thread Marek Olšák
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=dcb2b7782317cf06c1c98472c9a34d2c9dfffae7
Author: Marek Olšák 
Date:   Mon Feb 29 20:22:37 2016 +0100

gallium: add CAPs returning PCI device location

Reviewed-by: Brian Paul 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=737b6ed13e8f813987b5566004f0f45e9c55f1e8
Author: Marek Olšák 
Date:   Mon Feb 22 22:58:18 2016 +0100

winsys/amdgpu: get PCI info

This will be queried by the OpenCL stack using an interop call.

I have tested that the values match lspci.

Reviewed-by: Michel Dänzer 
Reviewed-by: Nicolai Hähnle 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec74deeb2466689a0eca52f290d5f9e44af6a97b
Author: Marek Olšák 
Date:   Thu Feb 25 22:32:26 2016 +0100

radeonsi: set amdgpu metadata before exporting a texture

Reviewed-by: Michel Dänzer 
Reviewed-by: Nicolai Hähnle 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ff7e9412be9d1f5fdfedefb179483cc43b276c89
Author: Nicolai Hähnle 
Date:   Sat Feb 6 17:34:04 2016 -0500

radeonsi: extract the texture descriptor computation into its own function

This will allow this code to be re-used for shader images.

Reviewed-by: Marek Olšák 
Reviewed-by: Michel Dänzer 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1197c69bdd4d2c99a2e05944af18488d7a3425be
Author: Nicolai Hähnle 
Date:   Sat Feb 6 17:08:12 2016 -0500

radeonsi: extract the buffer descriptor computation into its own function

This will allow it to be re-used for shader image descriptors.

Reviewed-by: Marek Olšák 
Reviewed-by: Michel Dänzer 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2bf8ee34b8098ebeda82e21cc93919dc923531a1
Author: Nicolai Hähnle 
Date:   Sat Feb 6 16:21:52 2016 -0500

radeonsi: remove resource field from si_sampler_view

view->resource is redundant with view->base.texture, so get rid of it.

Reviewed-by: Marek Olšák 
Reviewed-by: Michel Dänzer 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2dec5e09e19fd7aa40daaed92c3d6193a91faa92
Author: Marek Olšák 
Date:   Fri Feb 26 13:28:31 2016 +0100

radeonsi: accept pipe_resource in si_sampler_view_add_buffer

and rename .._buffers -> .._buffer

Based loosely on Nicolai's patch. This will make it easier to cherry-pick
Nicolai's patches from his image support branch.

Reviewed-by: Michel Dänzer 
Reviewed-by: Nicolai Hähnle 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f18fc70d6f62719e4fae2f93f2d563894bc1437f
Author: Marek Olšák 
Date:   Wed Feb 24 22:04:47 2016 +0100

radeonsi: disable DCC on handle export if expecting write access

This should be okay except that sampler views and images are not re-set.

Reviewed-by: Michel Dänzer 
Reviewed-by: Nicolai Hähnle 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1e48ec7571cb36b4ee5660f8066c7905a3432969
Author: Bas Nieuwenhuizen 
Date:   Wed Oct 21 00:10:41 2015 +0200

radeonsi: add DCC decompression (v2)

This is currently not needed but will be necessary when we have
features that do not work with DCC enabled, such as image stores
and sharing non-scanout surfaces.

v2: Marek: rebase, remove decompression from si_flush_resource (not needed)

Reviewed-by: Marek Olšák 
Reviewed-by: Michel Dänzer 
Reviewed-by: Nicolai Hähnle 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b744ac9f44099e1b50d335dc9bdc0950ab7ec374
Author: Marek Olšák 
Date:   Sun Feb 21 22:49:38 2016 +0100

radeonsi: allocate DCC in the same backing buffer as the texture

To allow sharing textures with DCC enabled.

Reviewed-by: Michel Dänzer 
Reviewed-by: Nicolai Hähnle 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=60c08aa90bce4c8766a747c8517f7ff6987937f0
Author: Marek Olšák 
Date:   Wed Feb 24 22:04:47 2016 +0100

gallium/radeon: disable CMASK on handle export if sharing doesn't allow it 
(v2)

v2: remove the list of all contexts

Reviewed-by: Michel Dänzer 
Reviewed-by: Nicolai Hähnle 

URL:

Mesa (master): glsl: dont allow undefined array sizes in ES

2016-03-09 Thread Timothy Arceri
Module: Mesa
Branch: master
Commit: 2188c77a0ee9b29f89dde316116d53fe22e526e0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2188c77a0ee9b29f89dde316116d53fe22e526e0

Author: Timothy Arceri 
Date:   Tue Mar  8 20:35:41 2016 +1100

glsl: dont allow undefined array sizes in ES

This applies the rule to empty declarations.

Fixes:
dEQP-GLES3.functional.shaders.arrays.invalid.empty_declaration_without_var_name_vertex
dEQP-GLES3.functional.shaders.arrays.invalid.empty_declaration_without_var_name_fragment

Reviewed-by: Kenneth Graunke 

---

 src/compiler/glsl/ast_to_hir.cpp | 12 
 1 file changed, 12 insertions(+)

diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index d755a11..5262bd8 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -4223,6 +4223,18 @@ ast_declarator_list::hir(exec_list *instructions,
   type_name);
   } else {
  if (decl_type->base_type == GLSL_TYPE_ARRAY) {
+/* From Section 13.22 (Array Declarations) of the GLSL ES 3.2
+ * spec:
+ *
+ *"... any declaration that leaves the size undefined is
+ *disallowed as this would add complexity and there are no
+ *use-cases."
+ */
+if (state->es_shader && decl_type->is_unsized_array()) {
+   _mesa_glsl_error(, state, "array size must be explicitly "
+"or implicitly defined");
+}
+
 /* From Section 4.12 (Empty Declarations) of the GLSL 4.5 spec:
  *
  *"The combinations of types and qualifiers that cause

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