Mesa (master): mesa: fix error handling in _mesa_TransformFeedbackVaryings

2016-10-10 Thread Tapani Pälli
Module: Mesa
Branch: master
Commit: fc8b358bd6971cc858bb06bdb4eed92656a6d8bd
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=fc8b358bd6971cc858bb06bdb4eed92656a6d8bd

Author: Tapani Pälli 
Date:   Mon Oct 10 09:49:36 2016 +0300

mesa: fix error handling in _mesa_TransformFeedbackVaryings

Patch changes function to use _mesa_lookup_shader_program_err both
in TransformFeedbackVaryings and GetTransformFeedbackVarying that
handles errors correctly for invalid values of shader program.

Fixes following dEQP test:
   
dEQP-GLES31.functional.debug.negative_coverage.get_error.shader.transform_feedback_varyings

Signed-off-by: Tapani Pälli 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98135
Reviewed-by: Iago Toral Quiroga 

---

 src/mesa/main/transformfeedback.c | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/src/mesa/main/transformfeedback.c 
b/src/mesa/main/transformfeedback.c
index 7c0ff6f..738d63e 100644
--- a/src/mesa/main/transformfeedback.c
+++ b/src/mesa/main/transformfeedback.c
@@ -846,12 +846,10 @@ _mesa_TransformFeedbackVaryings(GLuint program, GLsizei 
count,
   return;
}
 
-   shProg = _mesa_lookup_shader_program(ctx, program);
-   if (!shProg) {
-  _mesa_error(ctx, GL_INVALID_VALUE,
-  "glTransformFeedbackVaryings(program=%u)", program);
+   shProg = _mesa_lookup_shader_program_err(ctx, program,
+"glTransformFeedbackVaryings");
+   if (!shProg)
   return;
-   }
 
if (ctx->Extensions.ARB_transform_feedback3) {
   if (bufferMode == GL_INTERLEAVED_ATTRIBS) {
@@ -927,12 +925,10 @@ _mesa_GetTransformFeedbackVarying(GLuint program, GLuint 
index,
struct gl_program_resource *res;
GET_CURRENT_CONTEXT(ctx);
 
-   shProg = _mesa_lookup_shader_program(ctx, program);
-   if (!shProg) {
-  _mesa_error(ctx, GL_INVALID_VALUE,
-  "glGetTransformFeedbackVarying(program=%u)", program);
+   shProg = _mesa_lookup_shader_program_err(ctx, program,
+"glGetTransformFeedbackVarying");
+   if (!shProg)
   return;
-   }
 
res = _mesa_program_resource_find_index((struct gl_shader_program *) shProg,
GL_TRANSFORM_FEEDBACK_VARYING,

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


Mesa (master): i965: solve cubemap negative x/y/ z faces buffer offset issue in dEQP.

2016-10-10 Thread Tapani Pälli
Module: Mesa
Branch: master
Commit: d11a63d6e69298f34bb08334f637c100f6989ca7
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d11a63d6e69298f34bb08334f637c100f6989ca7

Author: Xu,Randy 
Date:   Sat Oct  8 16:15:59 2016 +0800

i965: solve cubemap negative x/y/z faces buffer offset issue in dEQP.

Add the miptree level/slice x/y_offset when count the surface offset
in brw_emit_surface_state. The surface offset has two parts, one is
from mt->offset, which should be 32 aligned in width/height for tiled
buffer; another is from mt->level[current_level].slice[current_slice].
x/y_offset.

This fix will solve 12 deqp failure
dEQP-EGL.functional.image.create.gles2_cubemap_negative_*_texture

Signed-off-by: Xu,Randy 
Reviewed-by: Jason Ekstrand 

---

 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c 
b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index c84fd53..b774294 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -86,7 +86,8 @@ brw_emit_surface_state(struct brw_context *brw,
unsigned read_domains, unsigned write_domains)
 {
const struct surface_state_info ss_info = surface_state_infos[brw->gen];
-   uint32_t tile_x = 0, tile_y = 0;
+   uint32_t tile_x = mt->level[0].slice[0].x_offset;
+   uint32_t tile_y = mt->level[0].slice[0].y_offset;
uint32_t offset = mt->offset;
 
struct isl_surf surf;
@@ -109,6 +110,7 @@ brw_emit_surface_state(struct brw_context *brw,
*/
   assert(brw->has_surface_tile_offset);
   assert(view.levels == 1 && view.array_len == 1);
+  assert(tile_x == 0 && tile_y == 0);
 
   offset += intel_miptree_get_tile_offsets(mt, view.base_level,
view.base_array_layer,

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


Mesa (master): i915g: fix incorrect gl_FragCoord value

2016-10-10 Thread Stephane Marchesin
Module: Mesa
Branch: master
Commit: 64435fd888ec5932024292d87b0afcecbe5fb818
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=64435fd888ec5932024292d87b0afcecbe5fb818

Author: Nicholas Bishop 
Date:   Thu Aug 25 19:31:53 2016 -0400

i915g: fix incorrect gl_FragCoord value

On Intel Pineview M hardware, the i915 gallium driver doesn't output
the correct gl_FragCoord. It seems to always have an X coord of 0.0
and a Y coord of the window's height in pixels, e.g. 600.0f or such.

I believe this is a regression caused in part by this commit:
afa035031ff9e0c07a2297d864e46c76f7bfff58

The old behavior used the output at index zero, while the new behavior
uses actual zeroes. In the case of gl_FragCoord the output at index
zero happened to be the correct one, so the behavior appeared correct
although the code already had a bug.

Fixed by checking for I915_SEMANTIC_POS when setting up texCoords. If
the generic_mapping is I915_SEMANTIC_POS, look for the
TGSI_SEMANTIC_POSITION instead of a TGSI_SEMANTIC_GENERIC output.

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

Reviewed-by: Stéphane Marchesin 
Tested-by: Stéphane Marchesin 

---

 src/gallium/drivers/i915/i915_state_derived.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/i915/i915_state_derived.c 
b/src/gallium/drivers/i915/i915_state_derived.c
index 177b854..dbfbc84 100644
--- a/src/gallium/drivers/i915/i915_state_derived.c
+++ b/src/gallium/drivers/i915/i915_state_derived.c
@@ -145,7 +145,12 @@ static void calculate_vertex_layout(struct i915_context 
*i915)
   uint hwtc;
   if (texCoords[i]) {
  hwtc = TEXCOORDFMT_4D;
- src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_GENERIC, 
fs->generic_mapping[i]);
+ if (fs->generic_mapping[i] == I915_SEMANTIC_POS) {
+src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_POSITION, 
0);
+ }
+ else {
+src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_GENERIC, 
fs->generic_mapping[i]);
+ }
  draw_emit_vertex_attr(, EMIT_4F, src);
   }
   else {

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


Mesa (master): Revert "mesa_glinterop: remove inclusion of GLX header"

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

Author: Vinson Lee 
Date:   Mon Oct  3 15:16:30 2016 -0700

Revert "mesa_glinterop: remove inclusion of GLX header"

This reverts commit 8472045b16b3e4621553fe451a20a9ba9f0d44b6.

Conflicts:

include/GL/mesa_glinterop.h

This patch fixes this build error with GCC 4.4.

  Compiling src/glx/dri_common_interop.c ...
In file included from src/glx/dri_common_interop.c:33:
include/GL/mesa_glinterop.h:62: error: redefinition of typedef ‘GLXContext’
include/GL/glx.h:165: note: previous declaration of ‘GLXContext’ was here

Fixes: 8472045b16b3 ("mesa_glinterop: remove inclusion of GLX header")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96770
Signed-off-by: Vinson Lee 

---

 include/GL/mesa_glinterop.h | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/include/GL/mesa_glinterop.h b/include/GL/mesa_glinterop.h
index 383d7f9..c6a967e 100644
--- a/include/GL/mesa_glinterop.h
+++ b/include/GL/mesa_glinterop.h
@@ -52,15 +52,12 @@
 
 #include 
 #include 
+#include 
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-/* Forward declarations to avoid inclusion of GL/glx.h */
-typedef struct _XDisplay Display;
-typedef struct __GLXcontextRec *GLXContext;
-
 /* Forward declarations to avoid inclusion of EGL/egl.h */
 typedef void *EGLDisplay;
 typedef void *EGLContext;

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


Mesa (master): 78 new commits

2016-10-10 Thread Axel Davy
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=eef0744d4384a48c70da3f9863a02ceab08c97bb
Author: Axel Davy 
Date:   Sun Oct 2 12:14:03 2016 +0200

st/nine: More checks for GetRenderTargetData

Fixes a wine test crash

Signed-off-by: Axel Davy 
Reviewed-by: Patrick Rudolph 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a52e700169066c7c2b4a26230f66f77db702af82
Author: Patrick Rudolph 
Date:   Wed Sep 28 20:11:34 2016 +0200

st/nine: Add debug output for lost devices

Add debug output to ease debugging.

Signed-off-by: Patrick Rudolph 
Reviewed-by: Axel Davy 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5d85253dc30cc26a40fa6f4a52cf61880827edee
Author: Patrick Rudolph 
Date:   Wed Sep 28 18:50:19 2016 +0200

st/nine: Prevent crash in GetRenderTargetData

Return error instead of crashing on source surfaces
with format D3DFMT_NULL.

Fix for issue #236.

Tested on Windows 7.

Signed-off-by: Patrick Rudolph 
Reviewed-by: Axel Davy 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=09edc0555f91d76001b1ffc0e656b0614abb809a
Author: Patrick Rudolph 
Date:   Sat Sep 24 18:19:26 2016 +0200

st/nine: Set CLAMP_TO_EDGE on cubetextures

Wine tests show that cubetextures always use
PIPE_TEX_WRAP_CLAMP_TO_EDGE regardless of set
sampler states.

Fixes failing d3d9 wine test test_cube_wrap.

Signed-off-by: Patrick Rudolph 
Reviewed-by: Axel Davy 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=fa2574497b25d06258404b83282719dbb477b190
Author: Patrick Rudolph 
Date:   Sat Sep 24 11:34:33 2016 +0200

st/nine: handle possible failure of D3DWindowBuffer_create

Check for errors and pass them to the callers.

Signed-off-by: Patrick Rudolph 
Reviewed-by: Axel Davy 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f04fa0a62c6d39659c38eabd63bff54f0d2833fe
Author: Patrick Rudolph 
Date:   Sat Sep 24 10:46:27 2016 +0200

st/nine: Assert on buffer creation failure

Add an assert to make sure buffer creation doesn't fail.
Add error handling in calling functions.

Signed-off-by: Patrick Rudolph 
Reviewed-by: Axel Davy 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f8c01e7a96aed4e64eab11acbae8aef70c8e7cbe
Author: Patrick Rudolph 
Date:   Fri Sep 23 17:55:08 2016 +0200

st/nine: Use NineDevice9_CreateDepthStencilSurface in swapchain9

Replace custom code with NineDevice9_CreateDepthStencilSurface.
All functionality is given now.

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=63367e6c9507dccba4e8bc563e190123e25b6893
Author: Axel Davy 
Date:   Sun Oct 2 00:58:48 2016 +0200

st/nine: Fix check and remove useless code in swapchain9

The removed code was there for two reasons:
1) Allow DF16, DF24, INTZ to be used as depth buffer
for swapchain, if the driver doesn't support
PIPE_BIND_SAMPLER_VIEW for the underlying format
2) Set PIPE_BIND_SAMPLER_VIEW if possible, such that
if StretchRect is called on the depth texture, it is happy.

1) The reason these formats needed a workaround is because
the check flags for them in CheckDeviceFormat were incorrect,
which led applications to think the formats were valid for
swapchains, even if they weren't supported.
2) StretchRect limitations for depth buffers force
the resource_copy_region path, which should be fine without
PIPE_BIND_SAMPLER_VIEW.

Thus fix the check for 1), and remove the code.

Signed-off-by: Axel Davy 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=60624be2033f06b414cf76794c2f3b061dc28332
Author: Patrick Rudolph 
Date:   Thu Sep 22 17:03:17 2016 +0200

st/nine: Implement MSAA quality levels

Advertise quality levels:
Each supported multisample count matches to one quality level.
The application doesn't know how much samples each quality level has.
For that reason it's not possible to set the multisample mask.

Return errors on quality level missmatch.

Fixes several old games not having multisample support until now.

Fix for issue #73.

Signed-off-by: Patrick Rudolph 
Signed-off-by: Axel Davy 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8a50b1244fcb77334dc9d8e470061cd5f9537375
Author: Patrick Rudolph 
Date:   Fri Sep 30 18:15:31 2016 +0200

st/nine: Prepare 

Mesa (master): nvc0: fix valid range for shader buffers

2016-10-10 Thread Samuel Pitoiset
Module: Mesa
Branch: master
Commit: d43151318aad1c8dc4a44dcb35d3c984ef922960
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d43151318aad1c8dc4a44dcb35d3c984ef922960

Author: Samuel Pitoiset 
Date:   Sun Oct  9 22:17:51 2016 +0200

nvc0: fix valid range for shader buffers

When offset != 0, the valid range was wrong because the second
argument of util_range_add() is end, not size.

Signed-off-by: Samuel Pitoiset 
Reviewed-by: Ilia Mirkin 

---

 src/gallium/drivers/nouveau/nvc0/nvc0_compute.c| 1 +
 src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c | 1 +
 src/gallium/drivers/nouveau/nvc0/nve4_compute.c| 1 +
 3 files changed, 3 insertions(+)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c 
b/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c
index dc4d1b3..11635c9 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c
@@ -288,6 +288,7 @@ nvc0_compute_validate_buffers(struct nvc0_context *nvc0)
  BCTX_REFN(nvc0->bufctx_cp, CP_BUF, res, RDWR);
  util_range_add(>valid_buffer_range,
 nvc0->buffers[s][i].buffer_offset,
+nvc0->buffers[s][i].buffer_offset +
 nvc0->buffers[s][i].buffer_size);
   } else {
  PUSH_DATA (push, 0);
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c 
b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
index e69463e..1d8ebe6 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
@@ -561,6 +561,7 @@ nvc0_validate_buffers(struct nvc0_context *nvc0)
 BCTX_REFN(nvc0->bufctx_3d, 3D_BUF, res, RDWR);
 util_range_add(>valid_buffer_range,
nvc0->buffers[s][i].buffer_offset,
+   nvc0->buffers[s][i].buffer_offset +
nvc0->buffers[s][i].buffer_size);
  } else {
 PUSH_DATA (push, 0);
diff --git a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c 
b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
index e85e9b4..d661c00 100644
--- a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
+++ b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
@@ -444,6 +444,7 @@ nve4_compute_validate_buffers(struct nvc0_context *nvc0)
  BCTX_REFN(nvc0->bufctx_cp, CP_BUF, res, RDWR);
  util_range_add(>valid_buffer_range,
 nvc0->buffers[s][i].buffer_offset,
+nvc0->buffers[s][i].buffer_offset +
 nvc0->buffers[s][i].buffer_size);
   } else {
  PUSH_DATA (push, 0);

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


Mesa (master): nvc0/ir: fix overwriting of value backing non-constant gather offset

2016-10-10 Thread Ilia Mirkin
Module: Mesa
Branch: master
Commit: 5239bd59207752a3acae367fc3faa76ab17d01e4
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5239bd59207752a3acae367fc3faa76ab17d01e4

Author: Ilia Mirkin 
Date:   Mon Oct 10 12:06:59 2016 -0400

nvc0/ir: fix overwriting of value backing non-constant gather offset

Normally the value is an immediate, which is moved to some temporary, so
there's no problem. In the case of a non-constant offset (as allowed by
ARB_gpu_shader5), we have to take care to copy it first before using it
to build up the bits.

This fixes a compilation error observed in F1 2015.

Signed-off-by: Ilia Mirkin 
Reviewed-by: Samuel Pitoiset 
Cc: mesa-sta...@lists.freedesktop.org

---

 src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp 
b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
index 3c3d611..4c013c4 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
@@ -820,11 +820,11 @@ NVC0LoweringPass::handleTEX(TexInstruction *i)
  // Either there is 1 offset, which goes into the 2 low bytes of the
  // first source, or there are 4 offsets, which go into 2 sources (8
  // values, 1 byte each).
- Value *offs[2] = {NULL, NULL};
+ Value *offs[2] = {bld.getScratch(), bld.getScratch()};
  for (n = 0; n < i->tex.useOffsets; n++) {
 for (c = 0; c < 2; ++c) {
if ((n % 2) == 0 && c == 0)
-  offs[n / 2] = i->offset[n][c].get();
+  bld.mkMov(offs[n / 2], i->offset[n][c].get());
else
   bld.mkOp3(OP_INSBF, TYPE_U32,
 offs[n / 2],

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


Mesa (master): glsl: Add missing cache_destroy stub function.

2016-10-10 Thread Vinson Lee
Module: Mesa
Branch: master
Commit: 0a898ec28bf1bd1bd302c881af13a02b557acb07
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a898ec28bf1bd1bd302c881af13a02b557acb07

Author: Vinson Lee 
Date:   Fri Oct  7 13:57:44 2016 -0700

glsl: Add missing cache_destroy stub function.

  CC   glsl/tests/cache_test.o
glsl/tests/cache_test.c: In function ‘test_cache_create’:
glsl/tests/cache_test.c:160:4: error: implicit declaration of function 
‘cache_destroy’ [-Werror=implicit-function-declaration]
cache_destroy(cache);
^

Fixes: 87ab26b2ab35 ("glsl: Add initial functions to implement an on-disk 
cache")
Signed-off-by: Vinson Lee 
Reviewed-by: Timothy Arceri 

---

 src/compiler/glsl/cache.h | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/compiler/glsl/cache.h b/src/compiler/glsl/cache.h
index 78df32b..d804169 100644
--- a/src/compiler/glsl/cache.h
+++ b/src/compiler/glsl/cache.h
@@ -139,6 +139,11 @@ cache_create(void)
 }
 
 static inline void
+cache_destroy(struct program_cache *cache) {
+   return;
+}
+
+static inline void
 cache_put(struct program_cache *cache, cache_key key,
   const void *data, size_t size)
 {

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


Mesa (master): docs: Mark GL_OES_viewport_array done on i965

2016-10-10 Thread Anuj Phogat
Module: Mesa
Branch: master
Commit: f8f6f60a362d067c9e72cf675736b35730e06a0d
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f8f6f60a362d067c9e72cf675736b35730e06a0d

Author: Anuj Phogat 
Date:   Wed Oct  5 12:18:55 2016 -0700

docs: Mark GL_OES_viewport_array done on i965

Signed-off-by: Anuj Phogat 
Reviewed-by: Dylan Baker 

---

 docs/features.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/features.txt b/docs/features.txt
index 533971f..505b61c 100644
--- a/docs/features.txt
+++ b/docs/features.txt
@@ -319,7 +319,7 @@ Khronos, ARB, and OES extensions that are not part of any 
OpenGL or OpenGL ES ve
   GL_OES_texture_half_float DONE (i965, r300, 
r600, radeonsi, nv30, nv50, nvc0, softpipe, llvmpipe)
   GL_OES_texture_half_float_linear  DONE (i965, r300, 
r600, radeonsi, nv30, nv50, nvc0, softpipe, llvmpipe)
   GL_OES_texture_view   not started - based on 
GL_ARB_texture_view
-  GL_OES_viewport_array DONE (nvc0, radeonsi)
+  GL_OES_viewport_array DONE (i965, nvc0, 
radeonsi)
   GLX_ARB_context_flush_control not started
   GLX_ARB_robustness_application_isolation  not started
   GLX_ARB_robustness_share_group_isolation  not started

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


Mesa (master): egl: Unify the EGLint/EGLAttrib paths in eglCreateSync* (v3 )

2016-10-10 Thread Chad Versace
Module: Mesa
Branch: master
Commit: 804488518296fbf20b06244bc0aa2e2793c61998
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=804488518296fbf20b06244bc0aa2e2793c61998

Author: Chad Versace 
Date:   Tue Sep 27 13:27:21 2016 -0700

egl: Unify the EGLint/EGLAttrib paths in eglCreateSync* (v3)

Pre-patch, there were two code paths for parsing EGLSync attribute
lists: one path for old-style EGLint lists, used by eglCreateSyncKHR,
and another for new-style EGLAttrib lists, used by eglCreateSync (1.5)
and eglCreateSync64 (EGL_KHR_cl_event2).

There were two attrib_list parsing functions,
  _eglParseSyncAttribList(_EGLSync *sync, const EGLint *attrib_list)
  _eglParseSyncAttribList64(_EGLSync *sync, const EGLattrib *attrib_list)
This patch unifies the two attrib_list parsing functions into one,
  _eglParseSyncAttribList(_EGLSync *sync, const EGLattrib *attrib_list)

Many internal EGLSync function signatures had *two* attrib_list
parameters to accomodate both code paths: one parameter was an EGLint
list and other an EGLAttrib list. At most one of the parameters was
allowed to be non-null.  This patch removes the `EGLint *attrib_list`
parameter, leaving only the `EGLAttrib *attrib_list` parameter, for all
internal EGLSync functions.

v2:
  - Consistently use condition (sizeof(int_list[0]) ==
sizeof(attrib_list[0])). [for emil]
v3:
  - Don't double-unlock the display in eglCreateSyncKHR.

Reviewed-by: Emil Velikov  (v2)

---

 src/egl/drivers/dri2/egl_dri2.c |  6 ++
 src/egl/main/eglapi.c   | 35 +++
 src/egl/main/eglapi.h   |  3 +--
 src/egl/main/eglsync.c  | 40 +++-
 src/egl/main/eglsync.h  |  2 +-
 5 files changed, 34 insertions(+), 52 deletions(-)

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 803627d..cd0a2e9 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -2509,8 +2509,7 @@ dri2_egl_unref_sync(struct dri2_egl_display *dri2_dpy,
 
 static _EGLSync *
 dri2_create_sync(_EGLDriver *drv, _EGLDisplay *dpy,
- EGLenum type, const EGLint *attrib_list,
- const EGLAttrib *attrib_list64)
+ EGLenum type, const EGLAttrib *attrib_list)
 {
_EGLContext *ctx = _eglGetCurrentContext();
struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
@@ -2525,8 +2524,7 @@ dri2_create_sync(_EGLDriver *drv, _EGLDisplay *dpy,
   return NULL;
}
 
-   if (!_eglInitSync(_sync->base, dpy, type, attrib_list,
- attrib_list64)) {
+   if (!_eglInitSync(_sync->base, dpy, type, attrib_list)) {
   free(dri2_sync);
   return NULL;
}
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index d2a89af..18071d7 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -1520,8 +1520,8 @@ eglDestroyImage(EGLDisplay dpy, EGLImage image)
 
 
 static EGLSync
-_eglCreateSync(_EGLDisplay *disp, EGLenum type, const EGLint *attrib_list,
-   const EGLAttrib *attrib_list64, EGLBoolean is64,
+_eglCreateSync(_EGLDisplay *disp, EGLenum type, const EGLAttrib *attrib_list,
+   EGLBoolean orig_is_EGLAttrib,
EGLenum invalid_type_error)
 {
_EGLContext *ctx = _eglGetCurrentContext();
@@ -1531,7 +1531,7 @@ _eglCreateSync(_EGLDisplay *disp, EGLenum type, const 
EGLint *attrib_list,
 
_EGL_CHECK_DISPLAY(disp, EGL_NO_SYNC_KHR, drv);
 
-   if (!disp->Extensions.KHR_cl_event2 && is64) {
+   if (!disp->Extensions.KHR_cl_event2 && orig_is_EGLAttrib) {
   /* There exist two EGLAttrib variants of eglCreateSync*:
* eglCreateSync64KHR which requires EGL_KHR_cl_event2, and eglCreateSync
* which requires EGL 1.5. Here we use the presence of EGL_KHR_cl_event2
@@ -1566,7 +1566,7 @@ _eglCreateSync(_EGLDisplay *disp, EGLenum type, const 
EGLint *attrib_list,
   RETURN_EGL_ERROR(disp, invalid_type_error, EGL_NO_SYNC_KHR);
}
 
-   sync = drv->API.CreateSyncKHR(drv, disp, type, attrib_list, attrib_list64);
+   sync = drv->API.CreateSyncKHR(drv, disp, type, attrib_list);
ret = (sync) ? _eglLinkSync(sync) : EGL_NO_SYNC_KHR;
 
RETURN_EGL_EVAL(disp, ret);
@@ -1574,12 +1574,31 @@ _eglCreateSync(_EGLDisplay *disp, EGLenum type, const 
EGLint *attrib_list,
 
 
 static EGLSync EGLAPIENTRY
-eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
+eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *int_list)
 {
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
-   return _eglCreateSync(disp, type, attrib_list, NULL, EGL_FALSE,
+
+   EGLSync sync;
+   EGLAttrib *attrib_list;
+   EGLint err;
+
+   if (sizeof(int_list[0]) == sizeof(attrib_list[0])) {
+  attrib_list = (EGLAttrib *) int_list;
+   } else {
+  err = _eglConvertIntsToAttribs(int_list, _list);
+  if (err != 

Mesa (master): intel: Fix bash-specific redirection.

2016-10-10 Thread Eric Anholt
Module: Mesa
Branch: master
Commit: 0f99c0686e9f14238125b3b7b492d35eb2f4c023
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0f99c0686e9f14238125b3b7b492d35eb2f4c023

Author: Eric Anholt 
Date:   Mon Oct 10 09:18:19 2016 -0700

intel: Fix bash-specific redirection.

Reviewed-by: Lionel Landwerlin 

---

 src/intel/Makefile.genxml.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/Makefile.genxml.am b/src/intel/Makefile.genxml.am
index 8d7d402..160a411 100644
--- a/src/intel/Makefile.genxml.am
+++ b/src/intel/Makefile.genxml.am
@@ -35,7 +35,7 @@ $(GENXML_GENERATED_FILES): genxml/gen_pack_header.py
 %_xml.h:  %.xml Makefile
$(MKDIR_GEN)
$(AM_V_GEN) echo -n "static const uint8_t " > $@; \
-   sed -e 's,_xml.h,,' <<< "`basename $@`_xml[] = {" >> $@; \
+   echo "`basename $@`_xml[] = {" | sed -e 's,_xml.h,,' >> $@; \
cat $< | $(XXD) -i >> $@; \
echo "};" >> $@
 

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


Mesa (master): gallium: Fix install-gallium-links.mk on non-bash /bin/sh

2016-10-10 Thread Eric Anholt
Module: Mesa
Branch: master
Commit: ec9ed1c4d8f1005ea8b00fa673257564310d96a8
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec9ed1c4d8f1005ea8b00fa673257564310d96a8

Author: Eric Anholt 
Date:   Thu Oct  6 15:19:21 2016 -0700

gallium: Fix install-gallium-links.mk on non-bash /bin/sh

Debian uses dash by default, which doesn't do '+='.  Fixes servo's
osmesa-based headless testing system, which was looking for libOSMesa in
the lib/ directory.

Reviewed-by: Nicolai Hähnle 
Reviewed-by: Emil Velikov 
Cc: mesa-sta...@lists.freedesktop.org

---

 install-gallium-links.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install-gallium-links.mk b/install-gallium-links.mk
index ac5a499..fc2f75d 100644
--- a/install-gallium-links.mk
+++ b/install-gallium-links.mk
@@ -13,8 +13,8 @@ all-local : .install-gallium-links
fi; \
$(MKDIR_P) $$link_dir;  \
file_list="$(dri_LTLIBRARIES:%.la=.libs/%.so)"; \
-   file_list+="$(egl_LTLIBRARIES:%.la=.libs/%.$(LIB_EXT)*)";   \
-   file_list+="$(lib_LTLIBRARIES:%.la=.libs/%.$(LIB_EXT)*)";   \
+   file_list="$$file_list$(egl_LTLIBRARIES:%.la=.libs/%.$(LIB_EXT)*)"; 
\
+   file_list="$$file_list$(lib_LTLIBRARIES:%.la=.libs/%.$(LIB_EXT)*)"; 
\
for f in $$file_list; do\
if test -h .libs/$$f; then  \
cp -d $$f $$link_dir;   \

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


Mesa (master): nv50/ir: only stick one preret per function

2016-10-10 Thread Ilia Mirkin
Module: Mesa
Branch: master
Commit: ec05331a7b0d6b6bb84fa6452fbba4bf5dc25f83
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec05331a7b0d6b6bb84fa6452fbba4bf5dc25f83

Author: Ilia Mirkin 
Date:   Sun Oct  9 00:09:54 2016 -0400

nv50/ir: only stick one preret per function

A function with multiple returns would have had multiple preret settings
at the top of the function. While this is unlikely to have caused issues
since we don't use functions in earnest, it could have in some cases
overflowed the call stack, in case a function had a lot of early
returns.

Signed-off-by: Ilia Mirkin 
Reviewed-by: Samuel Pitoiset 

---

 src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp 
b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
index 7dff08a..db03281 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -3465,10 +3465,13 @@ Converter::handleInstruction(const struct 
tgsi_full_instruction *insn)
   if (!isEndOfSubroutine(ip + 1)) {
  // insert a PRERET at the entry if this is an early return
  // (only needed for sharing code in the epilogue)
- BasicBlock *pos = getBB();
- setPosition(BasicBlock::get(func->cfg.getRoot()), false);
- mkFlow(OP_PRERET, leave, CC_ALWAYS, NULL)->fixed = 1;
- setPosition(pos, true);
+ BasicBlock *root = BasicBlock::get(func->cfg.getRoot());
+ if (root->getEntry() == NULL || root->getEntry()->op != OP_PRERET) {
+BasicBlock *pos = getBB();
+setPosition(root, false);
+mkFlow(OP_PRERET, leave, CC_ALWAYS, NULL)->fixed = 1;
+setPosition(pos, true);
+ }
   }
   mkFlow(OP_RET, NULL, CC_ALWAYS, NULL)->fixed = 1;
   bb->cfg.attach(>cfg, Graph::Edge::CROSS);

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


Mesa (master): radeonsi: support ARB_compute_variable_group_size

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

Author: Nicolai Hähnle 
Date:   Fri Sep  9 10:08:11 2016 +0200

radeonsi: support ARB_compute_variable_group_size

Not sure if it's possible to avoid programming the block size twice (once for
the userdata and once for the dispatch).

Reviewed-by: Edward O'Callaghan 
Reviewed-by: Marek Olšák 

---

 docs/features.txt |  2 +-
 docs/relnotes/12.1.0.html |  2 +-
 src/gallium/drivers/radeon/r600_pipe_common.c | 10 +-
 src/gallium/drivers/radeon/r600_pipe_common.h |  2 ++
 src/gallium/drivers/radeonsi/si_compute.c | 10 +-
 src/gallium/drivers/radeonsi/si_shader.c  | 44 ++-
 src/gallium/drivers/radeonsi/si_shader.h  |  4 ++-
 7 files changed, 55 insertions(+), 19 deletions(-)

diff --git a/docs/features.txt b/docs/features.txt
index e91ef6c..533971f 100644
--- a/docs/features.txt
+++ b/docs/features.txt
@@ -279,7 +279,7 @@ Khronos, ARB, and OES extensions that are not part of any 
OpenGL or OpenGL ES ve
 
   GL_ARB_bindless_texture   started (airlied)
   GL_ARB_cl_event   not started
-  GL_ARB_compute_variable_group_sizeDONE (nvc0)
+  GL_ARB_compute_variable_group_sizeDONE (nvc0, radeonsi)
   GL_ARB_ES3_2_compatibilityDONE (i965/gen8+)
   GL_ARB_fragment_shader_interlock  not started
   GL_ARB_gl_spirv   not started
diff --git a/docs/relnotes/12.1.0.html b/docs/relnotes/12.1.0.html
index 9ddd99c..2e4b669 100644
--- a/docs/relnotes/12.1.0.html
+++ b/docs/relnotes/12.1.0.html
@@ -49,7 +49,7 @@ Note: some of the new features are only available with 
certain drivers.
 GL_ARB_ES3_1_compatibility on i965
 GL_ARB_ES3_2_compatibility on i965/gen8+
 GL_ARB_clear_texture on r600, radeonsi
-GL_ARB_compute_variable_group_size on nvc0
+GL_ARB_compute_variable_group_size on nvc0, radeonsi
 GL_ARB_cull_distance on radeonsi
 GL_ARB_enhanced_layouts on i965
 GL_ARB_indirect_parameters on radeonsi
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c 
b/src/gallium/drivers/radeon/r600_pipe_common.c
index 44863ee..3dbcbc6 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -1037,7 +1037,15 @@ static int r600_get_compute_param(struct pipe_screen 
*screen,
}
return sizeof(uint32_t);
case PIPE_COMPUTE_CAP_MAX_VARIABLE_THREADS_PER_BLOCK:
-   return 0;
+   if (ret) {
+   uint64_t *max_variable_threads_per_block = ret;
+   if (rscreen->chip_class >= SI && HAVE_LLVM >= 0x309 &&
+   ir_type == PIPE_SHADER_IR_TGSI)
+   *max_variable_threads_per_block = 
SI_MAX_VARIABLE_THREADS_PER_BLOCK;
+   else
+   *max_variable_threads_per_block = 0;
+   }
+   return sizeof(uint64_t);
}
 
 fprintf(stderr, "unknown PIPE_COMPUTE_CAP %d\n", param);
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h 
b/src/gallium/drivers/radeon/r600_pipe_common.h
index 54991e8..290b228 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -106,6 +106,8 @@
 #define R600_MAP_BUFFER_ALIGNMENT 64
 #define R600_MAX_VIEWPORTS16
 
+#define SI_MAX_VARIABLE_THREADS_PER_BLOCK 1024
+
 enum r600_coherency {
R600_COHERENCY_NONE, /* no cache flushes needed */
R600_COHERENCY_SHADER,
diff --git a/src/gallium/drivers/radeonsi/si_compute.c 
b/src/gallium/drivers/radeonsi/si_compute.c
index 1d1df2f..e59bafe 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -601,11 +601,19 @@ static void si_setup_tgsi_grid(struct si_context *sctx,
radeon_emit(cs, 0);
}
} else {
+   struct si_compute *program = sctx->cs_shader_state.program;
+   bool variable_group_size =
+   
program->shader.selector->info.properties[TGSI_PROPERTY_CS_FIXED_BLOCK_WIDTH] 
== 0;
 
-   radeon_set_sh_reg_seq(cs, grid_size_reg, 3);
+   radeon_set_sh_reg_seq(cs, grid_size_reg, variable_group_size ? 
6 : 3);
radeon_emit(cs, info->grid[0]);
radeon_emit(cs, info->grid[1]);
radeon_emit(cs, info->grid[2]);
+   if (variable_group_size) {
+   radeon_emit(cs, info->block[0]);
+   radeon_emit(cs, info->block[1]);
+   radeon_emit(cs, 

Mesa (master): radeonsi: make more use of si_have_tgsi_compute

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

Author: Nicolai Hähnle 
Date:   Thu Oct  6 22:57:55 2016 +0200

radeonsi: make more use of si_have_tgsi_compute

Reviewed-by: Edward O'Callaghan 
Reviewed-by: Marek Olšák 

---

 src/gallium/drivers/radeonsi/si_pipe.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c 
b/src/gallium/drivers/radeonsi/si_pipe.c
index 2aa679c..66eb2e1 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -437,9 +437,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum 
pipe_cap param)
return HAVE_LLVM >= 0x0309 ? 4 : 0;
 
case PIPE_CAP_GLSL_FEATURE_LEVEL:
-   if (pscreen->get_shader_param(pscreen, PIPE_SHADER_COMPUTE,
- PIPE_SHADER_CAP_SUPPORTED_IRS) &
-   (1 << PIPE_SHADER_IR_TGSI))
+   if (si_have_tgsi_compute(sscreen))
return 430;
return HAVE_LLVM >= 0x0309 ? 420 :
   HAVE_LLVM >= 0x0307 ? 410 : 330;

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


Mesa (master): gallium/radeon: avoid redundant work with overlapping in/ out arrays

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

Author: Nicolai Hähnle 
Date:   Fri Oct  7 12:54:34 2016 +0200

gallium/radeon: avoid redundant work with overlapping in/out arrays

Reviewed-by: Edward O'Callaghan 
Reviewed-by: Marek Olšák 

---

 src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c 
b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
index 8e364c9..da4a030 100644
--- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
+++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
@@ -680,7 +680,8 @@ static void emit_declaration(struct lp_build_tgsi_context 
*bld_base,
{
unsigned idx;
for (idx = decl->Range.First; idx <= decl->Range.Last; idx++) {
-   if (ctx->load_input) {
+   if (ctx->load_input &&
+   ctx->input_decls[idx].Declaration.File != 
TGSI_FILE_INPUT) {
ctx->input_decls[idx] = *decl;
 
if (bld_base->info->processor != 
PIPE_SHADER_FRAGMENT)
@@ -706,6 +707,8 @@ static void emit_declaration(struct lp_build_tgsi_context 
*bld_base,
for (idx = decl->Range.First; idx <= decl->Range.Last; idx++) {
unsigned chan;
assert(idx < RADEON_LLVM_MAX_OUTPUTS);
+   if (ctx->soa.outputs[idx][0])
+   continue;
for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
ctx->soa.outputs[idx][chan] = 
lp_build_alloca_undef(
>gallivm,

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


Mesa (master): gallium/radeon: assign a name to LLVM output variables in debug builds

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

Author: Nicolai Hähnle 
Date:   Fri Oct  7 17:14:54 2016 +0200

gallium/radeon: assign a name to LLVM output variables in debug builds

This can be helpful with R600_DEBUG=preoptir.

Reviewed-by: Edward O'Callaghan 
Reviewed-by: Marek Olšák 

---

 src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c 
b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
index da4a030..c843541 100644
--- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
+++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
@@ -703,6 +703,7 @@ static void emit_declaration(struct lp_build_tgsi_context 
*bld_base,
 
case TGSI_FILE_OUTPUT:
{
+   char name[16] = "";
unsigned idx;
for (idx = decl->Range.First; idx <= decl->Range.Last; idx++) {
unsigned chan;
@@ -710,9 +711,13 @@ static void emit_declaration(struct lp_build_tgsi_context 
*bld_base,
if (ctx->soa.outputs[idx][0])
continue;
for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+#ifdef DEBUG
+   snprintf(name, sizeof(name), "OUT%d.%c",
+idx, "xyzw"[chan % 4]);
+#endif
ctx->soa.outputs[idx][chan] = 
lp_build_alloca_undef(
>gallivm,
-   ctx->soa.bld_base.base.elem_type, "");
+   ctx->soa.bld_base.base.elem_type, name);
}
}
break;

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


Mesa (master): anv: turn on samplerAnisotropy in VkPhysicalDeviceFeatures

2016-10-10 Thread Lionel Landwerlin
Module: Mesa
Branch: master
Commit: 014bd4acb8b130fb31ec00f6125b8a91881bebdf
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=014bd4acb8b130fb31ec00f6125b8a91881bebdf

Author: Lionel Landwerlin 
Date:   Fri Oct  7 13:53:04 2016 +0100

anv: turn on samplerAnisotropy in VkPhysicalDeviceFeatures

According to the Vulkan spec 5.63.4 :

  samplerAnisotropy indicates whether anisotropic filtering is supported. If
  this feature is not enabled, the maxAnisotropy member of the
  VkSamplerCreateInfo structure must be 1.0.

Since we already set maxAnisotropy to 16 and program the hardware according
to the VkSamplerCreateInfo.maxAnisotropy, it seems we can turn this on.

Signed-off-by: Lionel Landwerlin 
Reviewed-by: Jason Ekstrand 

---

 src/intel/vulkan/TODO | 1 -
 src/intel/vulkan/anv_device.c | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/intel/vulkan/TODO b/src/intel/vulkan/TODO
index 9ac63eb..4c3faad 100644
--- a/src/intel/vulkan/TODO
+++ b/src/intel/vulkan/TODO
@@ -5,7 +5,6 @@ Missing Features:
  - FP64
  - Tessellation
  - Cull and Clip Distance
- - Sampler anisotropy (Is there anything to do here?)
  - Image Gather Extended
  - Storage Image Without Format
  - Investigate CTS failures on HSW
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 9f8fa33..02246ba 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -418,7 +418,7 @@ void anv_GetPhysicalDeviceFeatures(
   .largePoints  = true,
   .alphaToOne   = true,
   .multiViewport= true,
-  .samplerAnisotropy= false, /* FINISHME */
+  .samplerAnisotropy= true,
   .textureCompressionETC2   = pdevice->info.gen >= 8 ||
   pdevice->info.is_baytrail,
   .textureCompressionASTC_LDR   = pdevice->info.gen >= 9, /* 
FINISHME CHV */

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