Re: [Mesa-dev] [PATCH] i965/fs: Disable CSE optimization for untyped & typed surface reads

2015-10-22 Thread Iago Toral
On Wed, 2015-10-21 at 23:24 -0700, Jordan Justen wrote: > On 2015-10-20 00:43:13, Iago Toral wrote: > > On Tue, 2015-10-20 at 00:12 -0700, Jordan Justen wrote: > > > An untyped surface read is volatile because it might be affected by a > > > write. > > > > > > In the ES31-CTS.compute_shader.resour

Re: [Mesa-dev] [PATCH] glsl: fix shader storage block member rules when adding program resources

2015-10-22 Thread Samuel Iglesias Gonsálvez
On 22/10/15 08:29, Timothy Arceri wrote: > On Wed, 2015-10-21 at 12:18 +0200, Samuel Iglesias Gonsalvez wrote: >> Commit f24e5e did not take into account arrays of named shader >> storage blocks. >> >> Fixes 20 dEQP-GLES31.functional.ssbo.* tests: >> >> dEQP >> -GLES31.functional.ssbo.layout.sing

Re: [Mesa-dev] [PATCH] i965/fs: Disable CSE optimization for untyped & typed surface reads

2015-10-22 Thread Jordan Justen
On 2015-10-22 00:06:37, Iago Toral wrote: > On Wed, 2015-10-21 at 23:24 -0700, Jordan Justen wrote: > > On 2015-10-20 00:43:13, Iago Toral wrote: > > > On Tue, 2015-10-20 at 00:12 -0700, Jordan Justen wrote: > > > > An untyped surface read is volatile because it might be affected by a > > > > write

Re: [Mesa-dev] [PATCH] glsl: remove excess location qualifier validation

2015-10-22 Thread Timothy Arceri
On Thu, 2015-10-22 at 09:56 +0300, Tapani Pälli wrote: > On 10/22/2015 09:41 AM, Timothy Arceri wrote: > > On Thu, 2015-10-22 at 08:55 +0300, Tapani Pälli wrote: > > > On 10/22/2015 08:29 AM, Timothy Arceri wrote: > > > > Location has never been able to be a negative value because it > > > > has >

Re: [Mesa-dev] [PATCH 2/4] st/dri2: Add shared flag to missing locations

2015-10-22 Thread Erik Faye-Lund
On Wed, Oct 21, 2015 at 10:34 PM, Marek Olšák wrote: > On Wed, Oct 21, 2015 at 12:28 PM, Axel Davy wrote: >> The PIPE_BIND_SHARED flag should be added whenever >> the resource may be shared with another process. >> >> In particular if the resource is imported, or may >> be exported, the flag shou

Re: [Mesa-dev] [PATCH v3 1/7] radeonsi: Allocate buffers for DCC.

2015-10-22 Thread Marek Olšák
On Wed, Oct 21, 2015 at 9:56 AM, Axel Davy wrote: > On 21/10/2015 00:10, Bas Nieuwenhuizen wrote: >> >> >> DCC is disabled for textures that can be shared as sharing the >> DCC buffers has not been implemented yet. >> >> >> + surf->dcc_enabled = !(surf->flags & RADEON_SURF_Z_OR_SBUFFER) && >>

Re: [Mesa-dev] [PATCH 2/4] st/dri2: Add shared flag to missing locations

2015-10-22 Thread Marek Olšák
On Thu, Oct 22, 2015 at 10:22 AM, Erik Faye-Lund wrote: > On Wed, Oct 21, 2015 at 10:34 PM, Marek Olšák wrote: >> On Wed, Oct 21, 2015 at 12:28 PM, Axel Davy wrote: >>> The PIPE_BIND_SHARED flag should be added whenever >>> the resource may be shared with another process. >>> >>> In particular i

Re: [Mesa-dev] [PATCH 2/4] st/dri2: Add shared flag to missing locations

2015-10-22 Thread Erik Faye-Lund
On Thu, Oct 22, 2015 at 10:54 AM, Marek Olšák wrote: > On Thu, Oct 22, 2015 at 10:22 AM, Erik Faye-Lund wrote: >> On Wed, Oct 21, 2015 at 10:34 PM, Marek Olšák wrote: >>> On Wed, Oct 21, 2015 at 12:28 PM, Axel Davy wrote: The PIPE_BIND_SHARED flag should be added whenever the resource

[Mesa-dev] [PATCH 2/2] glsl: fix GL_BUFFER_DATA_SIZE value for shader storage blocks with unsize arrays

2015-10-22 Thread Samuel Iglesias Gonsalvez
From ARB_program_interface_query: "For the property of BUFFER_DATA_SIZE, then the implementation-dependent minimum total buffer object size, in basic machine units, required to hold all active variables associated with an active uniform block, shader storage block, or atomic counter buffer is w

[Mesa-dev] [PATCH 1/2] main: Remove interface block array index for doing the name comparison

2015-10-22 Thread Samuel Iglesias Gonsalvez
From ARB_program_query_interface spec: "uint GetProgramResourceIndex(uint program, enum programInterface, const char *name); [...] If exactly matches the name string of one of the active resources for , the index of the matched resource is returned. Addition

[Mesa-dev] [PATCH 1/2] meta/blit: Always try to enable GL_ARB_sample_shading

2015-10-22 Thread Neil Roberts
Previously this extension was only enabled when blitting between two multisampled buffers. However I don't think it does any harm to just enable it all the time. The ‘enable’ option is used instead of ‘require’ so that the shader will still compile if the extension isn't available in the cases wher

[Mesa-dev] [PATCH v3 2/2] mesa/meta: Use interpolateAtOffset for 16x MSAA copy blit

2015-10-22 Thread Neil Roberts
Previously there was a problem in i965 where if 16x MSAA is used then some of the sample positions are exactly on the 0 x or y axis. When the MSAA copy blit shader interpolates the texture coordinates at these sample positions it was possible that it would jump to a neighboring texel due to roundin

Re: [Mesa-dev] [PATCH 1/2] i965: remove cache_aux_free_func array

2015-10-22 Thread Emil Velikov
On 21 October 2015 at 22:44, Matt Turner wrote: > On Wed, Oct 21, 2015 at 2:16 PM, Emil Velikov > wrote: >> On 21 October 2015 at 21:33, Kenneth Graunke wrote: >>> On Monday, October 19, 2015 02:54:56 PM Emil Velikov wrote: Ping on these two trivial patches ? -Emil >>> >>> Oh, so

Re: [Mesa-dev] [RFC 03/21] mesa/extensions: Wrap array entries in macros

2015-10-22 Thread Emil Velikov
On 20 October 2015 at 16:43, Nanley Chery wrote: > On Tue, Oct 20, 2015 at 8:16 AM, Marek Olšák wrote: >> >> Also, the FIXME comment should be on its own line. >> > > I moved it aside to make editing the table easier. However, since the > formatting of the > table is unlikely to change much after

Re: [Mesa-dev] [PATCH] gallivm: Translate all util_cpu_caps bits to LLVM attributes.

2015-10-22 Thread Jose Fonseca
On 21/10/15 17:35, Gustaw Smolarczyk wrote: I am just a bystander, but I have one suggestion to this patch. 2015-10-21 18:25 GMT+02:00 Jose Fonseca : This should prevent disparity between features Mesa and LLVM believe are supported by the CPU. http://lists.freedesktop.org/archives/mesa-dev/20

Re: [Mesa-dev] [PATCH v3 5/7] radeonsi: Implement DCC fast clear.

2015-10-22 Thread Marek Olšák
On Wed, Oct 21, 2015 at 12:10 AM, Bas Nieuwenhuizen wrote: > Uses the DCC buffer instead of the CMASK buffer. The ELIMINATE_FAST_CLEAR > still works. Furthermore, with DCC compression we can directly clear > to a limited set of colors such that we do not need a postprocessing step. > > Signed-off-

Re: [Mesa-dev] [RFC 04/21] mesa/extensions: Move entries entries to seperate file

2015-10-22 Thread Emil Velikov
On 19 October 2015 at 23:36, Nanley Chery wrote: > From: Nanley Chery > > With this infrastructure set in place, we can now reuse the entries to > generate useful code. > > Signed-off-by: Nanley Chery > --- > src/mesa/main/extensions.c | 321 > +-- > s

Re: [Mesa-dev] [RFC 05/21] mesa/extensions: Add extension::version

2015-10-22 Thread Emil Velikov
On 19 October 2015 at 23:36, Nanley Chery wrote: > From: Nanley Chery > > Enable limiting advertised extension support by context version with > finer granularity. GLuint is chosen over smaller datatypes because, > when this field is eventually used, usage of this datatype provides > the smallest

Re: [Mesa-dev] [RFC 06/21] mesa/extensions: Create _mesa_extension_supported()

2015-10-22 Thread Emil Velikov
On 19 October 2015 at 23:36, Nanley Chery wrote: > From: Nanley Chery > > Create a function which determines if an extension is supported in the > current context. > > Signed-off-by: Nanley Chery > --- > src/mesa/main/extensions.c | 17 + > 1 file changed, 17 insertions(+) > > d

Re: [Mesa-dev] [PATCH 2/4] st/dri2: Add shared flag to missing locations

2015-10-22 Thread Marek Olšák
On Thu, Oct 22, 2015 at 10:56 AM, Erik Faye-Lund wrote: > On Thu, Oct 22, 2015 at 10:54 AM, Marek Olšák wrote: >> On Thu, Oct 22, 2015 at 10:22 AM, Erik Faye-Lund wrote: >>> On Wed, Oct 21, 2015 at 10:34 PM, Marek Olšák wrote: On Wed, Oct 21, 2015 at 12:28 PM, Axel Davy wrote: > The P

Re: [Mesa-dev] [RFC 10/21] mesa: Remove equality check in helper functions

2015-10-22 Thread Emil Velikov
On 22 October 2015 at 07:43, Erik Faye-Lund wrote: > On Tue, Oct 20, 2015 at 12:44 AM, Nanley Chery wrote: >> From: Nanley Chery >> >> Since the version numbers being compared are integral and we don't ever >> expect gl_context::Version to be equal to 0, subtract 1 from the rhs of >> the equatio

Re: [Mesa-dev] [PATCH 2/4] st/dri2: Add shared flag to missing locations

2015-10-22 Thread Erik Faye-Lund
On Thu, Oct 22, 2015 at 12:18 PM, Marek Olšák wrote: > On Thu, Oct 22, 2015 at 10:56 AM, Erik Faye-Lund wrote: >> On Thu, Oct 22, 2015 at 10:54 AM, Marek Olšák wrote: >>> On Thu, Oct 22, 2015 at 10:22 AM, Erik Faye-Lund >>> wrote: On Wed, Oct 21, 2015 at 10:34 PM, Marek Olšák wrote:

Re: [Mesa-dev] [RFC 18/21] mesa/extensions: Remove extra memsets on gl_extensions

2015-10-22 Thread Emil Velikov
On 19 October 2015 at 23:44, Nanley Chery wrote: > From: Nanley Chery > > Aside from those modified in this commit, all gl_extensions structs are > zero-initialized by default. There is therefore no need to memset the > structs to 0. Also, remove the open-coded memset in > _mesa_init_extensions()

Re: [Mesa-dev] [RFC 20/21] mesa: Remove gl_extensions::dummy

2015-10-22 Thread Emil Velikov
On 19 October 2015 at 23:44, Nanley Chery wrote: > From: Nanley Chery > > This variable existed to provide an unsigned error value for > name_to_offset(). Since o(extension_sentinel) is also a valid unsigned > error value, save space and replace this mysterious variable with > a less mysterious o

Re: [Mesa-dev] [PATCH 2/9] i965: Fill out instruction list.

2015-10-22 Thread Emil Velikov
On 21 October 2015 at 23:58, Matt Turner wrote: > Add some instructions: illegal, movi, sends, sendsc. > > Remove some instructions with reused opcodes: msave, mrestore, push, > pop, goto. I did have some gross code for disassembling opcodes > per-generation, but there's very little meaningful ove

Re: [Mesa-dev] [PATCH 1/2] main: Remove interface block array index for doing the name comparison

2015-10-22 Thread Timothy Arceri
On Thu, 2015-10-22 at 11:01 +0200, Samuel Iglesias Gonsalvez wrote: > From ARB_program_query_interface spec: > > "uint GetProgramResourceIndex(uint program, enum programInterface, >const char *name); > [...] > If exactly matches the name string of one of the

Re: [Mesa-dev] [PATCH 1/2] main: Remove interface block array index for doing the name comparison

2015-10-22 Thread Tapani Pälli
On 10/22/2015 12:01 PM, Samuel Iglesias Gonsalvez wrote: From ARB_program_query_interface spec: "uint GetProgramResourceIndex(uint program, enum programInterface, const char *name); [...] If exactly matches the name string of one of the active resources

Re: [Mesa-dev] [PATCH 7/9] i965: Add initial assembly validation pass.

2015-10-22 Thread Emil Velikov
On 21 October 2015 at 23:58, Matt Turner wrote: > Initially just checks that sources are non-NULL, which would have > alerted us to the problem fixed by commit 6c846dc5. What are the chances of combining this with and/or removing fs_visitor::validate() ? Afaict both of these validations are at di

Re: [Mesa-dev] [PATCH 1/2] main: Remove interface block array index for doing the name comparison

2015-10-22 Thread Samuel Iglesias Gonsálvez
On 22/10/15 13:08, Tapani Pälli wrote: > On 10/22/2015 12:01 PM, Samuel Iglesias Gonsalvez wrote: >> From ARB_program_query_interface spec: >> >> "uint GetProgramResourceIndex(uint program, enum programInterface, >> const char *name); >> [...] >> If exact

[Mesa-dev] [PATCH 1/2] nir/cse: invalidate SSBO loads in presence of ssbo writes or memory barriers

2015-10-22 Thread Iago Toral Quiroga
In the next commit we are going to allow CSE of SSBO loads, so we need to make sure that we consider how SSBO stores/atomics invalidate previous loads. --- src/glsl/nir/nir_opt_cse.c | 142 + 1 file changed, 142 insertions(+) diff --git a/src/glsl/nir/n

Re: [Mesa-dev] [PATCH 1/2] main: Remove interface block array index for doing the name comparison

2015-10-22 Thread Samuel Iglesias Gonsálvez
On 22/10/15 13:06, Timothy Arceri wrote: > On Thu, 2015-10-22 at 11:01 +0200, Samuel Iglesias Gonsalvez wrote: >> From ARB_program_query_interface spec: >> >> "uint GetProgramResourceIndex(uint program, enum programInterface, >>const char *name); >> [...] >>

[Mesa-dev] [PATCH 0/2] Nir: Allow CSE of SSBO loads

2015-10-22 Thread Iago Toral Quiroga
I implemented this first as a separate optimization pass in GLSL IR [1], but Curro pointed out that this being pretty much a restricted form of a CSE pass it would probably make more sense to do it inside CSE (and we no longer have a CSE pass in GLSL IR). Unlike other things we CSE in NIR, in the

[Mesa-dev] [PATCH 2/2] nir/instr_set: allow rewrite of SSBO loads

2015-10-22 Thread Iago Toral Quiroga
So we can effectively CSE the ones that are safe to reuse. Makes a shader such as this: buffer SSBO { mat4 sm4; }; uniform mat4 um4; void main() { sm4 *= um4; } go from 16 SSBO loads to only 4. --- src/glsl/nir/nir_instr_set.c | 24 1 file changed, 20 insertion

[Mesa-dev] [PATCH] mesa: clamp MaxLevel for immutable textures at initialization

2015-10-22 Thread Nicolai Hähnle
The same clamping already happens for glTexParameteri. This change also fixes a bug in mipmap generation, see https://bugs.freedesktop.org/show_bug.cgi?id=91993 piglit test cases have been submitted for review (as additions to arb_texture_storage-texture-storage and arb_texture_view-max-level). --

Re: [Mesa-dev] [PATCH 2/6] [v2] i965/fs: Enumerate logical fb writes arguments

2015-10-22 Thread Francisco Jerez
Ben Widawsky writes: > Gen9 adds the ability to write out a stencil value, so we need to expand the > virtual payload by one. Abstracting this now makes that change easier to read. > > I was admittedly confused early on about some of the hardcoding. If people > believe the resulting code is infer

Re: [Mesa-dev] [PATCH 0/2] Nir: Allow CSE of SSBO loads

2015-10-22 Thread Connor Abbott
On Thu, Oct 22, 2015 at 7:21 AM, Iago Toral Quiroga wrote: > I implemented this first as a separate optimization pass in GLSL IR [1], but > Curro pointed out that this being pretty much a restricted form of a CSE pass > it would probably make more sense to do it inside CSE (and we no longer have >

Re: [Mesa-dev] [PATCH] mesa: clamp MaxLevel for immutable textures at initialization

2015-10-22 Thread Fredrik Höglund
On Thursday 22 October 2015, Nicolai Hähnle wrote: > The same clamping already happens for glTexParameteri. This change > also fixes a bug in mipmap generation, see > https://bugs.freedesktop.org/show_bug.cgi?id=91993 I don't think this patch is correct. The ARB_texture_view specification doesn't

Re: [Mesa-dev] [PATCH 21/40] pipe-loader: wire up the 'static' drm pipe-loader

2015-10-22 Thread Nicolai Hähnle
On 18.10.2015 00:57, Emil Velikov wrote: Add a list of driver descriptors and select one from the list, during probe time. As we'll need to have all the driver pipe_foo_screen_create() functions provided externally (i.e. from another static lib) we need a separate (non-inline) drm_helper, which

[Mesa-dev] [PATCH 2/2] i965/nir/opt_peephole_ffma: Bypass fusion if any operand of fadd and fmul is a const

2015-10-22 Thread Eduardo Lima Mitev
When both fadd and fmul instructions have at least one operand that is a constant and it is only used once, the total number of instructions can be reduced from 3 (1 ffma + 2 load_const) to 2 (1 fmul + 1 fadd); because the constants will be progagated as immediate operands of fmul and fadd. This p

[Mesa-dev] [PATCH 1/2] nir/nir_opt_peephole_ffma: Move this lowering pass to the i965 driver

2015-10-22 Thread Eduardo Lima Mitev
Because the next patch will add an optimization that is specific to i965, we want to move this loweing pass to that driver altogether. This is safe because i965 is the only consumer. --- src/glsl/Makefile.sources | 1 - src/glsl/nir/nir.h

[Mesa-dev] [PATCH 0/2] nir/opt_peephole_ffma: Bypass fusion if any operand of fadd and fmul is a const

2015-10-22 Thread Eduardo Lima Mitev
Hello, Last month I was working on an optimization for nir_opt_peephole_ffma, and I sent a request for comments to the list [1]. Then I went on holidays and this work got stalled. During the last days I resumed it, and have been experimenting with some ideas Matt Turner suggested back then, in

Re: [Mesa-dev] [PATCH 0/2] Nir: Allow CSE of SSBO loads

2015-10-22 Thread Iago Toral
On Thu, 2015-10-22 at 09:39 -0400, Connor Abbott wrote: > On Thu, Oct 22, 2015 at 7:21 AM, Iago Toral Quiroga wrote: > > I implemented this first as a separate optimization pass in GLSL IR [1], but > > Curro pointed out that this being pretty much a restricted form of a CSE > > pass > > it would

Re: [Mesa-dev] [PATCH 0/2] Nir: Allow CSE of SSBO loads

2015-10-22 Thread Francisco Jerez
Connor Abbott writes: > On Thu, Oct 22, 2015 at 7:21 AM, Iago Toral Quiroga wrote: >> I implemented this first as a separate optimization pass in GLSL IR [1], but >> Curro pointed out that this being pretty much a restricted form of a CSE pass >> it would probably make more sense to do it inside

Re: [Mesa-dev] [PATCH 0/2] Nir: Allow CSE of SSBO loads

2015-10-22 Thread Iago Toral
On Thu, 2015-10-22 at 16:38 +0200, Iago Toral wrote: > On Thu, 2015-10-22 at 09:39 -0400, Connor Abbott wrote: > > On Thu, Oct 22, 2015 at 7:21 AM, Iago Toral Quiroga > > wrote: > > > I implemented this first as a separate optimization pass in GLSL IR [1], > > > but > > > Curro pointed out that

Re: [Mesa-dev] [PATCH 21/40] pipe-loader: wire up the 'static' drm pipe-loader

2015-10-22 Thread Emil Velikov
On 22 October 2015 at 15:07, Nicolai Hähnle wrote: > On 18.10.2015 00:57, Emil Velikov wrote: >> >> Add a list of driver descriptors and select one from the list, during >> probe time. >> >> As we'll need to have all the driver pipe_foo_screen_create() functions >> provided externally (i.e. from a

Re: [Mesa-dev] [PATCH 0/2] Nir: Allow CSE of SSBO loads

2015-10-22 Thread Connor Abbott
On Thu, Oct 22, 2015 at 10:37 AM, Francisco Jerez wrote: > Connor Abbott writes: > >> On Thu, Oct 22, 2015 at 7:21 AM, Iago Toral Quiroga >> wrote: >>> I implemented this first as a separate optimization pass in GLSL IR [1], but >>> Curro pointed out that this being pretty much a restricted for

Re: [Mesa-dev] [PATCH 2/2] i965/nir/opt_peephole_ffma: Bypass fusion if any operand of fadd and fmul is a const

2015-10-22 Thread Jason Ekstrand
On Thu, Oct 22, 2015 at 7:12 AM, Eduardo Lima Mitev wrote: > When both fadd and fmul instructions have at least one operand that is a > constant and it is only used once, the total number of instructions can > be reduced from 3 (1 ffma + 2 load_const) to 2 (1 fmul + 1 fadd); because > the constant

Re: [Mesa-dev] [PATCH 21/40] pipe-loader: wire up the 'static' drm pipe-loader

2015-10-22 Thread Emil Velikov
On 22 October 2015 at 16:32, Emil Velikov wrote: > On 22 October 2015 at 15:07, Nicolai Hähnle wrote: >> On 18.10.2015 00:57, Emil Velikov wrote: >>> >>> Add a list of driver descriptors and select one from the list, during >>> probe time. >>> >>> As we'll need to have all the driver pipe_foo_scr

Re: [Mesa-dev] [PATCH] mesa: clamp MaxLevel for immutable textures at initialization

2015-10-22 Thread Nicolai Hähnle
On 22.10.2015 15:57, Fredrik Höglund wrote: On Thursday 22 October 2015, Nicolai Hähnle wrote: The same clamping already happens for glTexParameteri. This change also fixes a bug in mipmap generation, see https://bugs.freedesktop.org/show_bug.cgi?id=91993 I don't think this patch is correct.

Re: [Mesa-dev] [PATCH 6/7] st/va: add initial Video Post Processing support

2015-10-22 Thread Julien Isorce
Hi, Thx for your review. I'll submit a new version of the patch. Just replying here first to answer your questions: On 19 October 2015 at 18:10, Emil Velikov wrote: > On 17 October 2015 at 00:14, Julien Isorce > wrote: > > Improve following functions to support VA_PROFILE_NONE profile (vpp): >

Re: [Mesa-dev] [PATCH 21/40] pipe-loader: wire up the 'static' drm pipe-loader

2015-10-22 Thread Nicolai Hähnle
On 22.10.2015 17:32, Emil Velikov wrote: On 22 October 2015 at 15:07, Nicolai Hähnle wrote: On 18.10.2015 00:57, Emil Velikov wrote: Add a list of driver descriptors and select one from the list, during probe time. As we'll need to have all the driver pipe_foo_screen_create() functions provi

Re: [Mesa-dev] [PATCH 0/2] Nir: Allow CSE of SSBO loads

2015-10-22 Thread Ilia Mirkin
On Thu, Oct 22, 2015 at 9:39 AM, Connor Abbott wrote: > 2. Add a special "load-combining" pass that does some dataflow > analysis or similar (or, for now, only looks at things within a single > block). FYI nouveau does this at a local level (i.e. per-bb), if you're interested take a look at: http

[Mesa-dev] [PATCH 1/2] radeonsi: add support for Stoney asics (v2)

2015-10-22 Thread Alex Deucher
From: Samuel Li v2 (agd): rebase on mesa master, split pci ids to separate commit Signed-off-by: Samuel Li --- src/gallium/drivers/radeon/r600_pipe_common.c | 2 ++ src/gallium/drivers/radeon/radeon_winsys.h| 1 + src/gallium/drivers/radeonsi/si_state.c | 1 + src/gallium/winsys/amdg

Re: [Mesa-dev] [PATCH 0/2] Nir: Allow CSE of SSBO loads

2015-10-22 Thread Jason Ekstrand
On Thu, Oct 22, 2015 at 4:21 AM, Iago Toral Quiroga wrote: > I implemented this first as a separate optimization pass in GLSL IR [1], but > Curro pointed out that this being pretty much a restricted form of a CSE pass > it would probably make more sense to do it inside CSE (and we no longer have >

[Mesa-dev] [PATCH 2/2] radeonsi: add Stoney pci ids

2015-10-22 Thread Alex Deucher
From: Samuel Li Signed-off-by: Samuel Li --- include/pci_ids/radeonsi_pci_ids.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/pci_ids/radeonsi_pci_ids.h b/include/pci_ids/radeonsi_pci_ids.h index 52eada1..bcf15a1 100644 --- a/include/pci_ids/radeonsi_pci_ids.h +++ b/include/pci

Re: [Mesa-dev] [PATCH 6/7] st/va: add initial Video Post Processing support

2015-10-22 Thread Julien Isorce
On 19 October 2015 at 18:10, Emil Velikov wrote: > On 17 October 2015 at 00:14, Julien Isorce > wrote: > > + > > + if (!(picture_width && picture_height) && !is_vpp) > >return VA_STATUS_ERROR_INVALID_IMAGE_FORMAT; > > > > drv = VL_VA_DRIVER(ctx); > > @@ -163,38 +177,48 @@ vlVaCreat

Re: [Mesa-dev] [PATCH] mesa: clamp MaxLevel for immutable textures at initialization

2015-10-22 Thread Ilia Mirkin
On Thu, Oct 22, 2015 at 12:03 PM, Nicolai Hähnle wrote: > On 22.10.2015 15:57, Fredrik Höglund wrote: >> >> On Thursday 22 October 2015, Nicolai Hähnle wrote: >>> >>> The same clamping already happens for glTexParameteri. This change >>> also fixes a bug in mipmap generation, see >>> https://bugs.

[Mesa-dev] [PATCH] radeon/uvd: don't expose HEVC on old UVD hw

2015-10-22 Thread Alex Deucher
The section for UVD 2 and older was not updated when HEVC support was added. Reported by Kano on irc. Signed-off-by: Alex Deucher Cc: mesa-sta...@lists.freedesktop.org --- src/gallium/drivers/radeon/radeon_video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/

[Mesa-dev] [PATCH v2 7/8] st/va: add colospace conversion through Video Post Processing

2015-10-22 Thread Julien Isorce
Add support for VPP in the following functions: vlVaCreateContext vlVaDestroyContext vlVaBeginPicture vlVaRenderPicture vlVaEndPicture Add support for VAProcFilterNone in: vlVaQueryVideoProcFilters vlVaQueryVideoProcFilterCaps vlVaQueryVideoProcPipelineCaps Add handleVAProcPipelineParameterBuffer

[Mesa-dev] [PATCH v2 6/8] st/va: handle Video Post Processing for configs

2015-10-22 Thread Julien Isorce
Add support for VA_PROFILE_NONE and VAEntrypointVideoProc in the 4 following functions: vlVaQueryConfigProfiles vlVaQueryConfigEntrypoints vlVaCreateConfig vlVaQueryConfigAttributes Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/config.c | 20 src/galliu

Re: [Mesa-dev] [PATCH v3 5/7] radeonsi: Implement DCC fast clear.

2015-10-22 Thread Bas Nieuwenhuizen
On Thu, Oct 22, 2015 at 12:12 PM, Marek Olšák wrote: > On Wed, Oct 21, 2015 at 12:10 AM, Bas Nieuwenhuizen > wrote: >> Uses the DCC buffer instead of the CMASK buffer. The ELIMINATE_FAST_CLEAR >> still works. Furthermore, with DCC compression we can directly clear >> to a limited set of colors su

Re: [Mesa-dev] [PATCH] radeon/uvd: don't expose HEVC on old UVD hw

2015-10-22 Thread Roland Scheidegger
Am 22.10.2015 um 18:27 schrieb Alex Deucher: > The section for UVD 2 and older was not updated > when HEVC support was added. Reported by Kano > on irc. > > Signed-off-by: Alex Deucher > Cc: mesa-sta...@lists.freedesktop.org > --- > src/gallium/drivers/radeon/radeon_video.c | 3 ++- > 1 file cha

[Mesa-dev] [PATCH] radeon/uvd: don't expose HEVC on old UVD hw (v2)

2015-10-22 Thread Alex Deucher
The section for UVD 2 and older was not updated when HEVC support was added. Reported by Kano on irc. v2: integrate the UVD2 and older checks into the main switch statement. Signed-off-by: Alex Deucher Cc: mesa-sta...@lists.freedesktop.org --- src/gallium/drivers/radeon/radeon_video.c | 46

Re: [Mesa-dev] [RFC 05/21] mesa/extensions: Add extension::version

2015-10-22 Thread Chad Versace
On Mon 19 Oct 2015, Nanley Chery wrote: > From: Nanley Chery > > Enable limiting advertised extension support by context version with > finer granularity. GLuint is chosen over smaller datatypes because, > when this field is eventually used, usage of this datatype provides > the smallest .text si

Re: [Mesa-dev] [RFC 06/21] mesa/extensions: Create _mesa_extension_supported()

2015-10-22 Thread Chad Versace
On Thu 22 Oct 2015, Emil Velikov wrote: > On 19 October 2015 at 23:36, Nanley Chery wrote: > > From: Nanley Chery > > > > Create a function which determines if an extension is supported in the > > current context. > > > > Signed-off-by: Nanley Chery > > --- > > src/mesa/main/extensions.c | 17 +

Re: [Mesa-dev] [RFC 07/21] mesa/extensions: Use _mesa_extension_supported()

2015-10-22 Thread Chad Versace
On Mon 19 Oct 2015, Nanley Chery wrote: > From: Nanley Chery > > Replace open-coded checks for extension support with > _mesa_extension_supported(). > > Signed-off-by: Nanley Chery > --- > src/mesa/main/extensions.c | 54 > > src/mesa/main/extens

Re: [Mesa-dev] [PATCH v2] i965/vec4: track and use independently each flag channel

2015-10-22 Thread Matt Turner
On Mon, Oct 19, 2015 at 10:38 AM, Alejandro Piñeiro wrote: > vec4_live_variables tracks now each flag channel independently, so > vec4_dead_code_eliminate can update the writemask of null registers, > based on which component are alive at the moment. This would allow > vec4_cmod_propagation to opt

Re: [Mesa-dev] [RFC 08/21] mesa/extensions: Replace extension::api_set with ::version

2015-10-22 Thread Chad Versace
On Mon 19 Oct 2015, Nanley Chery wrote: > From: Nanley Chery > > The api_set field has no users outside of _mesa_extension_supported(). > Remove it and allow the version field to take its place. > > The brunt of the transformation was performed with the following vim commands: > s/\(GL [^,]\+\),

Re: [Mesa-dev] [PATCH 2/9] i965: Fill out instruction list.

2015-10-22 Thread Matt Turner
On Thu, Oct 22, 2015 at 3:58 AM, Emil Velikov wrote: > On 21 October 2015 at 23:58, Matt Turner wrote: >> Add some instructions: illegal, movi, sends, sendsc. >> >> Remove some instructions with reused opcodes: msave, mrestore, push, >> pop, goto. I did have some gross code for disassembling opco

Re: [Mesa-dev] [PATCH 7/9] i965: Add initial assembly validation pass.

2015-10-22 Thread Matt Turner
On Thu, Oct 22, 2015 at 4:15 AM, Emil Velikov wrote: > On 21 October 2015 at 23:58, Matt Turner wrote: >> Initially just checks that sources are non-NULL, which would have >> alerted us to the problem fixed by commit 6c846dc5. > > What are the chances of combining this with and/or removing > fs_v

Re: [Mesa-dev] [RFC 08/21] mesa/extensions: Replace extension::api_set with ::version

2015-10-22 Thread Matt Turner
On Thu, Oct 22, 2015 at 11:24 AM, Chad Versace wrote: > On Mon 19 Oct 2015, Nanley Chery wrote: >> From: Nanley Chery >> >> The api_set field has no users outside of _mesa_extension_supported(). >> Remove it and allow the version field to take its place. >> >> The brunt of the transformation was

Re: [Mesa-dev] [RFC 09/21] mesa: Generate a helper function for each extension

2015-10-22 Thread Chad Versace
On Mon 19 Oct 2015, Nanley Chery wrote: > From: Nanley Chery > > Generate functions which determine if an extension is supported in the > current context. Initially, enums were going to be explicitly used with > _mesa_extension_supported(). The idea to embed the function and enums > into generate

Re: [Mesa-dev] [RFC 10/21] mesa: Remove equality check in helper functions

2015-10-22 Thread Chad Versace
On Thu 22 Oct 2015, Emil Velikov wrote: > On 22 October 2015 at 07:43, Erik Faye-Lund wrote: > > On Tue, Oct 20, 2015 at 12:44 AM, Nanley Chery > > wrote: > >> From: Nanley Chery > >> > >> Since the version numbers being compared are integral and we don't ever > >> expect gl_context::Version to

Re: [Mesa-dev] [RFC 07/21] mesa/extensions: Use _mesa_extension_supported()

2015-10-22 Thread Matt Turner
On Thu, Oct 22, 2015 at 11:15 AM, Chad Versace wrote: > On Mon 19 Oct 2015, Nanley Chery wrote: >> From: Nanley Chery >> >> Replace open-coded checks for extension support with >> _mesa_extension_supported(). >> >> Signed-off-by: Nanley Chery >> --- >> src/mesa/main/extensions.c | 54 >>

[Mesa-dev] [PATCH v2 1/8] i965: Don't use message headers for untyped reads

2015-10-22 Thread Kristian Høgsberg Kristensen
We always set the mask to 0x, which is what it defaults to when no header is present. Let's drop the header instead. v2: Only remove header for untyped reads. Typed reads always need the header. Reviewed-by: Francisco Jerez Reviewed-by: Jordan Justen Signed-off-by: Kristian Høgsberg Kri

[Mesa-dev] [PATCH v2 7/8] i965/fs: Optimize ssbo stores

2015-10-22 Thread Kristian Høgsberg Kristensen
Write groups of enabled components together. Signed-off-by: Kristian Høgsberg Kristensen --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 56 +++- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/driver

[Mesa-dev] [PATCH v2 5/8] i965/fs: Avoid scalar destinations in emit_uniformize()

2015-10-22 Thread Kristian Høgsberg Kristensen
The scalar destination registers break copy propagation. Instead compute the results to a regular register and then reference a component when we later use the result as a source. Signed-off-by: Kristian Høgsberg Kristensen --- src/mesa/drivers/dri/i965/brw_fs_builder.h | 8 1 file chan

[Mesa-dev] [PATCH v2 4/8] i965/fs: Don't uniformize surface index twice

2015-10-22 Thread Kristian Høgsberg Kristensen
The emit_untyped_read and emit_untyped_write helpers already uniformize the surface index argument. No need to do it before calling them. Signed-off-by: Kristian Høgsberg Kristensen --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mesa/drivers

[Mesa-dev] [PATCH v2 8/8] i965/fs: Allow copy propagating into new surface access opcodes

2015-10-22 Thread Kristian Høgsberg Kristensen
Signed-off-by: Kristian Høgsberg Kristensen --- src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp index 5589716..

[Mesa-dev] [PATCH v2 0/8] SSBO optimizations

2015-10-22 Thread Kristian Høgsberg Kristensen
Here's an updated and expanded ssbo optimization series. I found a bit of low-hanging fruit around dynamic ssbo array indexing. I removed the IMM shortcut in emit_uniformize() and added the constant propagation for the read and write opcodes. The result is the same for constant indexing, and it hel

[Mesa-dev] [PATCH v2 6/8] i965/fs: Drop offset_reg temporary in ssbo load

2015-10-22 Thread Kristian Høgsberg Kristensen
Now that we don't read each component one-by-one, we don't need the temoprary vgrf for the offset. More importantly, this register was type UD while the nir source was type D. This broke copy propagation and left a redundant MOV in the generated code. Signed-off-by: Kristian Høgsberg Kristensen -

[Mesa-dev] [PATCH v2 3/8] i965/fs: Use unsigned immediate 0 when eliminating SHADER_OPCODE_FIND_LIVE_CHANNEL

2015-10-22 Thread Kristian Høgsberg Kristensen
The destination for SHADER_OPCODE_FIND_LIVE_CHANNEL is always a UD register. When we replace the opcode with a MOV, make sure we use a UD immediate 0 so copy propagation doesn't bail because of non-matching types. Signed-off-by: Kristian Høgsberg Kristensen --- src/mesa/drivers/dri/i965/brw_fs.

[Mesa-dev] [PATCH v2 2/8] i965/fs: Read all components of a SSBO field with one send

2015-10-22 Thread Kristian Høgsberg Kristensen
Instead of looping through single-component reads, read all components in one go. Reviewed-by: Iago Toral Quiroga Reviewed-by: Jordan Justen Signed-off-by: Kristian Høgsberg Kristensen --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 25 +++-- 1 file changed, 7 insertions(+),

Re: [Mesa-dev] [RFC 08/21] mesa/extensions: Replace extension::api_set with ::version

2015-10-22 Thread Chad Versace
On Thu 22 Oct 2015, Matt Turner wrote: > On Thu, Oct 22, 2015 at 11:24 AM, Chad Versace wrote: > > On Mon 19 Oct 2015, Nanley Chery wrote: > >> From: Nanley Chery > >> > >> The api_set field has no users outside of _mesa_extension_supported(). > >> Remove it and allow the version field to take it

Re: [Mesa-dev] [PATCH v2 3/8] i965/fs: Use unsigned immediate 0 when eliminating SHADER_OPCODE_FIND_LIVE_CHANNEL

2015-10-22 Thread Matt Turner
Reviewed-by: Matt Turner (though, there's really no reason for copy propagation to be this stupid :) ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH v2] i965/vec4: track and use independently each flag channel

2015-10-22 Thread Matt Turner
On Thu, Oct 22, 2015 at 11:19 AM, Matt Turner wrote: > On Mon, Oct 19, 2015 at 10:38 AM, Alejandro Piñeiro > wrote: >> vec4_live_variables tracks now each flag channel independently, so >> vec4_dead_code_eliminate can update the writemask of null registers, >> based on which component are alive a

Re: [Mesa-dev] [PATCH v2 4/8] i965/fs: Don't uniformize surface index twice

2015-10-22 Thread Matt Turner
On Thu, Oct 22, 2015 at 11:36 AM, Kristian Høgsberg Kristensen wrote: > The emit_untyped_read and emit_untyped_write helpers already uniformize > the surface index argument. No need to do it before calling them. > > Signed-off-by: Kristian Høgsberg Kristensen > --- > src/mesa/drivers/dri/i965/br

Re: [Mesa-dev] [PATCH v2 4/8] i965/fs: Don't uniformize surface index twice

2015-10-22 Thread Kristian Høgsberg
On Thu, Oct 22, 2015 at 12:11 PM, Matt Turner wrote: > On Thu, Oct 22, 2015 at 11:36 AM, Kristian Høgsberg Kristensen > wrote: >> The emit_untyped_read and emit_untyped_write helpers already uniformize >> the surface index argument. No need to do it before calling them. >> >> Signed-off-by: Krist

Re: [Mesa-dev] [RFC 15/21] mesa: Fix EXT_texture_sRGB functionality leaks

2015-10-22 Thread Chad Versace
On Mon 19 Oct 2015, Nanley Chery wrote: > From: Nanley Chery > > Stop leaks into the following contexts: >* GLES in _mesa_base_tex_format() and lookup_view_class(). >* Pre-1.1 GL legacy contexts in all uses. > > Stop allowing compressed sRGB formats as valid formats in GLES3 > contexts.

Re: [Mesa-dev] [RFC 16/21] mesa: Fix ARB_texture_compression_bptc functionality leaks

2015-10-22 Thread Chad Versace
On Tue 20 Oct 2015, Nanley Chery wrote: > On Tue, Oct 20, 2015 at 8:37 AM, Marek Olšák wrote: > > > NAK. I'd like this extension in compatibility contexts. The fact the > > spec requires OpenGL 3.1 was just authors' laziness. > > > > > I had thought it might be the case that some specs may uneces

Re: [Mesa-dev] [PATCH 1/4] i965/fs: Use type-W for immediate in SampleID setup.

2015-10-22 Thread Anuj Phogat
On Wed, Oct 21, 2015 at 10:05 AM, Matt Turner wrote: > Not a functional difference, but register is loaded with a signed > immediate (V) and added to a signed type (D) producing a signed result > (D). > > Also change the type of g0 to allow for compaction. > --- > src/mesa/drivers/dri/i965/brw_fs

Re: [Mesa-dev] [PATCH] radeon/uvd: don't expose HEVC on old UVD hw (v2)

2015-10-22 Thread Christian König
On 22.10.2015 19:50, Alex Deucher wrote: The section for UVD 2 and older was not updated when HEVC support was added. Reported by Kano on irc. v2: integrate the UVD2 and older checks into the main switch statement. Signed-off-by: Alex Deucher Cc: mesa-sta...@lists.freedesktop.org --- src/gal

Re: [Mesa-dev] [PATCH v2 5/8] i965/fs: Avoid scalar destinations in emit_uniformize()

2015-10-22 Thread Matt Turner
On Thu, Oct 22, 2015 at 11:37 AM, Kristian Høgsberg Kristensen wrote: > The scalar destination registers break copy propagation. Instead compute > the results to a regular register and then reference a component when we > later use the result as a source. It might be hairy to get it working, but

[Mesa-dev] [PATCH] radeon/uvd: don't expose HEVC on old UVD hw (v3)

2015-10-22 Thread Alex Deucher
The section for UVD 2 and older was not updated when HEVC support was added. Reported by Kano on irc. v2: integrate the UVD2 and older checks into the main switch statement. v3: handle encode checking as well. Encode is already checked in the top case statement, so drop encode checks in the lower

Re: [Mesa-dev] [PATCH] radeon/uvd: don't expose HEVC on old UVD hw (v3)

2015-10-22 Thread Christian König
On 22.10.2015 21:35, Alex Deucher wrote: The section for UVD 2 and older was not updated when HEVC support was added. Reported by Kano on irc. v2: integrate the UVD2 and older checks into the main switch statement. v3: handle encode checking as well. Encode is already checked in the top case st

[Mesa-dev] [PATCH] i965: check inst->predicate when clearing flag_live at dead code eliminate

2015-10-22 Thread Alejandro Piñeiro
Detected by Matt Turner while reviewing commit a59359ecd22154cc2b3f88bb8c599f21af8a3934 --- src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp | 2 +- src/mesa/drivers/dri/i965/brw_vec4_dead_code_eliminate.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/

Re: [Mesa-dev] Introducing OpenSWR: High performance software rasterizer

2015-10-22 Thread Jose Fonseca
On 22/10/15 00:43, Rowley, Timothy O wrote: On Oct 20, 2015, at 5:58 PM, Jose Fonseca wrote: Thanks for the explanations. It's closer now, but still a bit of gap: $ KNOB_MAX_THREADS_PER_CORE=0 ./gloss SWR create screen! This processor supports AVX2. --> numThreads = 3 1102 frames in 5.002 s

Re: [Mesa-dev] [PATCH v2 5/8] i965/fs: Avoid scalar destinations in emit_uniformize()

2015-10-22 Thread Kristian Høgsberg
On Thu, Oct 22, 2015 at 12:24 PM, Matt Turner wrote: > On Thu, Oct 22, 2015 at 11:37 AM, Kristian Høgsberg Kristensen > wrote: >> The scalar destination registers break copy propagation. Instead compute >> the results to a regular register and then reference a component when we >> later use the r

Re: [Mesa-dev] [PATCH 2/3] i965/fs: Make emit_uniformize a no-op for immediates

2015-10-22 Thread Kristian Høgsberg
On Tue, Oct 20, 2015 at 11:56 AM, Francisco Jerez wrote: > Kristian Høgsberg writes: > >> On Tue, Oct 20, 2015 at 3:16 AM, Francisco Jerez >> wrote: >>> Kristian Høgsberg writes: >>> On Mon, Oct 19, 2015 at 4:19 AM, Francisco Jerez wrote: > Neil Roberts writes: > >> Ju

Re: [Mesa-dev] [RFC 03/21] mesa/extensions: Wrap array entries in macros

2015-10-22 Thread Nanley Chery
On Thu, Oct 22, 2015 at 3:06 AM, Emil Velikov wrote: > On 20 October 2015 at 16:43, Nanley Chery wrote: > > On Tue, Oct 20, 2015 at 8:16 AM, Marek Olšák wrote: > >> > >> Also, the FIXME comment should be on its own line. > >> > > > > I moved it aside to make editing the table easier. However, s

  1   2   >