[Mesa-dev] [RFC PATCH] i965: book space at the end of p->store for SEND opcodes to avoid invalid memory access

2015-10-21 Thread Samuel Iglesias Gonsalvez
The caller to brw_next_insn() could be brw_send_indirect_message() as a result of creating a SEND instruction after the OR used to load the indirect descriptor to an address register. In that case, the pointer to the OR instruction is p->store[p->nr_insn - 1] and as it will be saved to specify add

[Mesa-dev] i965: Invalid memory accesses after resizing brw_codegen's store table

2015-10-21 Thread Samuel Iglesias Gonsalvez
Hello, I have found several invalid memory accesses when running dEQP-GLES31.functional.ssbo.* tests on i965 driver (and gen7+). That invalid memory accesses were unluckily happening when generating the assembly instructions for SSBO stores for different compute shaders. However it looks like thi

Re: [Mesa-dev] [PATCH 7/9] i965: Add mask_control_ex field and handle it in compaction.

2015-10-21 Thread Matt Turner
On Tue, Oct 20, 2015 at 11:46 PM, Iago Toral wrote: > On Mon, 2015-10-19 at 21:09 -0700, Matt Turner wrote: >> Documentation is sparse, but it appears to have existed on G45 and ILK >> as a second bit extension of the mask_control field. Setting the pair of >> bits to 0b11 enables "NoCMask". > > I

Re: [Mesa-dev] [PATCH 7/9] i965: Add mask_control_ex field and handle it in compaction.

2015-10-21 Thread Matt Turner
On Wed, Oct 21, 2015 at 12:50 AM, Matt Turner wrote: > I've got a snapshot of the internal BSpec as PDFs that still has > useful Ironlake information, and that's where the "NoCMask" > information comes from. The G45 docs simply say that 0b11 is > "Reserved", but it's unclear whether that's actuall

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

2015-10-21 Thread Axel Davy
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) && +!(surf->flags & RADEON_SURF_SCANOUT) && +

Re: [Mesa-dev] [PATCH 2/4] mesa: Draw Indirect is not allowed when no vertex array binding exists.

2015-10-21 Thread Matt Turner
On Tue, Oct 20, 2015 at 7:19 AM, Marta Lofstedt wrote: > From: Marta Lofstedt > > OpenGL ES 3.1 spec. section 10.5: > "An INVALID_OPERATION error is generated if zero is bound > to VERTEX_ARRAY_BINDING, DRAW_INDIRECT_BUFFER or to > any enabled vertex array." > > Signed-off-by: Marta Lofstedt > -

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

2015-10-21 Thread Alejandro Piñeiro
Just realized that I sent this email with extra comments off-list. Sending to the list now. Additionally, just a gentle reminder that this is the only patch pending to be reviewed in this series, that have already 5 patches reviewed. Thanks in advance. On 19/10/15 19:38, Alejandro Piñeiro wrote:

Re: [Mesa-dev] [PATCH v2 01/11] i965: Introduce new SHADER_OPCODE_URB_WRITE_SIMD8_MASKED/PER_SLOT opcodes.

2015-10-21 Thread Kenneth Graunke
On Monday, October 12, 2015 02:49:03 PM Kenneth Graunke wrote: > In the vec4 backend, we have a vec4_instruction::urb_write_flags field. > There are many kinds of flags for SIMD4x2 messages. > > However, there are really only two (per-slot offset, use channel masks) > for SIMD8 messages. Rather t

Re: [Mesa-dev] [PATCH 1/2] glsl: Implement a SSBO load optimization pass

2015-10-21 Thread Iago Toral
Hi Curro, On Tue, 2015-10-20 at 14:18 +0300, Francisco Jerez wrote: > Iago Toral writes: > > > On Tue, 2015-10-20 at 13:22 +0300, Francisco Jerez wrote: > >> Iago Toral Quiroga writes: > >> > >> > This allows us to re-use the results of previous ssbo loads in situations > >> > that are safe (i

Re: [Mesa-dev] [PATCH 7/9] i965: Add mask_control_ex field and handle it in compaction.

2015-10-21 Thread Iago Toral
On Wed, 2015-10-21 at 00:50 -0700, Matt Turner wrote: > On Tue, Oct 20, 2015 at 11:46 PM, Iago Toral wrote: > > On Mon, 2015-10-19 at 21:09 -0700, Matt Turner wrote: > >> Documentation is sparse, but it appears to have existed on G45 and ILK > >> as a second bit extension of the mask_control field

Re: [Mesa-dev] [PATCH] i965/fs: Disable opt_sampler_eot for more message types

2015-10-21 Thread Neil Roberts
Ilia Mirkin writes: >> - if (tex_inst->opcode == SHADER_OPCODE_TG4 || >> + if (tex_inst->opcode == SHADER_OPCODE_TXS || >> + tex_inst->opcode == SHADER_OPCODE_LOD || >> + tex_inst->opcode == SHADER_OPCODE_TG4 || >> tex_inst->opcode == SHADER_OPCODE_TG4_OFFSET) > > Do you a

Re: [Mesa-dev] [PATCH] i915/aa: fixing anti-aliasing bug for thinnest width lines

2015-10-21 Thread Ville Syrjälä
On Tue, Oct 20, 2015 at 02:02:21PM +0300, Ville Syrjälä wrote: > On Tue, Oct 20, 2015 at 08:15:32AM +, Predut, Marius wrote: > > > -Original Message- > > > From: Ville Syrjälä [mailto:ville.syrj...@linux.intel.com] > > > Sent: Monday, October 19, 2015 6:04 PM > > > To: Predut, Marius >

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

2015-10-21 Thread Bas Nieuwenhuizen
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 1/2] glsl: Implement a SSBO load optimization pass

2015-10-21 Thread Francisco Jerez
Iago Toral writes: > Hi Curro, > > On Tue, 2015-10-20 at 14:18 +0300, Francisco Jerez wrote: >> Iago Toral writes: >> >> > On Tue, 2015-10-20 at 13:22 +0300, Francisco Jerez wrote: >> >> Iago Toral Quiroga writes: >> >> >> >> > This allows us to re-use the results of previous ssbo loads in >

Re: [Mesa-dev] [PATCH 4/7] glsl: set image access qualifiers for AoA

2015-10-21 Thread Francisco Jerez
Timothy Arceri writes: > On Fri, 2015-10-16 at 10:28 +1100, Timothy Arceri wrote: >> Cc: Francisco Jerez > > Hi Curro, > > Just pinging you on this patch and patch 5. These are the final two > patches remaining unreviewed before I can enable arrays of arrays. > > If your not able to review these

Re: [Mesa-dev] [PATCH 1/6] i965: Correct the comment about fb write payload

2015-10-21 Thread Francisco Jerez
Ben Widawsky writes: > Cc: Francisco Jerez > Signed-off-by: Ben Widawsky > --- > src/mesa/drivers/dri/i965/brw_defines.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_defines.h > b/src/mesa/drivers/dri/i965/brw_defines.h > index 393

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

2015-10-21 Thread Samuel Iglesias Gonsalvez
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.single_struct_array.per_block_buffer.shared_instance_array dEQP-GLES31.functional.ssbo.layout.single_struct_array.per_block_buffer.packed

Re: [Mesa-dev] i965: Invalid memory accesses after resizing brw_codegen's store table

2015-10-21 Thread Iago Toral
Hi, The problem is with code like this (see brw_send_indirect_message): setup = brw_OR(p, addr, desc, brw_imm_ud(0)); send = next_insn(p, BRW_OPCODE_SEND); ... return setup; If next_insn triggers a realloc of the instruction store, then the setup instruction pointer is no longer valid. Notice th

Re: [Mesa-dev] [PATCH 4/7] glsl: set image access qualifiers for AoA

2015-10-21 Thread Timothy Arceri
On Wed, 2015-10-21 at 13:06 +0300, Francisco Jerez wrote: > Timothy Arceri writes: > > > On Fri, 2015-10-16 at 10:28 +1100, Timothy Arceri wrote: > > > Cc: Francisco Jerez > > > > Hi Curro, > > > > Just pinging you on this patch and patch 5. These are the final two > > patches remaining unrevi

[Mesa-dev] [PATCH 1/4] egl/wayland: Use scanout flag for backbuffers

2015-10-21 Thread Axel Davy
The back buffers need to be scanout-able in case the compositor wants to use the buffer (once sent) as display framebuffer. Signed-off-by: Axel Davy --- src/egl/drivers/dri2/platform_wayland.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/egl/drivers/dri2/platfo

[Mesa-dev] [PATCH 4/4] pipe: Add new bind flag for shared resources with flush_resource call

2015-10-21 Thread Axel Davy
Add a new bind flag to differentiate shared resources that must be readable after any flush, or that can afford being readable only after flush_resource. Previously the two cases were mixed, and implictly things were done such that there would be no issues. flush_resource is called for: . st/nine

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

2015-10-21 Thread Axel Davy
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 should be used. Signed-off-by: Axel Davy --- src/gallium/state_trackers/dri/dri2.c | 9 +++-- src/gallium/state

[Mesa-dev] [PATCH 3/4] dri: Add backbuffer use flag

2015-10-21 Thread Axel Davy
Add __DRI_IMAGE_USE_BACKBUFFER to indicate the image is going to be used as a backbuffer. Backbuffers are going to be attached as __DRI_BUFFER_BACK_LEFT or __DRI_BUFFER_BACK_RIGHT. This flag enables the driver to assume the buffer will only be read by an external process after a swapbuffer, in co

Re: [Mesa-dev] [PATCH 2/4] mesa: Draw Indirect is not allowed when no vertex array binding exists.

2015-10-21 Thread Marek Olšák
On Wed, Oct 21, 2015 at 7:16 AM, Tapani Pälli wrote: > On 10/20/2015 08:54 PM, Marek Olšák wrote: >> >> On Tue, Oct 20, 2015 at 4:19 PM, Marta Lofstedt >> wrote: >>> >>> From: Marta Lofstedt >>> >>> OpenGL ES 3.1 spec. section 10.5: >>> "An INVALID_OPERATION error is generated if zero is bound >

Re: [Mesa-dev] [PATCH 4/7] glsl: set image access qualifiers for AoA

2015-10-21 Thread Francisco Jerez
Timothy Arceri writes: > On Wed, 2015-10-21 at 13:06 +0300, Francisco Jerez wrote: >> Timothy Arceri writes: >> >> > On Fri, 2015-10-16 at 10:28 +1100, Timothy Arceri wrote: >> > > Cc: Francisco Jerez >> > >> > Hi Curro, >> > >> > Just pinging you on this patch and patch 5. These are the fin

Re: [Mesa-dev] [PATCH 4/4] pipe: Add new bind flag for shared resources with flush_resource call

2015-10-21 Thread Bas Nieuwenhuizen
On Wed, Oct 21, 2015 at 12:28 PM, Axel Davy wrote: > +/* This flag indicates that in addition to being shared, the resource won't > be > + * read by any external process before we call flush_resource. This allows > + * things like compressing the buffer when drawing, while uncompressing on > + *

Re: [Mesa-dev] [PATCH 2/4] mesa: Draw Indirect is not allowed when no vertex array binding exists.

2015-10-21 Thread Tapani Pälli
On 10/21/2015 01:41 PM, Marek Olšák wrote: On Wed, Oct 21, 2015 at 7:16 AM, Tapani Pälli wrote: On 10/20/2015 08:54 PM, Marek Olšák wrote: On Tue, Oct 20, 2015 at 4:19 PM, Marta Lofstedt wrote: From: Marta Lofstedt OpenGL ES 3.1 spec. section 10.5: "An INVALID_OPERATION error is generated

Re: [Mesa-dev] [PATCH 4/4] pipe: Add new bind flag for shared resources with flush_resource call

2015-10-21 Thread Axel Davy
On 21/10/2015 13:16, Bas Nieuwenhuizen wrote: On Wed, Oct 21, 2015 at 12:28 PM, Axel Davy wrote: +/* This flag indicates that in addition to being shared, the resource won't be + * read by any external process before we call flush_resource. This allows + * things like compressing the buffer whe

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

2015-10-21 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 4/4] pipe: Add new bind flag for shared resources with flush_resource call

2015-10-21 Thread Bas Nieuwenhuizen
My apologies, wrong term. I meant the front buffer of the X server in the non-compositing case. - Bas On Wed, Oct 21, 2015 at 1:26 PM, Axel Davy wrote: > On 21/10/2015 13:16, Bas Nieuwenhuizen wrote: >> >> On Wed, Oct 21, 2015 at 12:28 PM, Axel Davy wrote: >>> >>> +/* This flag indicates that i

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

2015-10-21 Thread Neil Roberts
Bump. Does anybody have some time to review this patch? I think it's the only one holding up landing 16x MSAA support. The following three only have an ack-by but I'm hoping it is reasonable to just push the branch with that. i965/meta: Support 16x MSAA in the meta stencil blit http://patchwork.f

Re: [Mesa-dev] [PATCH 1/2] glsl: Implement a SSBO load optimization pass

2015-10-21 Thread Iago Toral
On Wed, 2015-10-21 at 13:00 +0300, Francisco Jerez wrote: > Iago Toral writes: > > > Hi Curro, > > > > On Tue, 2015-10-20 at 14:18 +0300, Francisco Jerez wrote: > >> Iago Toral writes: > >> > >> > On Tue, 2015-10-20 at 13:22 +0300, Francisco Jerez wrote: > >> >> Iago Toral Quiroga writes: > >>

Re: [Mesa-dev] [PATCH 4/4] pipe: Add new bind flag for shared resources with flush_resource call

2015-10-21 Thread Axel Davy
On 21/10/2015 13:36, Bas Nieuwenhuizen wrote: My apologies, wrong term. I meant the front buffer of the X server in the non-compositing case. - Bas I think only glamor uses mesa for X rendering. Depending on the DDX, the front buffer will either be created with gbm, or imported as an EGLIma

Re: [Mesa-dev] [PATCH 1/2] glsl: Implement a SSBO load optimization pass

2015-10-21 Thread Francisco Jerez
Iago Toral writes: > On Wed, 2015-10-21 at 13:00 +0300, Francisco Jerez wrote: >> Iago Toral writes: >> >> > Hi Curro, >> > >> > On Tue, 2015-10-20 at 14:18 +0300, Francisco Jerez wrote: >> >> Iago Toral writes: >> >> >> >> > On Tue, 2015-10-20 at 13:22 +0300, Francisco Jerez wrote: >> >> >>

Re: [Mesa-dev] [PATCH 2/4] mesa: Draw Indirect is not allowed when no vertex array binding exists.

2015-10-21 Thread Lofstedt, Marta
> -Original Message- > From: mesa-dev [mailto:mesa-dev-boun...@lists.freedesktop.org] On > Behalf Of Tapani Pälli > Sent: Wednesday, October 21, 2015 1:25 PM > To: Marek Olšák > Cc: mesa-dev@lists.freedesktop.org > Subject: Re: [Mesa-dev] [PATCH 2/4] mesa: Draw Indirect is not allowed > whe

[Mesa-dev] [Bug 92437] osmesa: Expose GL entry points for Windows build, via .def file

2015-10-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92437 Jose Fonseca changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Mesa-dev] [PATCH] glsl: join calculate_array_size() and calculate_array_stride()

2015-10-21 Thread Juha-Pekka Heikkila
These helpers are ran for same case the same loop. Here joined their operation so the loop is ran just once. Also fixed out-of-memory condition here. Signed-off-by: Juha-Pekka Heikkila --- src/glsl/linker.cpp | 112 +--- 1 file changed, 37 insertio

Re: [Mesa-dev] [PATCH 2/4] mesa: Draw Indirect is not allowed when no vertex array binding exists.

2015-10-21 Thread Marek Olšák
You still have to check all enabled vertex attributes. If you don't want to loop, use bitmasks. See u_vbuf.c as an example of how to avoid loops. Marek On Oct 21, 2015 2:33 PM, "Lofstedt, Marta" wrote: > > -Original Message- > > From: mesa-dev [mailto:mesa-dev-boun...@lists.freedesktop.o

Re: [Mesa-dev] [PATCH 1/2] glsl: Implement a SSBO load optimization pass

2015-10-21 Thread Iago Toral
On Wed, 2015-10-21 at 14:58 +0300, Francisco Jerez wrote: > Iago Toral writes: > > > On Wed, 2015-10-21 at 13:00 +0300, Francisco Jerez wrote: > >> Iago Toral writes: > >> > >> > Hi Curro, > >> > > >> > On Tue, 2015-10-20 at 14:18 +0300, Francisco Jerez wrote: > >> >> Iago Toral writes: > >> >

Re: [Mesa-dev] [PATCH] mesa/glformats: Undo code changes from _mesa_base_tex_format() move

2015-10-21 Thread Emil Velikov
On 9 October 2015 at 23:35, Nanley Chery wrote: > From: Nanley Chery > > The refactoring commit, c6bf1cd, accidentally reverted cd49b97 > and 99b1f47. These changes caused more code to be added to the > function and removed the existing support for ASTC. This patch > reverts those modifications.

[Mesa-dev] [Bug 92570] 10 bit h264 OMX UVD decode outputs NV12

2015-10-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92570 Bug ID: 92570 Summary: 10 bit h264 OMX UVD decode outputs NV12 Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: n

Re: [Mesa-dev] [PATCH 1/4] mesa: Draw indirect is not allowed if the default VAO is bound.

2015-10-21 Thread Ian Romanick
On 10/20/2015 10:22 AM, Ilia Mirkin wrote: > On Tue, Oct 20, 2015 at 10:19 AM, Marta Lofstedt > wrote: >> From: Marta Lofstedt >> >> From OpenGL ES 3.1 specification, section 10.5: >> "DrawArraysIndirect requires that all data sourced for the >> command, including the DrawArraysIndirectCommand >>

[Mesa-dev] [Bug 92570] 10 bit h264 OMX UVD decode outputs NV12

2015-10-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92570 Christian König changed: What|Removed |Added Status|NEW |ASSIGNED Severity|normal

Re: [Mesa-dev] [PATCH 2/4] mesa: Draw Indirect is not allowed when no vertex array binding exists.

2015-10-21 Thread Ian Romanick
On 10/21/2015 07:32 AM, Lofstedt, Marta wrote: >> -Original Message- >> From: mesa-dev [mailto:mesa-dev-boun...@lists.freedesktop.org] On >> Behalf Of Tapani Pälli >> Sent: Wednesday, October 21, 2015 1:25 PM >> To: Marek Olšák >> Cc: mesa-dev@lists.freedesktop.org >> Subject: Re: [Mesa-dev

Re: [Mesa-dev] [PATCH 3/4] mesa: Draw Indirect return wrong error code on unalinged

2015-10-21 Thread Ian Romanick
On 10/20/2015 01:03 PM, Ilia Mirkin wrote: > On Tue, Oct 20, 2015 at 10:19 AM, Marta Lofstedt > wrote: >> From: Marta Lofstedt >> >> From OpenGL 4.4 specification, section 10.4 and >> Open GL Es 3.1 section 10.5: >> "An INVALID_VALUE error is generated if indirect is not a multiple >> of the size

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

2015-10-21 Thread Ian Romanick
On 09/29/2015 07:57 AM, Neil Roberts wrote: > 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

Re: [Mesa-dev] [PATCHv4 4/7] nir: add shader_clock intrinsic

2015-10-21 Thread Emil Velikov
On 20 October 2015 at 19:58, Connor Abbott wrote: > On Tue, Oct 20, 2015 at 12:55 PM, Emil Velikov > wrote: [snip] >> +/* >> + * Shader clock intrinsic with semantics analogous to the clock2x32ARB() >> + * GLSL intrinsic. >> + * The latter can be used as code motion barrier, which is currently n

[Mesa-dev] [PATCHv5 4/7] nir: add shader_clock intrinsic

2015-10-21 Thread Emil Velikov
From: Emil Velikov v2: Add flags and inline comment/description. v3: None of the input/outputs are variables v4: Drop clockARB reference, relate code motion barrier comment wrt intrinsic flag. v5: Drop the "thus we can eliminate..." comment (Connor) Signed-off-by: Emil Velikov Reviewed-by: Conn

[Mesa-dev] [PATCHv3 5/7] i965/fs: move the fs_reg::smear() from

2015-10-21 Thread Emil Velikov
From: Emil Velikov We're about to reuse get_timestamp() for the nir_intrinsic_shader_clock. In the latter the generalisation does not apply, so move the smear() where needed. This also makes the function analogous to the vec4 one. v2: Tweak the comment - The caller -> We (Matt, Connor). v3: More

[Mesa-dev] [PATCHv3 6/7] i965: Implement nir_intrinsic_shader_clock

2015-10-21 Thread Emil Velikov
From: Emil Velikov v2: - Add a few const qualifiers for good measure. - Drop unneeded retype()s (Matt) - Convert timestamp to SIMD8/16, as fs_visitor::get_timestamp() returns SIMD4 (Connor) v3: - Remove unneeded temporary + MOV (Connor) Signed-off-by: Emil Velikov Reviewed-by: Connor Abbot

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

2015-10-21 Thread Jose Fonseca
This should prevent disparity between features Mesa and LLVM believe are supported by the CPU. http://lists.freedesktop.org/archives/mesa-dev/2015-October/thread.html#96990 Tested on a i7-3720QM w/ LLVM 3.3 and 3.6. --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 34 +

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

2015-10-21 Thread Gustaw Smolarczyk
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/2015-October/thread.html#96990 > > Tested

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

2015-10-21 Thread Roland Scheidegger
Thanks for fixing this up. Reviewed-by: Roland Scheidegger Am 21.10.2015 um 18:25 schrieb Jose Fonseca: > This should prevent disparity between features Mesa and LLVM > believe are supported by the CPU. > > http://lists.freedesktop.org/archives/mesa-dev/2015-October/thread.html#96990 > > Teste

[Mesa-dev] New stable-branch 11.0 candidate pushed

2015-10-21 Thread Emil Velikov
Hello list, The candidate for the Mesa 11.0.4 is now available. Currently we have: - 36 queued - 18 nominated (outstanding) - and 0 rejected/obsolete patches The current queue consists on various mesa, glsl and driver fixes, a few build related patches and an omx bugfix. Take a look at secti

[Mesa-dev] [PATCH 4/4] i965/fs: Emit a single ADD instruction for SET_SAMPLE_ID on Gen8+.

2015-10-21 Thread Matt Turner
Gen8+ lifted the register region restriction that an instruction whose destination spans two registers must have sources that also span two registers. --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/br

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

2015-10-21 Thread Matt Turner
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.cpp | 4 ++-- src/mesa/drivers/dri/i965/brw_fs_generator

[Mesa-dev] [PATCH 2/4] i965/fs: Trim unneeded channels in SampleID setup.

2015-10-21 Thread Matt Turner
The AND and SHR produce a scalar value that we had been replicating across $dispatch_width channels. The immediate MOV produces only four useful channels of data. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/driv

[Mesa-dev] [PATCH 3/4] i965/fs: Drop unnecessary write-enable-all from SET_SAMPLE_ID.

2015-10-21 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index 9a5992e1..15d0430 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_g

Re: [Mesa-dev] [PATCH] mesa/glformats: Undo code changes from _mesa_base_tex_format() move

2015-10-21 Thread Nanley Chery
On Wed, Oct 21, 2015 at 7:23 AM, Emil Velikov wrote: > On 9 October 2015 at 23:35, Nanley Chery wrote: > > From: Nanley Chery > > > > The refactoring commit, c6bf1cd, accidentally reverted cd49b97 > > and 99b1f47. These changes caused more code to be added to the > > function and removed the ex

Re: [Mesa-dev] [PATCH v2 01/11] i965: Introduce new SHADER_OPCODE_URB_WRITE_SIMD8_MASKED/PER_SLOT opcodes.

2015-10-21 Thread Jason Ekstrand
On Wed, Oct 21, 2015 at 1:29 AM, Kenneth Graunke wrote: > On Monday, October 12, 2015 02:49:03 PM Kenneth Graunke wrote: >> In the vec4 backend, we have a vec4_instruction::urb_write_flags field. >> There are many kinds of flags for SIMD4x2 messages. >> >> However, there are really only two (per-s

[Mesa-dev] [Bug 92221] Unintended code changes in _mesa_base_tex_format commit

2015-10-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92221 Nanley Chery changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: [Mesa-dev] [PATCH] i965/fs: Disable opt_sampler_eot for more message types

2015-10-21 Thread Ben Widawsky
On Tue, Oct 20, 2015 at 02:48:41PM -0700, Matt Turner wrote: > On Tue, Oct 20, 2015 at 2:41 PM, Ben Widawsky wrote: > > On Tue, Oct 20, 2015 at 11:56:15AM +0200, Neil Roberts wrote: > >> In bfdae9149e0 I disabled the opt_sampler_eot optimisation for TG4 > >> message types because I found by experi

Re: [Mesa-dev] [PATCH v2 01/11] i965: Introduce new SHADER_OPCODE_URB_WRITE_SIMD8_MASKED/PER_SLOT opcodes.

2015-10-21 Thread Kristian Høgsberg
On Wed, Oct 21, 2015 at 1:29 AM, Kenneth Graunke wrote: > On Monday, October 12, 2015 02:49:03 PM Kenneth Graunke wrote: >> In the vec4 backend, we have a vec4_instruction::urb_write_flags field. >> There are many kinds of flags for SIMD4x2 messages. >> >> However, there are really only two (per-s

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

2015-10-21 Thread Neil Roberts
Ian Romanick writes: >> To fix that this patch makes it use interpolateAtOffset in the blit >> shader whenever 16x MSAA is used and the GL_ARB_gpu_shader5 extension >> is available. This forces it to interpolate the texture coordinates at >> the pixel center to avoid these problematic positions.

[Mesa-dev] [PATCH] i965/vec4: Initialize LOD to 0.0f for textureQueryLevels() and texture().

2015-10-21 Thread Matt Turner
We implement textureQueryLevels (which takes no arguments, save the sampler) using the resinfo message (which takes an argument of LOD). Without initializing it, we'd generate a MOV from the null register to load the LOD argument. Essentially the same logic applies to texture. A vertex shader cann

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

2015-10-21 Thread Kenneth Graunke
On Wednesday, October 21, 2015 10:05:27 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/i9

[Mesa-dev] [PATCH v2 1/7] nir/info: Add more information about geometry shaders

2015-10-21 Thread Jason Ekstrand
v2: Add a uses_streams boolean --- src/glsl/nir/glsl_to_nir.cpp | 4 src/glsl/nir/nir.h | 12 2 files changed, 16 insertions(+) diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp index c9cdf35..9b50a93 100644 --- a/src/glsl/nir/glsl_to_nir.cpp +

[Mesa-dev] [PATCH 6.5/7] i965/gs: Use NIR info for setting up prog_data

2015-10-21 Thread Jason Ekstrand
Previously, we were pulling bits from GL data structures in order to set up the prog_data. However, in this brave new world of NIR, we want to be pulling it out of the NIR shader whenever possible. This way, we can move all this setup code into brw_compile_gs without depending on the old GL stuff

Re: [Mesa-dev] [PATCH v2 1/7] nir/info: Add more information about geometry shaders

2015-10-21 Thread Kenneth Graunke
On Wednesday, October 21, 2015 12:44:31 PM Jason Ekstrand wrote: > v2: Add a uses_streams boolean > > --- > src/glsl/nir/glsl_to_nir.cpp | 4 > src/glsl/nir/nir.h | 12 > 2 files changed, 16 insertions(+) > > diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/g

Re: [Mesa-dev] [PATCH 6.5/7] i965/gs: Use NIR info for setting up prog_data

2015-10-21 Thread Kenneth Graunke
On Wednesday, October 21, 2015 12:45:27 PM Jason Ekstrand wrote: > Previously, we were pulling bits from GL data structures in order to set up > the prog_data. However, in this brave new world of NIR, we want to be > pulling it out of the NIR shader whenever possible. This way, we can move > all

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

2015-10-21 Thread Kenneth Graunke
On Monday, October 19, 2015 02:54:56 PM Emil Velikov wrote: > Ping on these two trivial patches ? > > -Emil Oh, sorry, I thought I'd sent R-bs for these... Both are Reviewed-by: Kenneth Graunke signature.asc Description: This is a digitally signed message part. ___

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

2015-10-21 Thread Marek Olšák
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 should be used. This can't be enforced. EGL_MESA_image_dma_buf_e

[Mesa-dev] [Bug 92570] 10 bit h264 OMX UVD decode outputs NV12

2015-10-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92570 --- Comment #2 from Andy Furniss --- (In reply to Christian König from comment #1) > Yeah, that's a known issue/unimplemented feature. > > On pre Tonga hardware UVD can actually decode 10 bit h264, but still outputs > NV12. So you mean it produ

Re: [Mesa-dev] [PATCH 1/9] i965/vec4: Don't emit MOVs for unused URB slots.

2015-10-21 Thread Emil Velikov
On 20 October 2015 at 05:08, Matt Turner wrote: > Otherwise we'd emit a MOV from the null register (which isn't allowed). > Would you say it's a good idea to push the check down to the MOV() implementation ? If not perhaps we should add an assert() to easily catch cases like these in the future ?

Re: [Mesa-dev] [PATCH 1/9] i965/vec4: Don't emit MOVs for unused URB slots.

2015-10-21 Thread Matt Turner
On Wed, Oct 21, 2015 at 1:52 PM, Emil Velikov wrote: > On 20 October 2015 at 05:08, Matt Turner wrote: >> Otherwise we'd emit a MOV from the null register (which isn't allowed). >> > Would you say it's a good idea to push the check down to the MOV() > implementation ? If not perhaps we should add

Re: [Mesa-dev] [PATCH v2 01/11] i965: Introduce new SHADER_OPCODE_URB_WRITE_SIMD8_MASKED/PER_SLOT opcodes.

2015-10-21 Thread Jason Ekstrand
On Oct 21, 2015 10:28 AM, "Jason Ekstrand" wrote: > > On Wed, Oct 21, 2015 at 1:29 AM, Kenneth Graunke wrote: > > On Monday, October 12, 2015 02:49:03 PM Kenneth Graunke wrote: > >> In the vec4 backend, we have a vec4_instruction::urb_write_flags field. > >> There are many kinds of flags for SIMD

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

2015-10-21 Thread Emil Velikov
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, sorry, I thought I'd sent R-bs for these... > > Both are > Reviewed-by: Kenneth Graunke Thanks Ken. I was wondering if peopl

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

2015-10-21 Thread Ben Widawsky
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 inferior, I am not super attached to

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

2015-10-21 Thread Matt Turner
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, sorry, I thought I'd sent R-bs for these... >> >> Both are >> R

[Mesa-dev] [PATCH] mesa: Enable ASTC in GLES' [NUM_]COMPRESSED_TEXTURE_FORMATS queries

2015-10-21 Thread Nanley Chery
From: Nanley Chery In OpenGL ES, the COMPRESSED_TEXTURE_FORMATS query returns the set of supported specific compressed formats. Since ASTC formats fit within that category, include them in the set and update the NUM_COMPRESSED_TEXTURE_FORMATS query as well. This enables GLES2-based ASTC dEQP tes

[Mesa-dev] [PATCH] svga: fix clip plane regression after recent tgsi_scan change

2015-10-21 Thread Brian Paul
Before the change "tgsi/scan: use properties for clip/cull distance writemasks", the tgsi_shader_info::num_written_culldistance field was a multiple of four, now it's an accurate count. In the svga driver, we need a minor change to the loop test. --- src/gallium/drivers/svga/svga_tgsi_vgpu10.c |

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

2015-10-21 Thread Rowley, Timothy O
> On Oct 20, 2015, at 2:03 PM, Roland Scheidegger wrote: > > Certainly looks interesting... > From a high level point of view, seems quite similar to llvmpipe (both > tile based, using llvm for jitting shaders, ...). Of course llvmpipe > isn't well suited for these kind of workloads (the most im

[Mesa-dev] [PATCH] vbo: optimize vertex copying when 'wrapping'

2015-10-21 Thread Brian Paul
Instead of calling memcpy() 'n' times, we can do it all at once since the source and dest regions are all contiguous. --- src/mesa/vbo/vbo_exec_api.c | 16 +++- src/mesa/vbo/vbo_save_api.c | 15 +++ 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/mesa/v

[Mesa-dev] [PATCH 2/4] drivers/common: use _mesa_RasterPos instead of _tnl_RasterPos

2015-10-21 Thread Brian Paul
--- src/mesa/drivers/common/driverfuncs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index 3d1fccb..752aaf6 100644 --- a/src/mesa/drivers/common/driverfuncs.c +++ b/src/mesa/drivers/common/dri

[Mesa-dev] [PATCH 3/4] tnl: remove t_rasterpos.c

2015-10-21 Thread Brian Paul
--- src/mesa/Makefile.sources | 1 - src/mesa/tnl/t_rasterpos.c | 478 - 2 files changed, 479 deletions(-) delete mode 100644 src/mesa/tnl/t_rasterpos.c diff --git a/src/mesa/Makefile.sources b/src/mesa/Makefile.sources index 34fb446..4bcaa62 100644

[Mesa-dev] [PATCH 1/4] mesa: copy rasterpos evaluation code into core Mesa

2015-10-21 Thread Brian Paul
We'll remove it from the tnl module next. By lifting this code into core Mesa we can use it from the gallium state tracker. --- src/mesa/main/rastpos.c | 441 src/mesa/main/rastpos.h | 3 + 2 files changed, 444 insertions(+) diff --git a/src/mes

[Mesa-dev] [PATCH 4/4] st/mesa: use _mesa_RasterPos() when possible

2015-10-21 Thread Brian Paul
The st_RasterPos() function goes to great pains to implement the rasterpos transformation. It basically uses gallium's draw module to execute the vertex shader to draw a point, then capture that point's attributes. But glRasterPos isn't typically used with a vertex shader so we can usually use th

[Mesa-dev] [PATCH] mesa: check for unchanged line width before error checking

2015-10-21 Thread Brian Paul
--- src/mesa/main/lines.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/lines.c b/src/mesa/main/lines.c index c020fb3..93b80af 100644 --- a/src/mesa/main/lines.c +++ b/src/mesa/main/lines.c @@ -45,6 +45,10 @@ _mesa_LineWidth( GLfloat width ) if (MESA_

Re: [Mesa-dev] [PATCH 2/6] i965/sched: write-after-read dependencies are free

2015-10-21 Thread Jason Ekstrand
On Fri, Oct 2, 2015 at 2:37 PM, Connor Abbott wrote: > Although write-after-write dependencies have the same latency as > read-after-write dependencies due to how the register scoreboard works, > write-after-read dependencies aren't checked by the EU at all, so > they're purely a constraint on how

Re: [Mesa-dev] [PATCH 3/6] i965: always run the post-RA scheduler

2015-10-21 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand Let's add the perf numbers and get this pushed. On Sat, Oct 3, 2015 at 6:13 PM, Jason Ekstrand wrote: > On Sat, Oct 3, 2015 at 11:13 AM, Jason Ekstrand wrote: >> On Fri, Oct 2, 2015 at 2:37 PM, Connor Abbott wrote: >>> Before, we would only do scheduling after regi

[Mesa-dev] [PATCH 0/9] i965 assembly validator

2015-10-21 Thread Matt Turner
Inspired by a bug this summer, I've written a basic assembly validation pass. The series currently checks only three things: - that instruction sources are not null (when they shouldn't be); - that the Gen supports the instruction opcode; and - that the various accumulator restrictions ar

[Mesa-dev] [PATCH 1/9] ralloc: Set *start in ralloc_vasprintf_rewrite_tail() if str is NULL.

2015-10-21 Thread Matt Turner
We were leaving it undefined, even though we were writing a string to *str. --- src/util/ralloc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/ralloc.c b/src/util/ralloc.c index e07fce7..bb4cf96 100644 --- a/src/util/ralloc.c +++ b/src/util/ralloc.c @@ -499,6 +499,7 @@ ralloc_vaspr

[Mesa-dev] [PATCH 5/9] i965: Combine assembly annotations if possible.

2015-10-21 Thread Matt Turner
Often annotations are identical between sets of consecutive instructions. We can perhaps avoid some memory allocations by reusing the previous annotation. --- src/mesa/drivers/dri/i965/intel_asm_annotation.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/s

[Mesa-dev] [PATCH 3/9] i965: Don't consider control flow instructions to have sources.

2015-10-21 Thread Matt Turner
And why did IFF have a destination? I suspect that once upon a time the disassembler used this information to know which fields to find the jump targets in. The jump targets have moved, so the disassembler has to know how to handle these per-generation anyway. --- src/mesa/drivers/dri/i965/brw_di

[Mesa-dev] [PATCH 9/9] i965: Check accumulator restrictions.

2015-10-21 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_eu_validate.c | 244 1 file changed, 244 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_eu_validate.c b/src/mesa/drivers/dri/i965/brw_eu_validate.c index eb57962..3d16f90 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_valida

[Mesa-dev] [PATCH 6/9] i965: Add annotation_insert_error() and support for printing errors.

2015-10-21 Thread Matt Turner
Will allow annotations to contain error messages (indicating an instruction violates a rule for instance) that are printed after the disassembly of the block. --- src/mesa/drivers/dri/i965/intel_asm_annotation.c | 60 src/mesa/drivers/dri/i965/intel_asm_annotation.h | 7 +

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

2015-10-21 Thread Matt Turner
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 overlap so it's probably not needed. --- src/mesa/drivers/dr

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

2015-10-21 Thread Matt Turner
Initially just checks that sources are non-NULL, which would have alerted us to the problem fixed by commit 6c846dc5. --- src/mesa/drivers/dri/i965/Makefile.sources | 1 + src/mesa/drivers/dri/i965/brw_eu.h | 4 + src/mesa/drivers/dri/i965/brw_eu_validate.c | 150 +

[Mesa-dev] [PATCH 8/9] i965: Check instructions appear only on supported hardware.

2015-10-21 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_eu_validate.c | 257 1 file changed, 257 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_eu_validate.c b/src/mesa/drivers/dri/i965/brw_eu_validate.c index 85d4c19..eb57962 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_valida

[Mesa-dev] [PATCH 4/9] i965: Set annotation_info's mem_ctx.

2015-10-21 Thread Matt Turner
It was being memset to 0 previously. --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 2 +- src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 2 +- src/mesa/drivers/dri/i965/intel_asm_annotation.c | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i

  1   2   >