Re: [Mesa-dev] [PATCH] docs: Add GL4.4 and ARB_enhanced_layouts to the release notes

2016-07-30 Thread Timothy Arceri
On Sat, 2016-07-30 at 18:04 +1000, Edward O'Callaghan wrote:
> 
> On 07/30/2016 10:25 AM, Timothy Arceri wrote:
> > ---
> >  Not sure is we need to be more careful about mentioning we support
> > 4.4
> >  thoughts?
> s/is/if/
> 
> Well in fact, any reason why we can't actually claim 4.5 support now?
> The raw base requirements seem to be fulfilled at least.

Starting at 4.4 there are conformance requirements before you can claim
support, including a fee. The requirements have not been met.

> 
> Reviewed-by: Edward O'Callaghan 
> 
> > 
> >  docs/relnotes/12.1.0.html | 7 ---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/docs/relnotes/12.1.0.html b/docs/relnotes/12.1.0.html
> > index e7c3a52..3935bb0 100644
> > --- a/docs/relnotes/12.1.0.html
> > +++ b/docs/relnotes/12.1.0.html
> > @@ -22,11 +22,11 @@ People who are concerned with stability and
> > reliability should stick
> >  with a previous release or wait for Mesa 12.1.1.
> >  
> >  
> > -Mesa 12.1.0 implements the OpenGL 4.3 API, but the version
> > reported by
> > +Mesa 12.1.0 implements the OpenGL 4.4 API, but the version
> > reported by
> >  glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
> >  glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver
> > being used.
> > -Some drivers don't support all the features required in OpenGL
> > 4.3.  OpenGL
> > -4.3 is only available if requested at context
> > creation
> > +Some drivers don't support all the features required in OpenGL
> > 4.4.  OpenGL
> > +4.4 is only available if requested at context
> > creation
> >  because compatibility contexts are not supported.
> >  
> >  
> > @@ -44,6 +44,7 @@ Note: some of the new features are only available
> > with certain drivers.
> >  
> >  
> >  
> > +GL_ARB_enhanced_layouts on i965
> >  GL_ARB_shader_group_vote on nvc0
> >  GL_ARB_ES3_1_compatibility on i965
> >  GL_EXT_window_rectangles on nv50, nvc0
> > 
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/3] gallium/os: add os_get_process_cmd_line

2016-07-30 Thread Jan Vesely
On Sat, 2016-07-30 at 23:40 +0200, Marek Olšák wrote:
> On Sat, Jul 30, 2016 at 8:33 PM, Grazvydas Ignotas  > wrote:
> > 
> > On Sat, Jul 30, 2016 at 6:22 PM, Marek Olšák 
> > wrote:
> > > 
> > > From: Marek Olšák 
> > > 
> > > for debugging
> > > ---
> > >  src/gallium/auxiliary/os/os_process.c | 37
> > > +++
> > >  src/gallium/auxiliary/os/os_process.h |  2 ++
> > >  2 files changed, 39 insertions(+)
> > > 
> > > diff --git a/src/gallium/auxiliary/os/os_process.c
> > > b/src/gallium/auxiliary/os/os_process.c
> > > index 332e195..3ee30b1 100644
> > > --- a/src/gallium/auxiliary/os/os_process.c
> > > +++ b/src/gallium/auxiliary/os/os_process.c
> > > @@ -30,6 +30,10 @@
> > >  #include "os/os_process.h"
> > >  #include "util/u_memory.h"
> > > 
> > > +#if defined(PIPE_OS_UNIX)
> > > +#include 
> > > +#endif
> > > +
> > >  #if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
> > >  #  include 
> > >  #elif defined(__GLIBC__) || defined(__CYGWIN__)
> > > @@ -108,3 +112,36 @@ os_get_process_name(char *procname, size_t
> > > size)
> > >    return FALSE;
> > > }
> > >  }
> > > +
> > > +bool
> > > +os_get_process_cmd_line(char *result, size_t size)
> > > +{
> > > +#if defined(PIPE_OS_UNIX)
> > > +   char ps[256];
> > > +   int len;
> > > +   FILE *p;
> > > +
> > > +   /* Execute the ps command. */
> > > +   snprintf(ps, sizeof(ps), "ps --pid %i -o args --no-headers",
> > > getpid());
> > > +
> > > +   p = popen(ps, "r");
> > 
> > What about just reading /proc/self/cmdline ? To exec ps, the
> > current
> > process will have to fork which will fail if there is not enough
> > free
> > RAM for the forked copy, which is not that unlikely with games as
> > they
> > tend to be resource heavy.
> 
> Are you sure it makes a copy of the current process? The affected
> code
> already uses popen to read dmesg. This series only adds a second
> popen
> call.

it not just forks the current process, it execs shell first, before
execing the requested program:
"The  popen()  function opens a process by creating a pipe, forking,
and invoking the shell."

Jan

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

signature.asc
Description: This is a digitally signed message part
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/3] gallium/os: add os_get_process_cmd_line

2016-07-30 Thread Marek Olšák
On Sat, Jul 30, 2016 at 8:33 PM, Grazvydas Ignotas  wrote:
> On Sat, Jul 30, 2016 at 6:22 PM, Marek Olšák  wrote:
>> From: Marek Olšák 
>>
>> for debugging
>> ---
>>  src/gallium/auxiliary/os/os_process.c | 37 
>> +++
>>  src/gallium/auxiliary/os/os_process.h |  2 ++
>>  2 files changed, 39 insertions(+)
>>
>> diff --git a/src/gallium/auxiliary/os/os_process.c 
>> b/src/gallium/auxiliary/os/os_process.c
>> index 332e195..3ee30b1 100644
>> --- a/src/gallium/auxiliary/os/os_process.c
>> +++ b/src/gallium/auxiliary/os/os_process.c
>> @@ -30,6 +30,10 @@
>>  #include "os/os_process.h"
>>  #include "util/u_memory.h"
>>
>> +#if defined(PIPE_OS_UNIX)
>> +#include 
>> +#endif
>> +
>>  #if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
>>  #  include 
>>  #elif defined(__GLIBC__) || defined(__CYGWIN__)
>> @@ -108,3 +112,36 @@ os_get_process_name(char *procname, size_t size)
>>return FALSE;
>> }
>>  }
>> +
>> +bool
>> +os_get_process_cmd_line(char *result, size_t size)
>> +{
>> +#if defined(PIPE_OS_UNIX)
>> +   char ps[256];
>> +   int len;
>> +   FILE *p;
>> +
>> +   /* Execute the ps command. */
>> +   snprintf(ps, sizeof(ps), "ps --pid %i -o args --no-headers", getpid());
>> +
>> +   p = popen(ps, "r");
>
> What about just reading /proc/self/cmdline ? To exec ps, the current
> process will have to fork which will fail if there is not enough free
> RAM for the forked copy, which is not that unlikely with games as they
> tend to be resource heavy.

Are you sure it makes a copy of the current process? The affected code
already uses popen to read dmesg. This series only adds a second popen
call.

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


Re: [Mesa-dev] [PATCH 3/3] glsl: be more strict on block qualifiers

2016-07-30 Thread Kenneth Graunke
On Saturday, July 30, 2016 4:38:06 PM PDT Timothy Arceri wrote:
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96528
> ---
>  src/compiler/glsl/ast_to_hir.cpp | 61 
> 
>  1 file changed, 50 insertions(+), 11 deletions(-)
> 
> diff --git a/src/compiler/glsl/ast_to_hir.cpp 
> b/src/compiler/glsl/ast_to_hir.cpp
> index 683c144..f2ed82a 100644
> --- a/src/compiler/glsl/ast_to_hir.cpp
> +++ b/src/compiler/glsl/ast_to_hir.cpp
> @@ -7054,13 +7054,58 @@ ast_interface_block::hir(exec_list *instructions,
> this->block_name);
> }
>  
> -   if (!this->layout.flags.q.buffer &&
> -   this->layout.flags.q.std430) {
> -  _mesa_glsl_error(, state,
> -   "std430 storage block layout qualifier is supported "
> -   "only for shader storage blocks");
> +   /* Validate layout qualifiers */

Maybe mention the table on page 62 of the GLSL 4.50 spec?

Oddly, it seems to indicate std430 should be supported for uniform
blocks as well...but the existing code here clearly disallowed them.

> +   ast_type_qualifier allowed_blk_qualifiers;
> +   allowed_blk_qualifiers.flags.i = 0;
> +   if (this->layout.flags.q.buffer || this->layout.flags.q.uniform) {
> +  allowed_blk_qualifiers.flags.q.shared = 1;
> +  allowed_blk_qualifiers.flags.q.packed = 1;
> +  allowed_blk_qualifiers.flags.q.std140 = 1;
> +  allowed_blk_qualifiers.flags.q.row_major = 1;
> +  allowed_blk_qualifiers.flags.q.column_major = 1;
> +  allowed_blk_qualifiers.flags.q.explicit_align = 1;
> +  allowed_blk_qualifiers.flags.q.explicit_binding = 1;
> +  if (this->layout.flags.q.buffer) {
> + allowed_blk_qualifiers.flags.q.buffer = 1;
> + allowed_blk_qualifiers.flags.q.std430 = 1;
> + allowed_blk_qualifiers.flags.q.coherent = 1;
> + allowed_blk_qualifiers.flags.q._volatile = 1;
> + allowed_blk_qualifiers.flags.q.restrict_flag = 1;
> + allowed_blk_qualifiers.flags.q.read_only = 1;
> + allowed_blk_qualifiers.flags.q.write_only = 1;
> +  } else {
> + allowed_blk_qualifiers.flags.q.uniform = 1;
> +  }
> +   } else {
> +  /* Interface block */
> +  assert(this->layout.flags.q.in || this->layout.flags.q.out);
> +
> +  allowed_blk_qualifiers.flags.q.explicit_location = 1;
> +  if (this->layout.flags.q.out) {
> + allowed_blk_qualifiers.flags.q.out = 1;
> + if (state->stage == MESA_SHADER_GEOMETRY ||
> +  state->stage == MESA_SHADER_TESS_CTRL ||
> +  state->stage == MESA_SHADER_TESS_EVAL ||
> +  state->stage == MESA_SHADER_VERTEX ) {
> +allowed_blk_qualifiers.flags.q.explicit_xfb_offset = 1;
> +allowed_blk_qualifiers.flags.q.explicit_xfb_buffer = 1;
> +allowed_blk_qualifiers.flags.q.xfb_buffer = 1;
> +allowed_blk_qualifiers.flags.q.explicit_xfb_stride = 1;
> +allowed_blk_qualifiers.flags.q.xfb_stride = 1;
> +if (state->stage == MESA_SHADER_GEOMETRY) {
> +   allowed_blk_qualifiers.flags.q.stream = 1;
> +   allowed_blk_qualifiers.flags.q.explicit_stream = 1;
> +}

 if (state->stage == MESA_SHADER_TESS_CTRL) {
allowed_blk_qualifiers.flags.q.patch = 1;
 }

> + }
> +  } else {
> + allowed_blk_qualifiers.flags.q.in = 1;

 if (state->stage == MESA_SHADER_TESS_EVAL) {
allowed_blk_qualifiers.flags.q.patch = 1;
 }

With those changes, the series is:
Reviewed-by: Kenneth Graunke 

> +  }
> }
>  
> +   this->layout.validate_flags(, state, allowed_blk_qualifiers,
> +   "invalid qualifier for block",
> +   this->block_name);
> +
> /* The ast_interface_block has a list of ast_declarator_lists.  We
>  * need to turn those into ir_variables with an association
>  * with this uniform block.
> @@ -7116,12 +7161,6 @@ ast_interface_block::hir(exec_list *instructions,
> "Interface block sets both readonly and writeonly");
> }
>  
> -   if (this->layout.flags.q.explicit_component) {
> -  _mesa_glsl_error(, state, "component layout qualifier cannot be "
> -   "applied to a matrix, a structure, a block, or an "
> -   "array containing any of these.");
> -   }
> -
> unsigned qual_stream;
> if (!process_qualifier_constant(state, , "stream", 
> this->layout.stream,
> _stream) ||
> 



signature.asc
Description: This is a digitally signed message part.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] docs: Add GL4.4 and ARB_enhanced_layouts to the release notes

2016-07-30 Thread Kenneth Graunke
On Saturday, July 30, 2016 10:25:09 AM PDT Timothy Arceri wrote:
> ---
>  Not sure is we need to be more careful about mentioning we support 4.4
>  thoughts?

Looks good to me.


signature.asc
Description: This is a digitally signed message part.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] gallium/util: fix error detection in s3tc init

2016-07-30 Thread Jan Ziak
Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com>
---
 src/gallium/auxiliary/util/u_format_s3tc.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_format_s3tc.c 
b/src/gallium/auxiliary/util/u_format_s3tc.c
index 8c4f215..7e51c4d 100644
--- a/src/gallium/auxiliary/util/u_format_s3tc.c
+++ b/src/gallium/auxiliary/util/u_format_s3tc.c
@@ -139,11 +139,11 @@ util_format_s3tc_init(void)
tx_compress_dxtn =
  util_dl_get_proc_address(library, "tx_compress_dxtn");
 
-   if (!util_format_dxt1_rgb_fetch ||
-   !util_format_dxt1_rgba_fetch ||
-   !util_format_dxt3_rgba_fetch ||
-   !util_format_dxt5_rgba_fetch ||
-   !util_format_dxtn_pack) {
+   if (!fetch_2d_texel_rgb_dxt1 ||
+   !fetch_2d_texel_rgba_dxt1 ||
+   !fetch_2d_texel_rgba_dxt3 ||
+   !fetch_2d_texel_rgba_dxt5 ||
+   !tx_compress_dxtn) {
   debug_printf("couldn't reference all symbols in " DXTN_LIBNAME
", software DXTn compression/decompression "
"unavailable\n");
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/3] gallium/os: add os_get_process_cmd_line

2016-07-30 Thread Grazvydas Ignotas
On Sat, Jul 30, 2016 at 6:22 PM, Marek Olšák  wrote:
> From: Marek Olšák 
>
> for debugging
> ---
>  src/gallium/auxiliary/os/os_process.c | 37 
> +++
>  src/gallium/auxiliary/os/os_process.h |  2 ++
>  2 files changed, 39 insertions(+)
>
> diff --git a/src/gallium/auxiliary/os/os_process.c 
> b/src/gallium/auxiliary/os/os_process.c
> index 332e195..3ee30b1 100644
> --- a/src/gallium/auxiliary/os/os_process.c
> +++ b/src/gallium/auxiliary/os/os_process.c
> @@ -30,6 +30,10 @@
>  #include "os/os_process.h"
>  #include "util/u_memory.h"
>
> +#if defined(PIPE_OS_UNIX)
> +#include 
> +#endif
> +
>  #if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
>  #  include 
>  #elif defined(__GLIBC__) || defined(__CYGWIN__)
> @@ -108,3 +112,36 @@ os_get_process_name(char *procname, size_t size)
>return FALSE;
> }
>  }
> +
> +bool
> +os_get_process_cmd_line(char *result, size_t size)
> +{
> +#if defined(PIPE_OS_UNIX)
> +   char ps[256];
> +   int len;
> +   FILE *p;
> +
> +   /* Execute the ps command. */
> +   snprintf(ps, sizeof(ps), "ps --pid %i -o args --no-headers", getpid());
> +
> +   p = popen(ps, "r");

What about just reading /proc/self/cmdline ? To exec ps, the current
process will have to fork which will fail if there is not enough free
RAM for the forked copy, which is not that unlikely with games as they
tend to be resource heavy.

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


Re: [Mesa-dev] [PATCH] u_vbuf: fix potentially bogus assert

2016-07-30 Thread Marek Olšák
Reviewed-by: Marek Olšák 

Marek

On Sat, Jul 30, 2016 at 5:40 PM, Rob Clark  wrote:
> There are cases where we hit u_vbuf path due to alignment or pitch-
> alignment restrictions, but for an output-format that u_vbuf does not
> support translating (yet the driver does support natively).  In which
> case we hit the memcpy() path and don't care that u_vbuf doesn't
> understand it.
>
> Fixes crash with debug build of mesa in:
> dEQP-GLES3.functional.vertex_arrays.single_attribute.strides.fixed.user_ptr_stride17_components2_quads1
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95000
> Signed-off-by: Rob Clark 
> ---
>  src/gallium/auxiliary/util/u_vbuf.c | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/auxiliary/util/u_vbuf.c 
> b/src/gallium/auxiliary/util/u_vbuf.c
> index 5b4e527..532e7c0 100644
> --- a/src/gallium/auxiliary/util/u_vbuf.c
> +++ b/src/gallium/auxiliary/util/u_vbuf.c
> @@ -627,6 +627,7 @@ u_vbuf_translate_begin(struct u_vbuf *mgr,
> for (i = 0; i < mgr->ve->count; i++) {
>struct translate_key *k;
>struct translate_element *te;
> +  enum pipe_format output_format = mgr->ve->native_format[i];
>unsigned bit, vb_index = mgr->ve->ve[i].vertex_buffer_index;
>bit = 1 << vb_index;
>
> @@ -644,7 +645,8 @@ u_vbuf_translate_begin(struct u_vbuf *mgr,
>   }
>}
>assert(type < VB_NUM);
> -  
> assert(translate_is_output_format_supported(mgr->ve->native_format[i]));
> +  if (mgr->ve->ve[i].src_format != output_format)
> + assert(translate_is_output_format_supported(output_format));
>/*printf("velem=%i type=%i\n", i, type);*/
>
>/* Add the vertex element. */
> @@ -657,7 +659,7 @@ u_vbuf_translate_begin(struct u_vbuf *mgr,
>te->input_buffer = vb_index;
>te->input_format = mgr->ve->ve[i].src_format;
>te->input_offset = mgr->ve->ve[i].src_offset;
> -  te->output_format = mgr->ve->native_format[i];
> +  te->output_format = output_format;
>te->output_offset = k->output_stride;
>
>k->output_stride += mgr->ve->native_format_size[i];
> --
> 2.7.4
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH mesa] gallium/util: fix resource leak

2016-07-30 Thread Marek Olšák
On Sat, Jul 30, 2016 at 6:16 PM, Roland Scheidegger  wrote:
> This looks very bogus to me.
> How is this supposed to work if you immediately close the library again?
> The functions are still going to get used.
> This just segfaults right, left and center.
>
> If you want to fix this for real, some util_format_s3tc_exit() is
> probably needed, albeit I'm not entirely sure it can be made to work
> reliably (not just drivers, but the dri state tracker calls this too.
>
> In any case, I'm going to revert it.

Thanks, I was too hasty.

It's actually not a resource leak, because this lib must be loaded for
the lifetime of the process and then the OS unloads it.

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


[Mesa-dev] [Bug 96408] [PERF] SSO: dirty all stages when only one is updated. Trigger extra validations.

2016-07-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=96408

gregory.hain...@gmail.com changed:

   What|Removed |Added

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

--- Comment #3 from gregory.hain...@gmail.com ---
I'm closing the bug

Marek's rewrite of Gallium state management resolved the issue :)

For the record, the last commit of the serie is:

author  Marek Olšák    2016-07-17 18:54:51 (GMT)
committer   Marek Olšák    2016-07-30 13:02:14
(GMT)
commit  12aec78993edface7f530eede9e018b5fa1897b7 (patch)
treeefbe72650dedbb30702a14c31ec4ff967de7a1b8
parent  b47839ad8361ef42a0f38c52fe24307b865c5489 (diff)

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


Re: [Mesa-dev] [PATCH mesa] gallium/util: fix resource leak

2016-07-30 Thread Roland Scheidegger
This looks very bogus to me.
How is this supposed to work if you immediately close the library again?
The functions are still going to get used.
This just segfaults right, left and center.

If you want to fix this for real, some util_format_s3tc_exit() is
probably needed, albeit I'm not entirely sure it can be made to work
reliably (not just drivers, but the dri state tracker calls this too.

In any case, I'm going to revert it.

Roland


Am 30.07.2016 um 17:28 schrieb Marek Olšák:
> Pushed, thanks.
> 
> Marek
> 
> On Sat, Jul 30, 2016 at 2:35 AM, Eric Engestrom  wrote:
>> CovID: 401540
>> Signed-off-by: Eric Engestrom 
>> ---
>>  src/gallium/auxiliary/util/u_format_s3tc.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/src/gallium/auxiliary/util/u_format_s3tc.c 
>> b/src/gallium/auxiliary/util/u_format_s3tc.c
>> index 8c4f215..1ed4336 100644
>> --- a/src/gallium/auxiliary/util/u_format_s3tc.c
>> +++ b/src/gallium/auxiliary/util/u_format_s3tc.c
>> @@ -157,6 +157,8 @@ util_format_s3tc_init(void)
>> util_format_dxt5_rgba_fetch = 
>> (util_format_dxtn_fetch_t)fetch_2d_texel_rgba_dxt5;
>> util_format_dxtn_pack = (util_format_dxtn_pack_t)tx_compress_dxtn;
>> util_format_s3tc_enabled = TRUE;
>> +
>> +   util_dl_close(library);
>>  }
>>
>>
>> --
>> 2.9.0
>>
>> ___
>> mesa-dev mailing list
>> mesa-dev@lists.freedesktop.org
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_mesa-2Ddev=CwIGaQ=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs=Vjtt0vs_iqoI31UfJxBl7yv9I2FeiaeAYgMTLKRBc_I=Cu9I_ewyH3ywgtJw3yZgTOf08y5vGdy69Z6sYSoinRg=LmaeyWjVZByKWxP-aY6hMpUEK6RLw53i4Bke5qBi3JI=
>>  
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_mesa-2Ddev=CwIGaQ=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs=Vjtt0vs_iqoI31UfJxBl7yv9I2FeiaeAYgMTLKRBc_I=Cu9I_ewyH3ywgtJw3yZgTOf08y5vGdy69Z6sYSoinRg=LmaeyWjVZByKWxP-aY6hMpUEK6RLw53i4Bke5qBi3JI=
>  
> 

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


[Mesa-dev] [PATCH] u_vbuf: fix potentially bogus assert

2016-07-30 Thread Rob Clark
There are cases where we hit u_vbuf path due to alignment or pitch-
alignment restrictions, but for an output-format that u_vbuf does not
support translating (yet the driver does support natively).  In which
case we hit the memcpy() path and don't care that u_vbuf doesn't
understand it.

Fixes crash with debug build of mesa in:
dEQP-GLES3.functional.vertex_arrays.single_attribute.strides.fixed.user_ptr_stride17_components2_quads1

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95000
Signed-off-by: Rob Clark 
---
 src/gallium/auxiliary/util/u_vbuf.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_vbuf.c 
b/src/gallium/auxiliary/util/u_vbuf.c
index 5b4e527..532e7c0 100644
--- a/src/gallium/auxiliary/util/u_vbuf.c
+++ b/src/gallium/auxiliary/util/u_vbuf.c
@@ -627,6 +627,7 @@ u_vbuf_translate_begin(struct u_vbuf *mgr,
for (i = 0; i < mgr->ve->count; i++) {
   struct translate_key *k;
   struct translate_element *te;
+  enum pipe_format output_format = mgr->ve->native_format[i];
   unsigned bit, vb_index = mgr->ve->ve[i].vertex_buffer_index;
   bit = 1 << vb_index;
 
@@ -644,7 +645,8 @@ u_vbuf_translate_begin(struct u_vbuf *mgr,
  }
   }
   assert(type < VB_NUM);
-  assert(translate_is_output_format_supported(mgr->ve->native_format[i]));
+  if (mgr->ve->ve[i].src_format != output_format)
+ assert(translate_is_output_format_supported(output_format));
   /*printf("velem=%i type=%i\n", i, type);*/
 
   /* Add the vertex element. */
@@ -657,7 +659,7 @@ u_vbuf_translate_begin(struct u_vbuf *mgr,
   te->input_buffer = vb_index;
   te->input_format = mgr->ve->ve[i].src_format;
   te->input_offset = mgr->ve->ve[i].src_offset;
-  te->output_format = mgr->ve->native_format[i];
+  te->output_format = output_format;
   te->output_offset = k->output_stride;
 
   k->output_stride += mgr->ve->native_format_size[i];
-- 
2.7.4

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


Re: [Mesa-dev] [PATCH mesa] gallium/util: fix resource leak

2016-07-30 Thread Marek Olšák
Pushed, thanks.

Marek

On Sat, Jul 30, 2016 at 2:35 AM, Eric Engestrom  wrote:
> CovID: 401540
> Signed-off-by: Eric Engestrom 
> ---
>  src/gallium/auxiliary/util/u_format_s3tc.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/gallium/auxiliary/util/u_format_s3tc.c 
> b/src/gallium/auxiliary/util/u_format_s3tc.c
> index 8c4f215..1ed4336 100644
> --- a/src/gallium/auxiliary/util/u_format_s3tc.c
> +++ b/src/gallium/auxiliary/util/u_format_s3tc.c
> @@ -157,6 +157,8 @@ util_format_s3tc_init(void)
> util_format_dxt5_rgba_fetch = 
> (util_format_dxtn_fetch_t)fetch_2d_texel_rgba_dxt5;
> util_format_dxtn_pack = (util_format_dxtn_pack_t)tx_compress_dxtn;
> util_format_s3tc_enabled = TRUE;
> +
> +   util_dl_close(library);
>  }
>
>
> --
> 2.9.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 2/3] ddebug: print the command line to all logs

2016-07-30 Thread Marek Olšák
From: Marek Olšák 

for piglit with the pipelined hang detection mode
---
 src/gallium/drivers/ddebug/dd_draw.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/ddebug/dd_draw.c 
b/src/gallium/drivers/ddebug/dd_draw.c
index d3c4e7f..716208a 100644
--- a/src/gallium/drivers/ddebug/dd_draw.c
+++ b/src/gallium/drivers/ddebug/dd_draw.c
@@ -43,10 +43,14 @@ static FILE *
 dd_get_file_stream(struct dd_screen *dscreen, unsigned apitrace_call_number)
 {
struct pipe_screen *screen = dscreen->screen;
+   char cmd_line[4096];
+
FILE *f = dd_get_debug_file(dscreen->verbose);
if (!f)
   return NULL;
 
+   if (os_get_process_cmd_line(cmd_line, sizeof(cmd_line)))
+  fprintf(f, "Command: %s\n", cmd_line);
fprintf(f, "Driver vendor: %s\n", screen->get_vendor(screen));
fprintf(f, "Device vendor: %s\n", screen->get_device_vendor(screen));
fprintf(f, "Device name: %s\n\n", screen->get_name(screen));
-- 
2.7.4

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


[Mesa-dev] [PATCH 3/3] radeonsi: print the command line to VM fault reports

2016-07-30 Thread Marek Olšák
From: Marek Olšák 

---
 src/gallium/drivers/radeonsi/si_debug.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_debug.c 
b/src/gallium/drivers/radeonsi/si_debug.c
index e030f48..00a3b13 100644
--- a/src/gallium/drivers/radeonsi/si_debug.c
+++ b/src/gallium/drivers/radeonsi/si_debug.c
@@ -805,6 +805,7 @@ void si_check_vm_faults(struct r600_common_context *ctx,
struct pipe_screen *screen = sctx->b.b.screen;
FILE *f;
uint32_t addr;
+   char cmd_line[4096];
 
if (!si_vm_fault_occured(sctx, ))
return;
@@ -814,6 +815,8 @@ void si_check_vm_faults(struct r600_common_context *ctx,
return;
 
fprintf(f, "VM fault report.\n\n");
+   if (os_get_process_cmd_line(cmd_line, sizeof(cmd_line)))
+   fprintf(f, "Command: %s\n", cmd_line);
fprintf(f, "Driver vendor: %s\n", screen->get_vendor(screen));
fprintf(f, "Device vendor: %s\n", screen->get_device_vendor(screen));
fprintf(f, "Device name: %s\n\n", screen->get_name(screen));
-- 
2.7.4

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


[Mesa-dev] [PATCH 1/3] gallium/os: add os_get_process_cmd_line

2016-07-30 Thread Marek Olšák
From: Marek Olšák 

for debugging
---
 src/gallium/auxiliary/os/os_process.c | 37 +++
 src/gallium/auxiliary/os/os_process.h |  2 ++
 2 files changed, 39 insertions(+)

diff --git a/src/gallium/auxiliary/os/os_process.c 
b/src/gallium/auxiliary/os/os_process.c
index 332e195..3ee30b1 100644
--- a/src/gallium/auxiliary/os/os_process.c
+++ b/src/gallium/auxiliary/os/os_process.c
@@ -30,6 +30,10 @@
 #include "os/os_process.h"
 #include "util/u_memory.h"
 
+#if defined(PIPE_OS_UNIX)
+#include 
+#endif
+
 #if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
 #  include 
 #elif defined(__GLIBC__) || defined(__CYGWIN__)
@@ -108,3 +112,36 @@ os_get_process_name(char *procname, size_t size)
   return FALSE;
}
 }
+
+bool
+os_get_process_cmd_line(char *result, size_t size)
+{
+#if defined(PIPE_OS_UNIX)
+   char ps[256];
+   int len;
+   FILE *p;
+
+   /* Execute the ps command. */
+   snprintf(ps, sizeof(ps), "ps --pid %i -o args --no-headers", getpid());
+
+   p = popen(ps, "r");
+   if (!p)
+  return false;
+
+   result = fgets(result, size, p);
+   pclose(p);
+
+   if (!result)
+  return false;
+
+   /* Remove the newline character. */
+   len = strlen(result);
+   if (result[len - 1] == '\n')
+  result[len - 1] = 0;
+
+   return true;
+
+#else
+   return false;
+#endif
+}
diff --git a/src/gallium/auxiliary/os/os_process.h 
b/src/gallium/auxiliary/os/os_process.h
index 0d50ddc..3965a8b 100644
--- a/src/gallium/auxiliary/os/os_process.h
+++ b/src/gallium/auxiliary/os/os_process.h
@@ -36,5 +36,7 @@
 extern boolean
 os_get_process_name(char *str, size_t size);
 
+extern bool
+os_get_process_cmd_line(char *result, size_t size);
 
 #endif /* OS_PROCESS_H */
-- 
2.7.4

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


[Mesa-dev] [Bug 93551] Divinity: Original Sin Enhanced Edition(Native) crash on start

2016-07-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=93551

--- Comment #41 from kilobug  ---
(In reply to Kai from comment #40)
> Shouldn't this bug be closed as "NOTOURBUG", since it's clearly a game bug?
> Or at least as "WONTFIX", since the hack is probably never going to land in
> Mesa anyway?

In my humble non expert opinion, the "hack" that allows an env variable to
spoof the vendor string could make it in. It's not something that should be
done generally, but it seems generic enough as both a debugging tool and a
workaround for a variety of quirky games/programs.

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


Re: [Mesa-dev] virglrenderer regression in commit ad4f0f1941677c

2016-07-30 Thread Rob Clark
On Fri, Jul 29, 2016 at 3:57 PM, Rob Herring  wrote:
> Hi,
>
> This commit in virglrenderer causes a regression in Android for me.
> The parameters that get passed in are last_level = 8, width = 1. I'm
> not really sure if this is valid (I'm guessing there should be some
> min width?), or where I should be looking to fix this. Any ideas?

what is the height?  last mip-map level is basically the number of
times you could half the width+height (round up to 1) until it is 1x1.
So something like 1x512 would have last_level=8.  (I might be off by
one right-shift..)

Try this:

- if (args->last_level > (floor(log2(MAX2(args->width, args->width))) + 1))
+ if (args->last_level > (floor(log2(MAX2(args->width, args->height))) + 1))

BR,
-R

> commit ad4f0f1941677c6cd78bcd14348cd99ae7dd7527
> Author: Marc-André Lureau 
> Date:   Tue Jan 19 14:37:50 2016 +0100
>
> renderer: reject large LOD values
>
> Or we could sit for a very long time in some further loops.
>
> Fix found thanks to american fuzzy lop.
>
> Signed-off-by: Marc-André Lureau 
>
> Thanks,
> Rob
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 93551] Divinity: Original Sin Enhanced Edition(Native) crash on start

2016-07-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=93551

--- Comment #40 from Kai  ---
Shouldn't this bug be closed as "NOTOURBUG", since it's clearly a game bug? Or
at least as "WONTFIX", since the hack is probably never going to land in Mesa
anyway?

On a different note: I can confirm, that the shim from attachment 125302 in
addition to allowing mid-shader extension directives let me launch and play the
game.

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


Re: [Mesa-dev] [PATCH v2 10/27] i965/blorp: Set up HiZ surfaces up-front

2016-07-30 Thread Jason Ekstrand
On Jul 30, 2016 2:01 AM, "Pohjolainen, Topi" 
wrote:
>
> On Fri, Jul 29, 2016 at 06:59:44AM -0700, Jason Ekstrand wrote:
> >On Jul 29, 2016 2:26 AM, "Pohjolainen, Topi"
> ><[1]topi.pohjolai...@intel.com> wrote:
> >>
> >> On Tue, Jul 26, 2016 at 03:11:14PM -0700, Jason Ekstrand wrote:
> >> > ---
> >> >  src/mesa/drivers/dri/i965/brw_blorp.c  | 59
> >+-
> >> >  src/mesa/drivers/dri/i965/brw_blorp.h  |  2 --
> >> >  src/mesa/drivers/dri/i965/gen6_blorp.c | 19 +++
> >> >  src/mesa/drivers/dri/i965/gen7_blorp.c | 10 +++---
> >> >  4 files changed, 59 insertions(+), 31 deletions(-)
> >> >
> >> > diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c
> >b/src/mesa/drivers/dri/i965/brw_blorp.c
> >> > index 97eddf9..47801f0 100644
> >> > --- a/src/mesa/drivers/dri/i965/brw_blorp.c
> >> > +++ b/src/mesa/drivers/dri/i965/brw_blorp.c
> >> > @@ -105,6 +105,28 @@ blorp_get_image_offset_sa(struct isl_device
> >*dev, const struct isl_surf *surf,
> >> > }
> >> >  }
> >> >
> >> > +static void
> >> > +apply_gen6_stencil_hiz_offset(struct isl_surf *surf,
> >> > +  struct intel_mipmap_tree *mt,
> >> > +  uint32_t lod,
> >> > +  uint32_t *offset)
> >> > +{
> >> > +   assert(mt->array_layout == ALL_SLICES_AT_EACH_LOD);
> >> > +
> >> > +   *offset = intel_miptree_get_aligned_offset(mt,
> >> > +
> >mt->level[lod].level_x,
> >> > +
> >mt->level[lod].level_y,
> >> > +  false);
> >> > +
> >> > +   surf->logical_level0_px.width =
> >minify(surf->logical_level0_px.width, lod);
> >> > +   surf->logical_level0_px.height =
> >minify(surf->logical_level0_px.height, lod);
> >> > +   surf->phys_level0_sa.width =
minify(surf->phys_level0_sa.width,
> >lod);
> >> > +   surf->phys_level0_sa.height =
> >minify(surf->phys_level0_sa.height, lod);
> >> > +   surf->levels = 1;
> >> > +   surf->array_pitch_el_rows =
> >> > +  ALIGN(surf->phys_level0_sa.height,
> >surf->image_alignment_el.height);
> >> > +}
> >> > +
> >> >  void
> >> >  brw_blorp_surface_info_init(struct brw_context *brw,
> >> >  struct brw_blorp_surface_info *info,
> >> > @@ -125,7 +147,6 @@ brw_blorp_surface_info_init(struct
brw_context
> >*brw,
> >> >
> >> > intel_miptree_check_level_layer(mt, level, layer);
> >> >
> >> > -   info->mt = mt;
> >> > if (is_render_target)
> >> >intel_miptree_used_for_rendering(mt);
> >> >
> >> > @@ -133,21 +154,43 @@ brw_blorp_surface_info_init(struct
> >brw_context *brw,
> >> > info->bo = mt->bo;
> >> > info->offset = mt->offset;
> >> >
> >> > -   if (mt->mcs_mt) {
> >> > -  intel_miptree_get_aux_isl_surf(brw, mt, >aux_surf,
> >> > - >aux_usage);
> >> > -  info->aux_bo = mt->mcs_mt->bo;
> >> > -  info->aux_offset = mt->mcs_mt->offset;
> >> > -
> >> > +   intel_miptree_get_aux_isl_surf(brw, mt, >aux_surf,
> >> > +  >aux_usage);
> >> > +   if (info->aux_usage != ISL_AUX_USAGE_NONE) {
> >> >/* We only really need a clear color if we also have an
> >auxiliary
> >> > * surface.  Without one, it does nothing.
> >> > */
> >> >info->clear_color = intel_miptree_get_isl_clear_color(brw,
> >mt);
> >> > +
> >> > +  if (mt->mcs_mt) {
> >> > + info->aux_bo = mt->mcs_mt->bo;
> >> > + info->aux_offset = mt->mcs_mt->offset;
> >> > +  } else {
> >> > + assert(info->aux_usage == ISL_AUX_USAGE_HIZ);
> >> > + struct intel_mipmap_tree *hiz_mt = mt->hiz_buf->mt;
> >> > + if (hiz_mt) {
> >> > +info->aux_bo = hiz_mt->bo;
> >> > +if (hiz_mt->array_layout == ALL_SLICES_AT_EACH_LOD)
{
> >>
> >> Otherwise the patch looks good, I'm only wondering aren't we taking
> >this
> >> path now also for gen7?
> >
> >The only platform that needs this hack is Sandy Bridge which supports
> >layered rendering but not multi-LOD HiZ.
>
> Yes, that is my understanding also. It just looks to me that gen7 will
take
> this path also. The conditions above don't check for gen. Or am I missing
> something else?

Gen7 will take it but only for single-LOD surfaces where it's pretty-much a
no-op.  That said, a gen check is probably in order since it really exists
for gen6 only.  I'll add one.

> >
> >> > +   /* gen6 requires the HiZ buffer to be manually
> >offset to the
> >> > +* right location.  We could fixup the surf but
it
> >doesn't
> >

[Mesa-dev] [Bug 97145] include/GL/*.h not installed when GLX is disabled (eg for OSMesa)

2016-07-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97145

Bug ID: 97145
   Summary: include/GL/*.h not installed when GLX is disabled (eg
for OSMesa)
   Product: Mesa
   Version: git
  Hardware: All
OS: All
Status: NEW
  Severity: minor
  Priority: medium
 Component: Other
  Assignee: mesa-dev@lists.freedesktop.org
  Reporter: frederic.dever...@m4x.org
QA Contact: mesa-dev@lists.freedesktop.org

When compiling/installing an OSMesa-only Mesa (no GLX or DRI), the following
patch:
https://cgit.freedesktop.org/mesa/mesa/commit/?id=42968424fb4100f2035badf236b005cc8d62a592

prevents include/GL/*.h headers, including osmesa.h, gl.h and gl_mangle.h, from
being installed.

I do not understand the rationale behind this patch. AFAIK, only glx.h and
glx_mangle.h should be conditionally installed.

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


[Mesa-dev] [Bug 93551] Divinity: Original Sin Enhanced Edition(Native) crash on start

2016-07-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=93551

--- Comment #39 from kilobug  ---
(In reply to Iaroslav Andrusyak from comment #38)
> > Did I miss something ?
> 
> allow_glsl_extension_directive_midshader=true ?

Thanks, that was it !

Here is how I can run the game :

 allow_glsl_extension_directive_midshader=true ALSOFT_DRIVERS=pulse
LD_PRELOAD="/usr/local/lib/divos-hack.so" ./start.sh

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


[Mesa-dev] [Bug 93551] Divinity: Original Sin Enhanced Edition(Native) crash on start

2016-07-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=93551

--- Comment #38 from Iaroslav Andrusyak  ---
> Did I miss something ?

allow_glsl_extension_directive_midshader=true ?

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


[Mesa-dev] [Bug 93551] Divinity: Original Sin Enhanced Edition(Native) crash on start

2016-07-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=93551

--- Comment #37 from kilobug  ---
(In reply to Thomas J. Moore from comment #32)
> Created attachment 125302 [details]
> Simple LD_PRELOAD shim to apply necessary patches for divos
> 
> Game works great for me with the above patches (thanks to those who figured
> this out!).  However, since they are not likely to be incorporated into
> Mesa, and patching my system Mesa just for one poorly written game is a bad
> idea, I think one of two alternate solutions needs to be provided.  My
> preference would be to patch the game binaries.  I don't really want to mess
> with that right now, though (especially since I can't easily locate where it
> does the vendor check).  The other would be to provide the patches in the
> form of an LD_PRELOAD shim.  I have attached the source code for one that
> seems to work for me.

Thanks for the LD_PRELOAD shim. I just tried it on my R9 R380X using padoka's
ppa (so git Mesa 12.1~git1600727202100.29d70cc~x~padoka0 + svn LLVM
1:4.0~svn276446-0~x~padoka0), and there is a significant improvement, the game
starts and displays the loading screen... but when the loading bar is full,
then it crashes with :


(0) /lib/x86_64-linux-gnu/libpthread.so.0 : +0x10ed0 [0x7f209566ded0]
(1) ./libOGLBinding.so : api::OpenGLRenderer::ApplyConstants()+0x65
[0x7f209a129845]
(2) ./libRenderFramework.so : rf::Renderer::Apply(bool)+0x57 [0x7f209a0e0437]
(3) ./libRenderFramework.so : rf::RCB_ApplyCommand::Execute(rf::Renderer*, void
const*)+0xd [0x7f209a0fbf4d]
(4) ./libRenderFramework.so :
rf::RendererCommandBuffer::ExecuteCommandBuffer(bool)+0x37 [0x7f209a0e8c77]
(5) ./libGameEngine.so : ls::PostProcessStage::Execute(rf::RenderView
const*)+0x44 [0x7f20963b1de4]
(6) ./libRenderFramework.so : rf::StageGroup::Execute(rf::RenderView const*)
const+0x31 [0x7f209a0f24d1]
(7) ./EoCApp : ecl::EoCRenderView::Execute()+0x114 [0x95b664]
(8) ./libRenderFramework.so : rf::RenderFrame::Execute()+0x60 [0x7f209a0e7570]
(9) ./libGameEngine.so : BaseApp::ExecuteFrame(rf::Renderer*)+0x1c
[0x7f20963a5d9c]
(10) ./libGameEngine.so : BaseApp::MakeFrame()+0x33b [0x7f20963a646b]
(11) ./libGameEngine.so : BaseApp::OnIdle()+0xe0 [0x7f20963a4cb0]
(12) ./EoCApp : main+0x170 [0x6d5180]
(13) /lib/x86_64-linux-gnu/libc.so.6 : __libc_start_main+0xf0 [0x7f20952d5730]
(14) ./EoCApp : _start+0x29 [0x6d4ef9]

I tried with and without MESA_GL_VERSION_OVERRIDE=4.2
MESA_GLSL_VERSION_OVERRIDE=420 and it doesn't change anything.

Did I miss something ?

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


Re: [Mesa-dev] [PATCH] gallium/util: fix align64

2016-07-30 Thread Edward O'Callaghan
Reviewed-by: Edward O'Callaghan 

On 07/30/2016 07:22 AM, Marek Olšák wrote:
> From: Marek Olšák 
> 
> it cut off the upper 32 bits
> 
> Cc: mesa-sta...@lists.freedesktop.org
> ---
>  src/gallium/auxiliary/util/u_math.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/auxiliary/util/u_math.h 
> b/src/gallium/auxiliary/util/u_math.h
> index c94967e..1661e63 100644
> --- a/src/gallium/auxiliary/util/u_math.h
> +++ b/src/gallium/auxiliary/util/u_math.h
> @@ -682,7 +682,7 @@ align(int value, int alignment)
>  static inline uint64_t
>  align64(uint64_t value, unsigned alignment)
>  {
> -   return (value + alignment - 1) & ~(alignment - 1);
> +   return (value + alignment - 1) & ~((uint64_t)alignment - 1);
>  }
>  
>  /**
> 



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


Re: [Mesa-dev] [PATCH] docs: Add GL4.4 and ARB_enhanced_layouts to the release notes

2016-07-30 Thread Edward O'Callaghan


On 07/30/2016 10:25 AM, Timothy Arceri wrote:
> ---
>  Not sure is we need to be more careful about mentioning we support 4.4
>  thoughts?
s/is/if/

Well in fact, any reason why we can't actually claim 4.5 support now?
The raw base requirements seem to be fulfilled at least.

Reviewed-by: Edward O'Callaghan 

> 
>  docs/relnotes/12.1.0.html | 7 ---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/docs/relnotes/12.1.0.html b/docs/relnotes/12.1.0.html
> index e7c3a52..3935bb0 100644
> --- a/docs/relnotes/12.1.0.html
> +++ b/docs/relnotes/12.1.0.html
> @@ -22,11 +22,11 @@ People who are concerned with stability and reliability 
> should stick
>  with a previous release or wait for Mesa 12.1.1.
>  
>  
> -Mesa 12.1.0 implements the OpenGL 4.3 API, but the version reported by
> +Mesa 12.1.0 implements the OpenGL 4.4 API, but the version reported by
>  glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
>  glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
> -Some drivers don't support all the features required in OpenGL 4.3.  OpenGL
> -4.3 is only available if requested at context creation
> +Some drivers don't support all the features required in OpenGL 4.4.  OpenGL
> +4.4 is only available if requested at context creation
>  because compatibility contexts are not supported.
>  
>  
> @@ -44,6 +44,7 @@ Note: some of the new features are only available with 
> certain drivers.
>  
>  
>  
> +GL_ARB_enhanced_layouts on i965
>  GL_ARB_shader_group_vote on nvc0
>  GL_ARB_ES3_1_compatibility on i965
>  GL_EXT_window_rectangles on nv50, nvc0
> 



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


Re: [Mesa-dev] [PATCH mesa] gallium/util: fix resource leak

2016-07-30 Thread Edward O'Callaghan
Reviewed-by: Edward O'Callaghan 

On 07/30/2016 10:35 AM, Eric Engestrom wrote:
> CovID: 401540
> Signed-off-by: Eric Engestrom 
> ---
>  src/gallium/auxiliary/util/u_format_s3tc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/gallium/auxiliary/util/u_format_s3tc.c 
> b/src/gallium/auxiliary/util/u_format_s3tc.c
> index 8c4f215..1ed4336 100644
> --- a/src/gallium/auxiliary/util/u_format_s3tc.c
> +++ b/src/gallium/auxiliary/util/u_format_s3tc.c
> @@ -157,6 +157,8 @@ util_format_s3tc_init(void)
> util_format_dxt5_rgba_fetch = 
> (util_format_dxtn_fetch_t)fetch_2d_texel_rgba_dxt5;
> util_format_dxtn_pack = (util_format_dxtn_pack_t)tx_compress_dxtn;
> util_format_s3tc_enabled = TRUE;
> +
> +   util_dl_close(library);
>  }
>  
>  
> 



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


[Mesa-dev] [PATCH 3/3] freedreno/a4xx: fix comparison out of range warnings

2016-07-30 Thread Francesco Ansanelli
Signed-off-by: Francesco Ansanelli 
---
 src/gallium/drivers/freedreno/a4xx/fd4_screen.c |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_screen.c 
b/src/gallium/drivers/freedreno/a4xx/fd4_screen.c
index 57fecf1..aa60658 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_screen.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_screen.c
@@ -52,14 +52,14 @@ fd4_screen_is_format_supported(struct pipe_screen *pscreen,
}
 
if ((usage & PIPE_BIND_VERTEX_BUFFER) &&
-   (fd4_pipe2vtx(format) != ~0u)) {
+   (fd4_pipe2vtx(format) != (enum a4xx_vtx_fmt)~0)) {
retval |= PIPE_BIND_VERTEX_BUFFER;
}
 
if ((usage & PIPE_BIND_SAMPLER_VIEW) &&
(target == PIPE_BUFFER ||
 util_format_get_blocksize(format) != 12) &&
-   (fd4_pipe2tex(format) != ~0u)) {
+   (fd4_pipe2tex(format) != (enum a4xx_tex_fmt)~0)) {
retval |= PIPE_BIND_SAMPLER_VIEW;
}
 
@@ -67,8 +67,8 @@ fd4_screen_is_format_supported(struct pipe_screen *pscreen,
PIPE_BIND_DISPLAY_TARGET |
PIPE_BIND_SCANOUT |
PIPE_BIND_SHARED)) &&
-   (fd4_pipe2color(format) != ~0u) &&
-   (fd4_pipe2tex(format) != ~0u)) {
+   (fd4_pipe2color(format) != (enum a4xx_color_fmt)~0) &&
+   (fd4_pipe2tex(format) != (enum a4xx_tex_fmt)~0)) {
retval |= usage & (PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DISPLAY_TARGET |
PIPE_BIND_SCANOUT |
@@ -76,13 +76,13 @@ fd4_screen_is_format_supported(struct pipe_screen *pscreen,
}
 
if ((usage & PIPE_BIND_DEPTH_STENCIL) &&
-   (fd4_pipe2depth(format) != ~0u) &&
-   (fd4_pipe2tex(format) != ~0u)) {
+   (fd4_pipe2depth(format) != (enum a4xx_depth_format)~0) 
&&
+   (fd4_pipe2tex(format) != (enum a4xx_tex_fmt)~0)) {
retval |= PIPE_BIND_DEPTH_STENCIL;
}
 
if ((usage & PIPE_BIND_INDEX_BUFFER) &&
-   (fd_pipe2index(format) != ~0u)) {
+   (fd_pipe2index(format) != (enum pc_di_index_size)~0)) {
retval |= PIPE_BIND_INDEX_BUFFER;
}
 
-- 
1.7.9.5

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


[Mesa-dev] [PATCH 2/3] freedreno/a3xx: fix comparison out of range warnings

2016-07-30 Thread Francesco Ansanelli
Signed-off-by: Francesco Ansanelli 
---
 src/gallium/drivers/freedreno/a3xx/fd3_screen.c |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_screen.c 
b/src/gallium/drivers/freedreno/a3xx/fd3_screen.c
index 013b0ca..52a284e 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_screen.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_screen.c
@@ -52,12 +52,12 @@ fd3_screen_is_format_supported(struct pipe_screen *pscreen,
}
 
if ((usage & PIPE_BIND_VERTEX_BUFFER) &&
-   (fd3_pipe2vtx(format) != ~0u)) {
+   (fd3_pipe2vtx(format) != (enum a3xx_vtx_fmt)~0)) {
retval |= PIPE_BIND_VERTEX_BUFFER;
}
 
if ((usage & PIPE_BIND_SAMPLER_VIEW) &&
-   (fd3_pipe2tex(format) != ~0u)) {
+   (fd3_pipe2tex(format) != (enum a3xx_tex_fmt)~0)) {
retval |= PIPE_BIND_SAMPLER_VIEW;
}
 
@@ -66,8 +66,8 @@ fd3_screen_is_format_supported(struct pipe_screen *pscreen,
PIPE_BIND_SCANOUT |
PIPE_BIND_SHARED |
PIPE_BIND_BLENDABLE)) &&
-   (fd3_pipe2color(format) != ~0u) &&
-   (fd3_pipe2tex(format) != ~0u)) {
+   (fd3_pipe2color(format) != (enum a3xx_color_fmt)~0) &&
+   (fd3_pipe2tex(format) != (enum a3xx_tex_fmt)~0)) {
retval |= usage & (PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DISPLAY_TARGET |
PIPE_BIND_SCANOUT |
@@ -77,13 +77,13 @@ fd3_screen_is_format_supported(struct pipe_screen *pscreen,
}
 
if ((usage & PIPE_BIND_DEPTH_STENCIL) &&
-   (fd_pipe2depth(format) != ~0u) &&
-   (fd3_pipe2tex(format) != ~0u)) {
+   (fd_pipe2depth(format) != (enum 
adreno_rb_depth_format)~0) &&
+   (fd3_pipe2tex(format) != (enum a3xx_tex_fmt)~0)) {
retval |= PIPE_BIND_DEPTH_STENCIL;
}
 
if ((usage & PIPE_BIND_INDEX_BUFFER) &&
-   (fd_pipe2index(format) != ~0u)) {
+   (fd_pipe2index(format) != (enum pc_di_index_size)~0)) {
retval |= PIPE_BIND_INDEX_BUFFER;
}
 
-- 
1.7.9.5

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


[Mesa-dev] [PATCH 1/3] freedreno/a2xx: fix comparison out of range warnings

2016-07-30 Thread Francesco Ansanelli
Signed-off-by: Francesco Ansanelli 
---
 src/gallium/drivers/freedreno/a2xx/fd2_screen.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_screen.c 
b/src/gallium/drivers/freedreno/a2xx/fd2_screen.c
index fe4849b..007b9e6 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_screen.c
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_screen.c
@@ -61,7 +61,7 @@ fd2_screen_is_format_supported(struct pipe_screen *pscreen,
 
if ((usage & (PIPE_BIND_SAMPLER_VIEW |
PIPE_BIND_VERTEX_BUFFER)) &&
-   (fd2_pipe2surface(format) != ~0u)) {
+   (fd2_pipe2surface(format) != (enum 
a2xx_sq_surfaceformat)~0)) {
retval |= usage & (PIPE_BIND_SAMPLER_VIEW |
PIPE_BIND_VERTEX_BUFFER);
}
@@ -70,7 +70,7 @@ fd2_screen_is_format_supported(struct pipe_screen *pscreen,
PIPE_BIND_DISPLAY_TARGET |
PIPE_BIND_SCANOUT |
PIPE_BIND_SHARED)) &&
-   (fd2_pipe2color(format) != ~0u)) {
+   (fd2_pipe2color(format) != (enum a2xx_colorformatx)~0)) 
{
retval |= usage & (PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DISPLAY_TARGET |
PIPE_BIND_SCANOUT |
@@ -78,12 +78,12 @@ fd2_screen_is_format_supported(struct pipe_screen *pscreen,
}
 
if ((usage & PIPE_BIND_DEPTH_STENCIL) &&
-   (fd_pipe2depth(format) != ~0u)) {
+   (fd_pipe2depth(format) != (enum 
adreno_rb_depth_format)~0)) {
retval |= PIPE_BIND_DEPTH_STENCIL;
}
 
if ((usage & PIPE_BIND_INDEX_BUFFER) &&
-   (fd_pipe2index(format) != ~0u)) {
+   (fd_pipe2index(format) != (enum pc_di_index_size)~0)) {
retval |= PIPE_BIND_INDEX_BUFFER;
}
 
-- 
1.7.9.5

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


Re: [Mesa-dev] [PATCH v2 08/27] i965/blorp: Stop using the miptree in state setup for tex/rt surfaces

2016-07-30 Thread Pohjolainen, Topi
On Fri, Jul 29, 2016 at 09:34:11AM -0700, Jason Ekstrand wrote:
>On Jul 29, 2016 9:09 AM, "Jason Ekstrand" <[1]ja...@jlekstrand.net>
>wrote:
>>
>> On Jul 29, 2016 1:47 AM, "Pohjolainen, Topi"
><[2]topi.pohjolai...@intel.com> wrote:
>> >
>> > On Thu, Jul 28, 2016 at 11:41:01AM -0700, Jason Ekstrand wrote:
>> > >On Jul 28, 2016 12:05 PM, "Pohjolainen, Topi"
>> > ><[1][3]topi.pohjolai...@intel.com> wrote:
>> > >>
>> > >> On Tue, Jul 26, 2016 at 03:11:12PM -0700, Jason Ekstrand
>wrote:
>> > >> > Instead, we add a bo and offset field to
>brw_blorp_surface_info and
>> > >use
>> > >> > those in the backend.
>> > >> > ---
>> > >> >  src/mesa/drivers/dri/i965/brw_blorp.c| 10
>+---
>> > >> >  src/mesa/drivers/dri/i965/brw_blorp.h|  3 ++-
>> > >> >  src/mesa/drivers/dri/i965/brw_blorp_blit.cpp |  4 +++-
>> > >> >  src/mesa/drivers/dri/i965/gen6_blorp.c   | 33
>> > >+++---
>> > >> >  src/mesa/drivers/dri/i965/gen7_blorp.c   | 35
>> > >
>> > >> >  src/mesa/drivers/dri/i965/gen8_blorp.c   | 10
>
>> > >> >  6 files changed, 45 insertions(+), 50 deletions(-)
>> > >> >
>> > >> > diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c
>> > >b/src/mesa/drivers/dri/i965/brw_blorp.c
>> > >> > index 87d8929..cf1615f 100644
>> > >> > --- a/src/mesa/drivers/dri/i965/brw_blorp.c
>> > >> > +++ b/src/mesa/drivers/dri/i965/brw_blorp.c
>> > >> > @@ -126,8 +126,12 @@ brw_blorp_surface_info_init(struct
>brw_context
>> > >*brw,
>> > >> > intel_miptree_check_level_layer(mt, level, layer);
>> > >> >
>> > >> > info->mt = mt;
>> > >> > +   if (is_render_target)
>> > >> > +  intel_miptree_used_for_rendering(mt);
>> > >> >
>> > >> > intel_miptree_get_isl_surf(brw, mt, >surf);
>> > >> > +   info->bo = mt->bo;
>> > >> > +   info->offset = mt->offset;
>> > >> >
>> > >> > if (mt->mcs_mt) {
>> > >> >intel_miptree_get_aux_isl_surf(brw, mt,
>>aux_surf,
>> > >> > @@ -360,7 +364,7 @@ brw_blorp_emit_surface_state(struct
>brw_context
>> > >*brw,
>> > >> > const uint32_t mocs = is_render_target ?
>ss_info.rb_mocs :
>> > >ss_info.tex_mocs;
>> > >> >
>> > >> > isl_surf_fill_state(>isl_dev, dw, .surf = ,
>.view =
>> > >>view,
>> > >> > -   .address =
>surface->mt->bo->offset64 +
>> > >surface->bo_offset,
>> > >> > +   .address = surface->bo->offset64 +
>> > >surface->offset,
>> > >> > .aux_surf = aux_surf, .aux_usage =
>> > >surface->aux_usage,
>> > >> > .aux_address = aux_offset,
>> > >> > .mocs = mocs, .clear_color =
>clear_color,
>> > >> > @@ -370,8 +374,8 @@ brw_blorp_emit_surface_state(struct
>brw_context
>> > >*brw,
>> > >> > /* Emit relocation to surface contents */
>> > >> > drm_intel_bo_emit_reloc(brw->[2][4]batch.bo,
>> > >> > surf_offset + ss_info.reloc_dw
>* 4,
>> > >> > -   surface->mt->bo,
>> > >> > -   dw[ss_info.reloc_dw] -
>> > >surface->mt->bo->offset64,
>> > >> > +   surface->bo,
>> > >> > +   dw[ss_info.reloc_dw] -
>> > >surface->bo->offset64,
>> > >> > read_domains, write_domain);
>> > >> >
>> > >> > if (aux_surf) {
>> > >> > diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h
>> > >b/src/mesa/drivers/dri/i965/brw_blorp.h
>> > >> > index 076d26d..98a9436 100644
>> > >> > --- a/src/mesa/drivers/dri/i965/brw_blorp.h
>> > >> > +++ b/src/mesa/drivers/dri/i965/brw_blorp.h
>> > >> > @@ -72,6 +72,8 @@ struct brw_blorp_surface_info
>> > >> > struct intel_mipmap_tree *mt;
>> > >> >
>> > >> > struct isl_surf surf;
>> > >> > +   drm_intel_bo *bo;
>> > >> > +   uint32_t offset;
>> > >> >
>> > >> > struct isl_surf aux_surf;
>> > >> > enum isl_aux_usage aux_usage;
>> > >> > @@ -81,7 +83,6 @@ struct brw_blorp_surface_info
>> > >> > /* Z offset into a 3-D texture or slice of a 2-D array
>texture.
>> > >*/
>> > >> > uint32_t z_offset;
>> > >> >
>> > >> > -   uint32_t bo_offset;
>> > >>
>> > >> So effectively you are renaming bo_offset to offset, right?
>To me the
>   

Re: [Mesa-dev] [PATCH v2 10/27] i965/blorp: Set up HiZ surfaces up-front

2016-07-30 Thread Pohjolainen, Topi
On Fri, Jul 29, 2016 at 06:59:44AM -0700, Jason Ekstrand wrote:
>On Jul 29, 2016 2:26 AM, "Pohjolainen, Topi"
><[1]topi.pohjolai...@intel.com> wrote:
>>
>> On Tue, Jul 26, 2016 at 03:11:14PM -0700, Jason Ekstrand wrote:
>> > ---
>> >  src/mesa/drivers/dri/i965/brw_blorp.c  | 59
>+-
>> >  src/mesa/drivers/dri/i965/brw_blorp.h  |  2 --
>> >  src/mesa/drivers/dri/i965/gen6_blorp.c | 19 +++
>> >  src/mesa/drivers/dri/i965/gen7_blorp.c | 10 +++---
>> >  4 files changed, 59 insertions(+), 31 deletions(-)
>> >
>> > diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c
>b/src/mesa/drivers/dri/i965/brw_blorp.c
>> > index 97eddf9..47801f0 100644
>> > --- a/src/mesa/drivers/dri/i965/brw_blorp.c
>> > +++ b/src/mesa/drivers/dri/i965/brw_blorp.c
>> > @@ -105,6 +105,28 @@ blorp_get_image_offset_sa(struct isl_device
>*dev, const struct isl_surf *surf,
>> > }
>> >  }
>> >
>> > +static void
>> > +apply_gen6_stencil_hiz_offset(struct isl_surf *surf,
>> > +  struct intel_mipmap_tree *mt,
>> > +  uint32_t lod,
>> > +  uint32_t *offset)
>> > +{
>> > +   assert(mt->array_layout == ALL_SLICES_AT_EACH_LOD);
>> > +
>> > +   *offset = intel_miptree_get_aligned_offset(mt,
>> > +
>mt->level[lod].level_x,
>> > +
>mt->level[lod].level_y,
>> > +  false);
>> > +
>> > +   surf->logical_level0_px.width =
>minify(surf->logical_level0_px.width, lod);
>> > +   surf->logical_level0_px.height =
>minify(surf->logical_level0_px.height, lod);
>> > +   surf->phys_level0_sa.width = minify(surf->phys_level0_sa.width,
>lod);
>> > +   surf->phys_level0_sa.height =
>minify(surf->phys_level0_sa.height, lod);
>> > +   surf->levels = 1;
>> > +   surf->array_pitch_el_rows =
>> > +  ALIGN(surf->phys_level0_sa.height,
>surf->image_alignment_el.height);
>> > +}
>> > +
>> >  void
>> >  brw_blorp_surface_info_init(struct brw_context *brw,
>> >  struct brw_blorp_surface_info *info,
>> > @@ -125,7 +147,6 @@ brw_blorp_surface_info_init(struct brw_context
>*brw,
>> >
>> > intel_miptree_check_level_layer(mt, level, layer);
>> >
>> > -   info->mt = mt;
>> > if (is_render_target)
>> >intel_miptree_used_for_rendering(mt);
>> >
>> > @@ -133,21 +154,43 @@ brw_blorp_surface_info_init(struct
>brw_context *brw,
>> > info->bo = mt->bo;
>> > info->offset = mt->offset;
>> >
>> > -   if (mt->mcs_mt) {
>> > -  intel_miptree_get_aux_isl_surf(brw, mt, >aux_surf,
>> > - >aux_usage);
>> > -  info->aux_bo = mt->mcs_mt->bo;
>> > -  info->aux_offset = mt->mcs_mt->offset;
>> > -
>> > +   intel_miptree_get_aux_isl_surf(brw, mt, >aux_surf,
>> > +  >aux_usage);
>> > +   if (info->aux_usage != ISL_AUX_USAGE_NONE) {
>> >/* We only really need a clear color if we also have an
>auxiliary
>> > * surface.  Without one, it does nothing.
>> > */
>> >info->clear_color = intel_miptree_get_isl_clear_color(brw,
>mt);
>> > +
>> > +  if (mt->mcs_mt) {
>> > + info->aux_bo = mt->mcs_mt->bo;
>> > + info->aux_offset = mt->mcs_mt->offset;
>> > +  } else {
>> > + assert(info->aux_usage == ISL_AUX_USAGE_HIZ);
>> > + struct intel_mipmap_tree *hiz_mt = mt->hiz_buf->mt;
>> > + if (hiz_mt) {
>> > +info->aux_bo = hiz_mt->bo;
>> > +if (hiz_mt->array_layout == ALL_SLICES_AT_EACH_LOD) {
>>
>> Otherwise the patch looks good, I'm only wondering aren't we taking
>this
>> path now also for gen7?
> 
>The only platform that needs this hack is Sandy Bridge which supports
>layered rendering but not multi-LOD HiZ.

Yes, that is my understanding also. It just looks to me that gen7 will take
this path also. The conditions above don't check for gen. Or am I missing
something else?

> 
>> > +   /* gen6 requires the HiZ buffer to be manually
>offset to the
>> > +* right location.  We could fixup the surf but it
>doesn't
>> > +* matter since most of those fields don't matter.
>> > +*/
>> > +   apply_gen6_stencil_hiz_offset(>aux_surf,
>hiz_mt, level,
>> > + >aux_offset);
>> > +} else {
>> > +   info->aux_offset = 0;
>> > +}
>> > +assert(hiz_mt->pitch == info->aux_surf.row_pitch);
>> > + } else {
>> > +

[Mesa-dev] [PATCH 3/3] glsl: be more strict on block qualifiers

2016-07-30 Thread Timothy Arceri
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96528
---
 src/compiler/glsl/ast_to_hir.cpp | 61 
 1 file changed, 50 insertions(+), 11 deletions(-)

diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 683c144..f2ed82a 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -7054,13 +7054,58 @@ ast_interface_block::hir(exec_list *instructions,
this->block_name);
}
 
-   if (!this->layout.flags.q.buffer &&
-   this->layout.flags.q.std430) {
-  _mesa_glsl_error(, state,
-   "std430 storage block layout qualifier is supported "
-   "only for shader storage blocks");
+   /* Validate layout qualifiers */
+   ast_type_qualifier allowed_blk_qualifiers;
+   allowed_blk_qualifiers.flags.i = 0;
+   if (this->layout.flags.q.buffer || this->layout.flags.q.uniform) {
+  allowed_blk_qualifiers.flags.q.shared = 1;
+  allowed_blk_qualifiers.flags.q.packed = 1;
+  allowed_blk_qualifiers.flags.q.std140 = 1;
+  allowed_blk_qualifiers.flags.q.row_major = 1;
+  allowed_blk_qualifiers.flags.q.column_major = 1;
+  allowed_blk_qualifiers.flags.q.explicit_align = 1;
+  allowed_blk_qualifiers.flags.q.explicit_binding = 1;
+  if (this->layout.flags.q.buffer) {
+ allowed_blk_qualifiers.flags.q.buffer = 1;
+ allowed_blk_qualifiers.flags.q.std430 = 1;
+ allowed_blk_qualifiers.flags.q.coherent = 1;
+ allowed_blk_qualifiers.flags.q._volatile = 1;
+ allowed_blk_qualifiers.flags.q.restrict_flag = 1;
+ allowed_blk_qualifiers.flags.q.read_only = 1;
+ allowed_blk_qualifiers.flags.q.write_only = 1;
+  } else {
+ allowed_blk_qualifiers.flags.q.uniform = 1;
+  }
+   } else {
+  /* Interface block */
+  assert(this->layout.flags.q.in || this->layout.flags.q.out);
+
+  allowed_blk_qualifiers.flags.q.explicit_location = 1;
+  if (this->layout.flags.q.out) {
+ allowed_blk_qualifiers.flags.q.out = 1;
+ if (state->stage == MESA_SHADER_GEOMETRY ||
+  state->stage == MESA_SHADER_TESS_CTRL ||
+  state->stage == MESA_SHADER_TESS_EVAL ||
+  state->stage == MESA_SHADER_VERTEX ) {
+allowed_blk_qualifiers.flags.q.explicit_xfb_offset = 1;
+allowed_blk_qualifiers.flags.q.explicit_xfb_buffer = 1;
+allowed_blk_qualifiers.flags.q.xfb_buffer = 1;
+allowed_blk_qualifiers.flags.q.explicit_xfb_stride = 1;
+allowed_blk_qualifiers.flags.q.xfb_stride = 1;
+if (state->stage == MESA_SHADER_GEOMETRY) {
+   allowed_blk_qualifiers.flags.q.stream = 1;
+   allowed_blk_qualifiers.flags.q.explicit_stream = 1;
+}
+ }
+  } else {
+ allowed_blk_qualifiers.flags.q.in = 1;
+  }
}
 
+   this->layout.validate_flags(, state, allowed_blk_qualifiers,
+   "invalid qualifier for block",
+   this->block_name);
+
/* The ast_interface_block has a list of ast_declarator_lists.  We
 * need to turn those into ir_variables with an association
 * with this uniform block.
@@ -7116,12 +7161,6 @@ ast_interface_block::hir(exec_list *instructions,
"Interface block sets both readonly and writeonly");
}
 
-   if (this->layout.flags.q.explicit_component) {
-  _mesa_glsl_error(, state, "component layout qualifier cannot be "
-   "applied to a matrix, a structure, a block, or an "
-   "array containing any of these.");
-   }
-
unsigned qual_stream;
if (!process_qualifier_constant(state, , "stream", this->layout.stream,
_stream) ||
-- 
2.7.4

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


[Mesa-dev] [PATCH 2/3] glsl: add name param to validate_flags()

2016-07-30 Thread Timothy Arceri
---
 src/compiler/glsl/ast.h  | 4 ++--
 src/compiler/glsl/ast_to_hir.cpp | 7 +++
 src/compiler/glsl/ast_type.cpp   | 8 
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/compiler/glsl/ast.h b/src/compiler/glsl/ast.h
index aa8c422..157895d 100644
--- a/src/compiler/glsl/ast.h
+++ b/src/compiler/glsl/ast.h
@@ -755,8 +755,8 @@ struct ast_type_qualifier {
 
bool validate_flags(YYLTYPE *loc,
_mesa_glsl_parse_state *state,
-   const char *message,
-   const ast_type_qualifier _flags);
+   const ast_type_qualifier _flags,
+   const char *message, const char *name);
 
ast_subroutine_list *subroutine_list;
 };
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 0b54979..683c144 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -4517,10 +4517,9 @@ ast_declarator_list::hir(exec_list *instructions,
   allowed_atomic_qual_mask.flags.q.explicit_offset = 1;
   allowed_atomic_qual_mask.flags.q.uniform = 1;
 
-  type->qualifier.validate_flags(, state,
- "invalid layout qualifier for "
- "atomic_uint",
- allowed_atomic_qual_mask);
+  type->qualifier.validate_flags(, state, allowed_atomic_qual_mask,
+ "invalid layout qualifier for",
+ "atomic_uint");
}
 
if (this->declarations.is_empty()) {
diff --git a/src/compiler/glsl/ast_type.cpp b/src/compiler/glsl/ast_type.cpp
index 1f8fb9c..ef573e7 100644
--- a/src/compiler/glsl/ast_type.cpp
+++ b/src/compiler/glsl/ast_type.cpp
@@ -600,8 +600,8 @@ ast_type_qualifier::merge_in_qualifier(YYLTYPE *loc,
 bool
 ast_type_qualifier::validate_flags(YYLTYPE *loc,
_mesa_glsl_parse_state *state,
-   const char *message,
-   const ast_type_qualifier _flags)
+   const ast_type_qualifier _flags,
+   const char *message, const char *name)
 {
ast_type_qualifier bad;
bad.flags.i = this->flags.i & ~allowed_flags.flags.i;
@@ -609,11 +609,11 @@ ast_type_qualifier::validate_flags(YYLTYPE *loc,
   return true;
 
_mesa_glsl_error(loc, state,
-"%s:"
+"%s '%s':"
 "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s"
 "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s"
 "%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
-message,
+message, name,
 bad.flags.q.invariant ? " invariant" : "",
 bad.flags.q.precise ? " precise" : "",
 bad.flags.q.constant ? " constant" : "",
-- 
2.7.4

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


[Mesa-dev] [PATCH V2 1/3] glsl: add component to ast_type_qualifier::validate_flags

2016-07-30 Thread Timothy Arceri
This was added with ARB_enhanced_layouts.

V2: Add an extra format specifier for the new qualifier.
---
 src/compiler/glsl/ast_type.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compiler/glsl/ast_type.cpp b/src/compiler/glsl/ast_type.cpp
index d34d641..1f8fb9c 100644
--- a/src/compiler/glsl/ast_type.cpp
+++ b/src/compiler/glsl/ast_type.cpp
@@ -612,7 +612,7 @@ ast_type_qualifier::validate_flags(YYLTYPE *loc,
 "%s:"
 "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s"
 "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s"
-"%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
+"%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
 message,
 bad.flags.q.invariant ? " invariant" : "",
 bad.flags.q.precise ? " precise" : "",
@@ -633,6 +633,7 @@ ast_type_qualifier::validate_flags(YYLTYPE *loc,
 bad.flags.q.origin_upper_left ? " origin_upper_left" : "",
 bad.flags.q.pixel_center_integer ? " pixel_center_integer" 
: "",
 bad.flags.q.explicit_align ? " align" : "",
+bad.flags.q.explicit_component ? " component" : "",
 bad.flags.q.explicit_location ? " location" : "",
 bad.flags.q.explicit_index ? " index" : "",
 bad.flags.q.explicit_binding ? " binding" : "",
-- 
2.7.4

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


[Mesa-dev] [PATCH] freedreno/ir3: init ir3_shader_key with memset()

2016-07-30 Thread Francesco Ansanelli
To silence missing initializers warning
Signed-off-by: Francesco Ansanelli 
---
 src/gallium/drivers/freedreno/ir3/ir3_shader.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.c 
b/src/gallium/drivers/freedreno/ir3/ir3_shader.c
index 5d57c0b..5c73696 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_shader.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_shader.c
@@ -309,7 +309,8 @@ ir3_shader_create(struct ir3_compiler *compiler,
 * (as otherwise nothing will trigger the shader to be
 * actually compiled)
 */
-   static struct ir3_shader_key key = {{0}};
+   static struct ir3_shader_key key;
+   memset(, 0, sizeof(key));
ir3_shader_variant(shader, key, debug);
}
return shader;
-- 
1.7.9.5

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