Re: [Mesa-dev] [PATCH v2 3/6] i965/vec4: Don't emit scratch reads for a spilled register we have just written

2015-08-04 Thread Francisco Jerez
Iago Toral writes: > On Fri, 2015-07-31 at 13:12 +0300, Francisco Jerez wrote: >> Iago Toral writes: >> >> > On Thu, 2015-07-30 at 17:08 +0300, Francisco Jerez wrote: >> >> Iago Toral Quiroga writes: >> >> >> >> > When we have c

Re: [Mesa-dev] [PATCH v2 3/6] i965/vec4: Don't emit scratch reads for a spilled register we have just written

2015-08-04 Thread Francisco Jerez
Iago Toral writes: > On Thu, 2015-07-30 at 17:08 +0300, Francisco Jerez wrote: >> Iago Toral Quiroga writes: >> >> > When we have code such as this: >> > >> > mov vgrf1.0.x:F, vgrf2.:F >> > mov vgrf3.0.x:F, vgrf1.:F >> > .

Re: [Mesa-dev] [PATCH 08/14] i965: Define and initialize image parameter structure.

2015-08-04 Thread Francisco Jerez
Ping. Some 10-20 other ARB_shader_image_load_store patches are blocking on this patch I've been carrying around since I originally sent it for review in Dec 2013. Francisco Jerez writes: > This will be used to pass image meta-data to the shader when we cannot > use typed surfac

Re: [Mesa-dev] [PATCH 2/2] i965: Fix brw_memory_barrier() for SKL.

2015-08-04 Thread Francisco Jerez
Francisco Jerez writes: > This works as-is on SKL, only the assertion needs to be relaxed. I'm going to push this straightforward series I sent back in May without review if there have been no complaints by the end of the week. > --- > src/mesa/drivers/dri/i965/brw_program.c |

Re: [Mesa-dev] [PATCH 08/14] i965: Define and initialize image parameter structure.

2015-08-04 Thread Francisco Jerez
Francisco Jerez writes: > Ping. Some 10-20 other ARB_shader_image_load_store patches are blocking > on this patch I've been carrying around since I originally sent it for > review in Dec 2013. > Hint for reviewers: A quick comparison with "i965/fs: Import image memory o

Re: [Mesa-dev] [PATCH v3 (part2) 09/56] glsl: Add parser/compiler support for unsized array's length()

2015-08-05 Thread Francisco Jerez
Iago Toral writes: > On Tue, 2015-08-04 at 16:04 -0700, Jordan Justen wrote: >> On 2015-08-04 15:12:06, Jordan Justen wrote: >> > On 2015-07-14 00:46:11, Iago Toral Quiroga wrote: >> > > From: Samuel Iglesias Gonsalvez >> > > >> > > It also creates unop and triop expressions to tell the driver

Re: [Mesa-dev] [PATCH 14/20] i965: Implement logic to set up and upload an image uniform.

2015-08-05 Thread Francisco Jerez
"Pohjolainen, Topi" writes: > On Wed, Aug 05, 2015 at 10:36:09AM +0300, Pohjolainen, Topi wrote: >> On Tue, Jul 21, 2015 at 07:38:49PM +0300, Francisco Jerez wrote: >> > v2: Move the image_params array back to brw_stage_prog_data. >> > --- >> >

Re: [Mesa-dev] [PATCH] clover: fix llvm 3.5 build error

2015-08-05 Thread Francisco Jerez
Zoltán Gilián writes: >> thanks, this fixes the build for me. > > Should I commit this marking you as reviewer? "fixes the build for me" hardly qualifies as a Tested-by. Also I've noticed that you've pushed a few patches [1][2][3][4] without Reviewed-by tag. Please stop. [1] d2cd2c69b20fcb3f1

[Mesa-dev] [PATCH 2/2] i965/fs: Lower arithmetic instructions with register regions of unsupported width.

2015-08-05 Thread Francisco Jerez
This extends the SIMD lowering pass to enforce the hardware limitation that no directly-addressed source may read more than 2 physical GRFs. One can easily go over this limit when doing 64-bit arithmetic (e.g. FP64 or extended-precision integer MULs) or SIMD32, so it's nice to be able to just emit

[Mesa-dev] [PATCH 1/2] i965/fs: Fix fs_inst::regs_read() for sources in the ATTR file.

2015-08-05 Thread Francisco Jerez
Otherwise it would crash on Gen8 with scalar VS. The issue can easily be reproduced with the following patch, but I don't see any reason why it shouldn't be possible to end up with an ATTR argument here even without it. CC: mesa-sta...@lists.freedesktop.org --- src/mesa/drivers/dri/i965/brw_fs.c

[Mesa-dev] [PATCH 5/5] i965/fs: Implement nir_op_imul/umul_high in terms of MULH.

2015-08-05 Thread Francisco Jerez
And get rid of another no16() call. --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 33 ++-- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index e922a85..ee964a0 100644

[Mesa-dev] [PATCH 4/5] i965/fs: Lower the MULH virtual instruction.

2015-08-05 Thread Francisco Jerez
Translate MULH into the MUL/MACH sequence. This does roughly the same thing that nir_emit_alu() used to do but we can now handle 16-wide by taking advantage of the SIMD lowering pass. The force_sechalf workaround near the bottom is required because the SIMD lowering pass will emit instructions wi

[Mesa-dev] [PATCH 3/5] i965/fs: Indent the implementation of 32x32-bit MUL lowering by one level.

2015-08-05 Thread Francisco Jerez
In order to make room for the code that will lower the MULH virtual instruction. Also move the hardware generation and execution type checks into the same branch, they are going to have to be different for MULH. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 265 ++- 1

[Mesa-dev] [PATCH 2/5] i965/fs: Lower 32x32 bit multiplication on BXT.

2015-08-05 Thread Francisco Jerez
AFAIK BXT has the same annoying alignment limitation as CHV on the source register regions of 32x32 bit MULs, give it the same treatment. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mes

[Mesa-dev] [PATCH 1/5] i965: Define virtual instruction to calculate the high 32 bits of a multiply.

2015-08-05 Thread Francisco Jerez
This instruction will translate to the MUL/MACH sequence that computes the high 32-bits of the result of a 64-bit multiply. Before Gen8 integer operations that used the accumulator were limited to 8-wide, but the SIMD lowering pass can easily be hooked up to sidestep this limitation, we just need

Re: [Mesa-dev] [PATCH 3/5] i965/fs: Indent the implementation of 32x32-bit MUL lowering by one level.

2015-08-05 Thread Francisco Jerez
Matt Turner writes: > On Wed, Aug 5, 2015 at 10:52 AM, Francisco Jerez > wrote: >> In order to make room for the code that will lower the MULH virtual >> instruction. Also move the hardware generation and execution type >> checks into the same branch, they are going

Re: [Mesa-dev] [PATCH v3] clover: stub missing CL 1.2 functions

2015-08-06 Thread Francisco Jerez
EdB writes: > As sugested by Tom a long time ago > and in order to be able to create Piglit tests > > v2: > replace NOT_SUPPORTED_BY_CL_1_1 macro with an inline function > remove extra space in clLinkProgram arg > > v3: > use __func__ > Hah! Using __func__ *is* an argument to prefer a macro over

Re: [Mesa-dev] [PATCHv2 08/14] i965: Define and initialize image parameter structure.

2015-08-06 Thread Francisco Jerez
"Pohjolainen, Topi" writes: > On Wed, Aug 05, 2015 at 12:11:02PM +0300, Pohjolainen, Topi wrote: >> On Mon, Jul 20, 2015 at 07:17:48PM +0300, Francisco Jerez wrote: >> > This will be used to pass image meta-data to the shader when we cannot >> > use typed s

Re: [Mesa-dev] [PATCHv2 09/14] i965: Reserve enough parameter entries for all image uniforms used in the program.

2015-08-06 Thread Francisco Jerez
"Pohjolainen, Topi" writes: > On Mon, Jul 20, 2015 at 07:23:00PM +0300, Francisco Jerez wrote: >> v2: Add CS support. >> --- >> src/mesa/drivers/dri/i965/brw_cs.cpp | 3 ++- >> src/mesa/drivers/dri/i965/brw_gs.c | 1 + >> src/mesa/drivers/dri/i965/

Re: [Mesa-dev] [PATCHv2 08/14] i965: Define and initialize image parameter structure.

2015-08-06 Thread Francisco Jerez
Francisco Jerez writes: > "Pohjolainen, Topi" writes: > >> On Wed, Aug 05, 2015 at 12:11:02PM +0300, Pohjolainen, Topi wrote: >>> On Mon, Jul 20, 2015 at 07:17:48PM +0300, Francisco Jerez wrote: >>> > This will be used to pass image meta-data to the sh

Re: [Mesa-dev] [PATCH v3 2/4] i965/vec4: do not predicate scratch writes for BRW_OPCODE_SEL instructions

2015-08-06 Thread Francisco Jerez
*write = SCRATCH_WRITE(dst, temp, index); > - write->predicate = inst->predicate; > + if (inst->opcode != BRW_OPCODE_SEL) > + write->predicate = inst->predicate; > write->ir = inst->ir; > write->annotation = inst->annotation; >

Re: [Mesa-dev] [PATCH v3 3/4] i965/vec4: Fix indentation in vec4_visitor::evaluate_spill_costs

2015-08-06 Thread Francisco Jerez
ll[inst->src[i].reg] = true; > } > - if (inst->dst.file == GRF) > - no_spill[inst->dst.reg] = true; > - break; > + if (inst->dst.file == GRF) > +no_spill[inst->dst.reg] = true; > + break; > >

Re: [Mesa-dev] [PATCH v2 3/6] i965/vec4: Don't emit scratch reads for a spilled register we have just written

2015-08-06 Thread Francisco Jerez
Francisco Jerez writes: > Iago Toral writes: > >> On Fri, 2015-07-31 at 13:12 +0300, Francisco Jerez wrote: >>> Iago Toral writes: >>> >>> > On Thu, 2015-07-30 at 17:08 +0300, Francisco Jerez wrote: >>> >> Iago Toral Quiroga

Re: [Mesa-dev] [PATCH v3 4/4] i965/vec4: Don't unspill the same register in consecutive instructions

2015-08-06 Thread Francisco Jerez
Iago Toral Quiroga writes: > If we have spilled/unspilled a register in the current instruction, avoid > emitting unspills for the same register in the same instruction or consecutive > instructions following the current one as long as they keep reading the > spilled > register. This should allo

Re: [Mesa-dev] [PATCH v4 (part2) 02/59] i965/vec4: Import helpers to convert vectors into arrays and back.

2015-08-07 Thread Francisco Jerez
Iago Toral writes: > On Wed, 2015-08-05 at 10:29 +0200, Iago Toral Quiroga wrote: >> From: Francisco Jerez >> >> These functions handle the conversion of a vec4 into the form expected >> by the dataport unit in message and message return payloads. The >>

Re: [Mesa-dev] [PATCH v3 4/4] i965/vec4: Don't unspill the same register in consecutive instructions

2015-08-07 Thread Francisco Jerez
Iago Toral writes: > On Thu, 2015-08-06 at 18:27 +0300, Francisco Jerez wrote: >> Iago Toral Quiroga writes: >> >> > If we have spilled/unspilled a register in the current instruction, avoid >> > emitting unspills for the same register in the same

Re: [Mesa-dev] [PATCH v4] clover: stub missing CL 1.2 functions

2015-08-07 Thread Francisco Jerez
"Serge Martin (EdB)" writes: > As sugested by Tom a long time ago > and in order to be able to create Piglit tests > > v2: > replace NOT_SUPPORTED_BY_CL_1_1 macro with an inline function > remove extra space in clLinkProgram arg > > v3: > use __func__ > > v4: > back to a macro, it make more sense

Re: [Mesa-dev] clover: image resource management

2015-08-07 Thread Francisco Jerez
Zoltán Gilián writes: > Hi! > > I've noticed that clover::kernel::image_wr_argument::unbind destroys > the surface. What kind of behaviour is expected from the driver to > allow later access to the resource (e.g. by clEnqueueReadImage)? It only destroys the cached view into the image, of course

Re: [Mesa-dev] [PATCH 1/2] i965: Add SKL support to brw_miptree_get_horizontal_slice_pitch().

2015-08-08 Thread Francisco Jerez
exture_image_param() a bit more so I'd rather do what AFAIUI is the right thing here. > > On Wed, May 13, 2015 at 9:37 AM, Francisco Jerez > wrote: >> --- >> src/mesa/drivers/dri/i965/brw_tex_layout.c | 4 +--- >> 1 file changed, 1 insertion(+), 3 deletions(-) >&g

Re: [Mesa-dev] [PATCHv2 07/14] i965: Implement surface state set-up for shader images.

2015-08-08 Thread Francisco Jerez
Jason Ekstrand writes: > On Wed, May 13, 2015 at 9:43 AM, Francisco Jerez > wrote: >> v2: Add SKL support. >> --- >> src/mesa/drivers/dri/i965/brw_context.h | 2 + >> src/mesa/drivers/dri/i965/brw_surface_formats.c | 109 >> +

Re: [Mesa-dev] [PATCH] clover: Properly initialize LLVM targets when linking with component libs

2015-08-08 Thread Francisco Jerez
Tom Stellard writes: > Calls to LLVMIntialize* fail when we are linking against individual > component libraries rather than one large shared object, because > we only include component libraries that are required by the drivers. > > We need to make sure to only initialize the targets that we nee

Re: [Mesa-dev] [PATCH v4 (part2) 49/59] glsl: Do not allow assignments to read-only variables

2015-08-08 Thread Francisco Jerez
Iago Toral writes: > On Wed, 2015-08-05 at 22:22 +1000, Timothy Arceri wrote: >> On Wed, 2015-08-05 at 13:45 +0200, Iago Toral wrote: >> > On Wed, 2015-08-05 at 20:04 +1000, Timothy Arceri wrote: >> > > On Wed, 2015-08-05 at 10:30 +0200, Iago Toral Quiroga wrote: >> > > > --- >> > > > src/glsl/a

Re: [Mesa-dev] [PATCH 1/2] i965: Add SKL support to brw_miptree_get_horizontal_slice_pitch().

2015-08-11 Thread Francisco Jerez
Jason Ekstrand writes: > On Sat, Aug 8, 2015 at 2:58 AM, Francisco Jerez wrote: >> Jason Ekstrand writes: >> >>> I'm not a huge fan of this patch. Really, given how complicated 3-D >>> textures are on SKL, there really is no sensible horizontal sli

Re: [Mesa-dev] [PATCH 2/5] i965/fs: Lower 32x32 bit multiplication on BXT.

2015-08-11 Thread Francisco Jerez
he alignment rule, I guess the failure may be non-deterministic. What stepping of BXT did you test this on? > Regards, > - Neil > > Francisco Jerez writes: > >> AFAIK BXT has the same annoying alignment limitation as CHV on the >> source register regions of 32x32 bit MUL

Re: [Mesa-dev] [PATCHv2 07/14] i965: Implement surface state set-up for shader images.

2015-08-11 Thread Francisco Jerez
Jason Ekstrand writes: > On Sat, Aug 8, 2015 at 4:04 AM, Francisco Jerez wrote: >> Jason Ekstrand writes: >> >>> On Wed, May 13, 2015 at 9:43 AM, Francisco Jerez >>> wrote: >>>> v2: Add SKL support. >>>> --- >>>> sr

Re: [Mesa-dev] [PATCH 2/5] i965/fs: Lower 32x32 bit multiplication on BXT.

2015-08-11 Thread Francisco Jerez
Francisco Jerez writes: > Neil Roberts writes: > >> Are you sure this patch is necessary? The documentation for the multiply >> instruction on BDW+ says: >> >> SourceType : *D >> DestinationType :*D >> Project :EXCLUDE(CHV

Re: [Mesa-dev] [PATCH 5/5] i965: enable GL_ARB_shader_image_size

2015-08-11 Thread Francisco Jerez
Matt Turner writes: > On Tue, Aug 11, 2015 at 9:43 AM, Martin Peres > wrote: >> Signed-off-by: Martin Peres >> --- >> docs/GL3.txt | 4 ++-- >> docs/relnotes/11.0.0.html| 1 + >> src/mesa/drivers/dri/i965/intel_extensions.c | 1 + >> 3 files

Re: [Mesa-dev] [PATCH] mesa/main: Add GL_IMAGE_FORMAT_COMPATIBILITY_TYPE to glGetTexParameterfv

2015-08-12 Thread Francisco Jerez
atCompatibilityType; > + break; > + Heh, I had exactly the same patch sitting in a local branch of GLES fixes for image_load_store, but you beat me to it, this patch is: Reviewed-by: Francisco Jerez >default: > goto invalid_pname; > } > --

Re: [Mesa-dev] [PATCH] i965/fs: Clamp image array indices to the array bounds on IVB.

2015-08-12 Thread Francisco Jerez
Timothy Arceri writes: > On Mon, 2015-07-27 at 16:01 +0300, Francisco Jerez wrote: >> This fixes the spec@arb_shader_image_load_store@invalid index bounds >> piglit tests on IVB, which were causing a GPU hang and then a crash >> due to the invalid binding table index resu

Re: [Mesa-dev] [PATCH 2/5] i965/fs: Lower 32x32 bit multiplication on BXT.

2015-08-12 Thread Francisco Jerez
patch and I'm not suggesting we do anything now. > Honestly I'm also not 100% sure if this restriction really applies to all BXT hardware or if it's specific to some preproduction steppings -- The documentation seems to imply the former, but I guess it could be wrong. >

Re: [Mesa-dev] [PATCH 2/5] i965/fs: Lower 32x32 bit multiplication on BXT.

2015-08-12 Thread Francisco Jerez
Francisco Jerez writes: > Neil Roberts writes: > >> Ok, that makes sense, thanks for the detailed explanation. I think >> you're right, given the extra restrictions avoiding the integer dword >> multiplication seems like the simplest solution. >> >> I c

Re: [Mesa-dev] [PATCH 1/5] main: add extension GL_ARB_shader_image_size

2015-08-13 Thread Francisco Jerez
Martin Peres writes: > Signed-off-by: Martin Peres Reviewed-by: Francisco Jerez > --- > src/glsl/glcpp/glcpp-parse.y| 3 +++ > src/glsl/glsl_parser_extras.cpp | 1 + > src/glsl/glsl_parser_extras.h | 2 ++ > src/mesa/main/extensions.c | 1 + > src/mesa/main/

Re: [Mesa-dev] [PATCH v2 2/5] glsl: add support for the imageSize builtin

2015-08-13 Thread Francisco Jerez
Martin Peres writes: > The code is heavily inspired from Francisco Jerez's code supporting the > image_load_store extension. > > I moved out image_types[] out of builtin_builder::add_image_function to > share it with the newly-added builtin_builder::add_image_size_functions. > > Backends willing

Re: [Mesa-dev] [PATCH] st/clover: Fix build against LLVM 3.8 SVN r244928

2015-08-14 Thread Francisco Jerez
m/include/llvm/Support/raw_ostream.h:512:8: > note: declared here >void flush() = delete; > ^ > Makefile:862: recipe for target 'llvm/libclllvm_la-invocation.lo' failed > > Signed-off-by: Michel Dänzer Thanks, Reviewed-by: Francisco Jerez > --- >

[Mesa-dev] [PATCH] i965: Don't tell the hardware about our UAV access.

2015-08-14 Thread Francisco Jerez
The hardware documentation relating to the UAV HW-assisted coherency mechanism and UAV access enable bits is scarce and sometimes contradictory, and there's quite some guesswork behind this commit, so let me summarize the background first: HSW and later hardware have infrastructure to support a str

Re: [Mesa-dev] [PATCH] i965: Don't tell the hardware about our UAV access.

2015-08-15 Thread Francisco Jerez
ented using the thread dependency mechanism which is independent of the UAV coherency stuff. BTW I wasn't aware that the extension had become ARB. > Roland > > > > Am 14.08.2015 um 18:27 schrieb Francisco Jerez: >> The hardware documentation relating to the UAV HW-assisted cohe

Re: [Mesa-dev] [RFC 2/2] i965: add support for image AoA

2015-08-15 Thread Francisco Jerez
Timothy Arceri writes: > On Wed, 2015-08-12 at 19:39 +1000, Timothy Arceri wrote: >> Cc: Francisco Jerez >> --- >> This patch works for direct indexing of images, but I'm having some trouble >> getting indirect to work. >> >> For example for: &

Re: [Mesa-dev] [RFC 2/2] i965: add support for image AoA

2015-08-16 Thread Francisco Jerez
Timothy Arceri writes: > On Sat, 2015-08-15 at 17:33 +0300, Francisco Jerez wrote: >> Timothy Arceri writes: >> >> > On Wed, 2015-08-12 at 19:39 +1000, Timothy Arceri wrote: >> > > Cc: Francisco Jerez >> > > --- >> > > This pa

Re: [Mesa-dev] [PATCH 09/12] i965/fs: make SIMD-splitting respect the original stride/offset

2015-08-17 Thread Francisco Jerez
Connor Abbott writes: > On Mon, Aug 17, 2015 at 12:09 AM, Pohjolainen, Topi > wrote: >> On Fri, Aug 14, 2015 at 03:30:18PM -0700, Connor Abbott wrote: >>> In some cases, we need to emit ALU instructions with a certain stride >>> due to a HW limitation. When splitting that instruction, we need to

Re: [Mesa-dev] [RFC 2/2] i965: add support for image AoA

2015-08-17 Thread Francisco Jerez
Timothy Arceri writes: > On Sun, 2015-08-16 at 13:15 +0300, Francisco Jerez wrote: >> Timothy Arceri writes: >> >> > On Sat, 2015-08-15 at 17:33 +0300, Francisco Jerez wrote: >> > > Timothy Arceri writes: >> > > >> > > > On Wed,

[Mesa-dev] [PATCH 01/25] mesa: Rename MaxCombinedImageUnitsAndFragmentOutputs to MaxCombinedShaderOutputResources.

2015-08-17 Thread Francisco Jerez
The name of both the GLSL built-in variable and the glGetInteger param with the same value changed in GLSL ES 3.1 and GL 4.5. Its semantics also changed slightly, since the limit now also takes into account the number of SSBs in use. Switch our internal data structures to the up-to-date name. ---

[Mesa-dev] Implement GLES 3.1 image load/store and OES_shader_image_atomic.

2015-08-17 Thread Francisco Jerez
This series implements a number of differences I've found while comparing the GLES 3.1 and desktop GL shader image APIs. Most of it is about taking into account additional restrictions for the GLES API, but there's also some new functionality (see PATCH 09 and 23). Together with Igalia's SSBO bra

[Mesa-dev] [PATCH 08/25] glsl: Forbid non-constant image array indexing in GLSL ES 3.1.

2015-08-17 Thread Francisco Jerez
--- src/glsl/ast_array_index.cpp | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/glsl/ast_array_index.cpp b/src/glsl/ast_array_index.cpp index 27e84d1..ae399f0 100644 --- a/src/glsl/ast_array_index.cpp +++ b/src/glsl/ast_array_index.cpp @@ -290,6 +290,21 @@ _mesa_ast_array

[Mesa-dev] [PATCH 11/25] glsl: Implement GLSL ES restriction on images being either readonly or writeonly.

2015-08-17 Thread Francisco Jerez
--- src/glsl/ast_to_hir.cpp | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 4d279f6..ff57ec3 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2469,6 +2469,24 @@ apply_image_qualifier_to_variable(c

[Mesa-dev] [PATCH 05/25] mesa: Initialize image unit state to different defaults in GLES.

2015-08-17 Thread Francisco Jerez
There is no GL_R8 image format in GLES, according to the state table 20.32 of the GLES 3.1 spec the default value should be GL_R32UI. --- src/mesa/main/shaderimage.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c i

[Mesa-dev] [PATCH 04/25] mesa: Reset image unit state to the default values when a bound image is deleted.

2015-08-17 Thread Francisco Jerez
The ES31-CTS.shader_image_load_store.basic-api-bind conformance test expects the whole image unit state to be reset when the bound texture object is deleted. The ARB_shader_image_load_store extension is rather vague regarding what should happen with image unit state other than the texture object i

[Mesa-dev] [PATCH 03/25] mesa: Reject image formats not supported by GLES.

2015-08-17 Thread Francisco Jerez
--- src/mesa/main/shaderimage.c | 67 +++-- 1 file changed, 65 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c index 67f1716..2d86931 100644 --- a/src/mesa/main/shaderimage.c +++ b/src/mesa/main/shaderima

[Mesa-dev] [PATCH 20/25] glsl: Parse the allowed image format qualifiers in GLSL ES 3.1.

2015-08-17 Thread Francisco Jerez
This includes the minimum required desktop/ES GLSL version in the format qualifier table in anticipation of new GLSL versions extending the set of supported image formats. According to section 4.4.7 of the GLSL ES 3.1 spec: "The format layout qualifier identifiers for image variable declarations

[Mesa-dev] [PATCH 15/25] glsl: Accept supported image types in GLSL ES 3.1.

2015-08-17 Thread Francisco Jerez
These are a subset of the image types supported by desktop GL, excluding 1D, 1D array, rectangle, buffer, cube array, 2D MS and 2D MS array texture targets. --- src/glsl/builtin_types.cpp | 24 src/glsl/glsl_lexer.ll | 24 2 files changed, 24 i

[Mesa-dev] [PATCH 16/25] glsl: Accept atomic_uint type in GLSL ES 3.1.

2015-08-17 Thread Francisco Jerez
--- src/glsl/builtin_types.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/builtin_types.cpp b/src/glsl/builtin_types.cpp index c777f6e..9cf198f 100644 --- a/src/glsl/builtin_types.cpp +++ b/src/glsl/builtin_types.cpp @@ -253,7 +253,7 @@ const static struct builtin

[Mesa-dev] [PATCH 18/25] glsl: Define image-related built-in constants required by GLSL ES 3.1.

2015-08-17 Thread Francisco Jerez
--- src/glsl/builtin_variables.cpp | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index 4966ba3..dd7804f 100644 --- a/src/glsl/builtin_variables.cpp +++ b/src/glsl/builtin_variables.cpp @@

[Mesa-dev] [PATCH 13/25] glsl: Use a separate availability class for image atomic built-ins.

2015-08-17 Thread Francisco Jerez
These are not part of unextended GLSL ES 3.1. --- src/glsl/builtin_functions.cpp | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp index 2175c66..482cae2 100644 --- a/src/glsl/bui

[Mesa-dev] [PATCH 17/25] glsl: Remove duplicate definition of gl_MaxTess*ImageUniforms built-in constants.

2015-08-17 Thread Francisco Jerez
These seem to have been re-added at some point during the ARB_tessellation_shader implementation work. AFAICT the second (correct) definition of each constant would have had no effect because the symbols were already defined. --- src/glsl/builtin_variables.cpp | 2 -- 1 file changed, 2 deletions(

[Mesa-dev] [PATCH 12/25] glsl: Allow precision qualifiers on general opaque types.

2015-08-17 Thread Francisco Jerez
From the GLSL ES 3.1 spec, section 4.7.3: "Any floating point, integer, opaque type declaration can have the type preceded by one of these precision qualifiers: [...] highp [...], mediump [...], lowp [...]." --- src/glsl/ast_to_hir.cpp | 10 ++ 1 file changed, 6 insertions(+), 4 delet

[Mesa-dev] [PATCH 23/25] glsl: Implement the required built-in functions when OES_shader_image_atomic is enabled.

2015-08-17 Thread Francisco Jerez
This is basically just the same atomic functions exposed by ARB_shader_image_load_store, with one exception: "highp float imageAtomicExchange( coherent IMAGE_PARAMS, float data);" There's no float atomic exchange overload in the original ARB_shader_image_load_store or GL 4.2

[Mesa-dev] [PATCH 07/25] mesa: Refuse to bind image uniforms using glUniform in GLES.

2015-08-17 Thread Francisco Jerez
The GLES 3.1 spec removed support for updating the image unit bound to an image uniform using glUniform1i() calls. --- src/mesa/main/uniform_query.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index 0365

[Mesa-dev] [PATCH 09/25] glsl: Add support for image binding qualifiers.

2015-08-17 Thread Francisco Jerez
Support for binding an image to an image unit explicitly in the shader source is required by both GLSL 4.2 and GLSL ES 3.1, but not by the original ARB_shader_image_load_store extension. --- src/glsl/ast_to_hir.cpp| 12 +++- src/glsl/link_uniform_initializers.cpp | 24 +

[Mesa-dev] [PATCH 02/25] mesa: Don't lose track of the shader image layer originally specified by the user.

2015-08-17 Thread Francisco Jerez
The spec requires that all layers of the image starting from the 0-th are bound to the image unit regardless of the Layer parameter when Layered is true, so I was setting gl_image_unit::Layer to zero in that case for the convenience of the driver back-end. However the ES31-CTS.shader_image_load_st

[Mesa-dev] [PATCH 24/25] i965/fs: Return result of image atomic in a register of the expected type.

2015-08-17 Thread Francisco Jerez
So the result is of float type if we're implementing the float overload of imageAtomicExchange. This is the only back-end change required to support OES_shader_image_atomic AFAICT. --- src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Mesa-dev] [PATCH 10/25] glsl: Require that all image uniforms have a format qualifier in GLSL ES.

2015-08-17 Thread Francisco Jerez
Note that this is slightly more permissive than the spec language requires: "Any image variable must specify a format layout qualifier." The GLSL ES spec seems really sketchy regarding format layout qualifiers on function formal parameters -- On the one hand they are required, but on the other han

[Mesa-dev] [PATCH 22/25] glsl: Add usual extension boilerplate for OES_shader_image_atomic.

2015-08-17 Thread Francisco Jerez
--- src/glsl/glcpp/glcpp-parse.y| 2 ++ src/glsl/glsl_parser_extras.cpp | 1 + src/glsl/glsl_parser_extras.h | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index dd5ec2a..4bd4f17 100644 --- a/src/glsl/glcpp/glcpp-parse.y +++

[Mesa-dev] [PATCH 06/25] mesa: Refuse to bind a mutable texture object to an image unit in GLES.

2015-08-17 Thread Francisco Jerez
--- src/mesa/main/shaderimage.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c index 5a3c47a..6f7d1c9 100644 --- a/src/mesa/main/shaderimage.c +++ b/src/mesa/main/shaderimage.c @@ -546,6 +546,17 @@ _mesa_BindImageTexture(G

[Mesa-dev] [PATCH 25/25] i965: Expose OES_shader_image_atomic.

2015-08-17 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/intel_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index 0da528b..0ae24cb 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +++ b/src/mesa/drivers/

[Mesa-dev] [PATCH 19/25] glsl: Recognise image memory qualifiers in GLSL ES 3.1.

2015-08-17 Thread Francisco Jerez
--- src/glsl/glsl_lexer.ll | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll index de6855f..24998c1 100644 --- a/src/glsl/glsl_lexer.ll +++ b/src/glsl/glsl_lexer.ll @@ -406,11 +406,11 @@ image2DShadow KEYWORD(13

[Mesa-dev] [PATCH 14/25] glsl: Expose image load and store built-ins in GLSL ES 3.1.

2015-08-17 Thread Francisco Jerez
--- src/glsl/builtin_functions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp index 482cae2..c53858e 100644 --- a/src/glsl/builtin_functions.cpp +++ b/src/glsl/builtin_functions.cpp @@ -394,7 +394,7 @@ shader_

[Mesa-dev] [PATCH 21/25] mesa: Add extension enable and table entry for OES_shader_image_atomic.

2015-08-17 Thread Francisco Jerez
--- src/mesa/main/extensions.c | 1 + src/mesa/main/mtypes.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index d934d19..38c7bc8 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -319,6 +319,7 @@ static

Re: [Mesa-dev] [PATCH 04/25] mesa: Reset image unit state to the default values when a bound image is deleted.

2015-08-18 Thread Francisco Jerez
Tapani Pälli writes: > On 08/17/2015 07:45 PM, Francisco Jerez wrote: >> The ES31-CTS.shader_image_load_store.basic-api-bind conformance test >> expects the whole image unit state to be reset when the bound texture >> object is deleted. The ARB_shader_image_load_store e

Re: [Mesa-dev] [PATCH 05/25] mesa: Initialize image unit state to different defaults in GLES.

2015-08-18 Thread Francisco Jerez
Ian Romanick writes: > On 08/17/2015 09:45 AM, Francisco Jerez wrote: >> There is no GL_R8 image format in GLES, according to the state table >> 20.32 of the GLES 3.1 spec the default value should be GL_R32UI. > > Was any conformance test affected by thi

Re: [Mesa-dev] [PATCH 07/25] mesa: Refuse to bind image uniforms using glUniform in GLES.

2015-08-18 Thread Francisco Jerez
rom the Uniform* calls. > Yeah... That's the reason why I didn't include any spec quotation here, I couldn't find any useful explanation in the spec. > Reviewed-by: Tapani Pälli > Thanks. > > On 08/17/2015 07:45 PM, Francisco Jerez wrote: >> The GLES 3.1 spec

Re: [Mesa-dev] [PATCH 09/12] i965/fs: make SIMD-splitting respect the original stride/offset

2015-08-18 Thread Francisco Jerez
Connor Abbott writes: > On Mon, Aug 17, 2015 at 2:41 AM, Francisco Jerez > wrote: >> Connor Abbott writes: >> >>> On Mon, Aug 17, 2015 at 12:09 AM, Pohjolainen, Topi >>> wrote: >>>> On Fri, Aug 14, 2015 at 03:30:18PM -0700, Connor Abbott

Re: [Mesa-dev] [PATCH 09/12] i965/fs: make SIMD-splitting respect the original stride/offset

2015-08-18 Thread Francisco Jerez
Connor Abbott writes: > On Tue, Aug 18, 2015 at 2:29 AM, Francisco Jerez > wrote: >> Connor Abbott writes: >> >>> On Mon, Aug 17, 2015 at 2:41 AM, Francisco Jerez >>> wrote: >>>> Connor Abbott writes: >>>> >>>>>

Re: [Mesa-dev] [PATCH v2] i965: Refactor image uniform setup

2015-08-19 Thread Francisco Jerez
pointer to the location in > the prog_data params array that indicates where the image uniforms should > be stored. This way it can be called from anywhere in the shader setup. > > v2: Fix nir_setup_uniform to correctly correspond with this change > (rebase fail) > > Cc: Fran

Re: [Mesa-dev] [PATCH 09/25] glsl: Add support for image binding qualifiers.

2015-08-19 Thread Francisco Jerez
Timothy Arceri writes: > On Mon, 2015-08-17 at 19:45 +0300, Francisco Jerez wrote: >> Support for binding an image to an image unit explicitly in the shader >> source is required by both GLSL 4.2 and GLSL ES 3.1, but not by the >> original ARB_shader_image_load_store exte

Re: [Mesa-dev] [PATCH 21/25] mesa: Add extension enable and table entry for OES_shader_image_atomic.

2015-08-19 Thread Francisco Jerez
Ian Romanick writes: > On 08/17/2015 09:56 AM, Ilia Mirkin wrote: >> On Mon, Aug 17, 2015 at 12:46 PM, Francisco Jerez >> wrote: >>> --- >>> src/mesa/main/extensions.c | 1 + >>> src/mesa/main/mtypes.h | 1 + >>> 2 files changed,

[Mesa-dev] [PATCH 20.5/25] mesa: Add ES31 API tag for the extension table.

2015-08-19 Thread Francisco Jerez
I'll mark the OES_shader_image_atomic extension entry with this tag to make sure that we don't expose it on earlier GLES API versions accidentally, because according to the extension: "OpenGL ES 3.1 and GLSL ES 3.10 are required." --- src/mesa/main/extensions.c | 7 +++ 1 file changed, 7 ins

Re: [Mesa-dev] [PATCH v3 2/5] glsl: add support for the imageSize builtin

2015-08-19 Thread Francisco Jerez
le the extension for GLES 3.1 > - Fix indentation > - Fix the return type (float to int, number of components for CubeImages) > - Add a warning related to GLES 3.1 > > v3: Based on the review of Francisco Jerez > - Refactor the code to share both add_image_function and _image with the o

Re: [Mesa-dev] [PATCH v2] i965: Refactor image uniform setup

2015-08-19 Thread Francisco Jerez
Jason Ekstrand writes: > On Aug 19, 2015 2:56 AM, "Francisco Jerez" wrote: >> >> Jason Ekstrand writes: >> >> > Previously, setting up image uniforms relied on being called after >> > fs_visitor::uniforms was set and with fs_visitor::unifor

Re: [Mesa-dev] [PATCH v3 3/5] nir: convert the glsl intrinsic image_size to nir_intrinsic_image_size

2015-08-19 Thread Francisco Jerez
Martin Peres writes: > v2, review from Francisco Jerez: > - make the destination variable as large as what the nir instrinsic >defines (4) instead of the size of the return variable of glsl. This >is still safe for the already existing code because all the intrinsics &

Re: [Mesa-dev] [PATCH v3 4/5] i965: handle nir_intrinsic_image_size

2015-08-19 Thread Francisco Jerez
Martin Peres writes: > v2, Review from Francisco Jerez: > - avoid the camelCase for the booleans > - init the booleans using the sampler type > - force the initialization of all the components of the output register > > Signed-off-by: Martin Peres > --- > s

Re: [Mesa-dev] [PATCH 5/5] i965: enable GL_ARB_shader_image_size

2015-08-19 Thread Francisco Jerez
ew = true; > > -- > 2.5.0 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev Looks good to me, Reviewed-by: Francisco Jerez signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 01/10] i965: Use constant miptree pointer in tex surface setup

2015-08-19 Thread Francisco Jerez
unsigned min_level, unsigned max_level, > -- > 1.9.3 > > _______ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev Reviewed-by: Francisco Jerez sign

Re: [Mesa-dev] [PATCH 02/10] i965: Reduce the scope of input in buffer tex setup

2015-08-19 Thread Francisco Jerez
Topi Pohjolainen writes: > Signed-off-by: Topi Pohjolainen Reviewed-by: Francisco Jerez > --- > src/mesa/drivers/dri/i965/brw_context.h | 4 ++-- > src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 8 +++- > src/mesa/drivers/dri/i965/gen7_wm_surface_state.

Re: [Mesa-dev] [PATCH 03/10] i965: Move tex buffer dispatch into hw independent setup

2015-08-19 Thread Francisco Jerez
e state entry (missing "+ s"?). > + continue; >} > + > + /* _NEW_TEXTURE */ > + brw->vtbl.update_texture_surface(ctx, unit, > + surf_offset + s, for_gather); I'd keep the c

Re: [Mesa-dev] [PATCH 04/10] i965/gen4: Use tex object format instead of the miptree format

2015-08-19 Thread Francisco Jerez
Topi Pohjolainen writes: > Equivalent logic for newer generations (>= 7) use the tex object > format instead. This patch prepares for merging the decision > making for all generations. > > Signed-off-by: Topi Pohjolainen Reviewed-by: Francisco Jerez > --- > s

Re: [Mesa-dev] [PATCH 05/10] i965: Move tex miptree and format resolving into dispatcher

2015-08-19 Thread Francisco Jerez
ed-off-by: Topi Pohjolainen I had already reviewed this patch, not sure why you dropped it, anyway: Reviewed-by: Francisco Jerez > --- > src/mesa/drivers/dri/i965/brw_context.h | 4 +++- > src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 26 > +

Re: [Mesa-dev] [PATCH 06/10] i965/gen7: Move tex gather format override into common dispatcher

2015-08-19 Thread Francisco Jerez
Topi Pohjolainen writes: > Signed-off-by: Topi Pohjolainen Reviewed-by: Francisco Jerez > --- > src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c > b/src/

Re: [Mesa-dev] [PATCH 07/10] i965: Move texture swizzle resolving into dispatcher

2015-08-19 Thread Francisco Jerez
Topi Pohjolainen writes: > v2: Non-trivial rebase > > Reviewed-by: Matt Turner (v1) > Reviewed-by: Kenneth Graunke (v1) > Signed-off-by: Topi Pohjolainen > > Signed-off-by: Topi Pohjolainen Uhm, and here you dropped my "[ Francisco Jerez: Non-trivial rebase. ]&

Re: [Mesa-dev] [PATCH v3 4/5] i965: handle nir_intrinsic_image_size

2015-08-19 Thread Francisco Jerez
Francisco Jerez writes: > Martin Peres writes: > >> v2, Review from Francisco Jerez: >> - avoid the camelCase for the booleans >> - init the booleans using the sampler type >> - force the initialization of all the components of the output register >

Re: [Mesa-dev] [PATCH 21/25] mesa: Add extension enable and table entry for OES_shader_image_atomic.

2015-08-20 Thread Francisco Jerez
Tapani Pälli writes: > On 08/19/2015 02:36 PM, Francisco Jerez wrote: >> Ian Romanick writes: >> >>> On 08/17/2015 09:56 AM, Ilia Mirkin wrote: >>>> On Mon, Aug 17, 2015 at 12:46 PM, Francisco Jerez >>>> wrote: >>>>> --- >>

Re: [Mesa-dev] [PATCH 02/21] i965: Make setup_vec4_uniform_value and _image_uniform_values take an offset

2015-08-20 Thread Francisco Jerez
Jason Ekstrand writes: > This way they don't implicitly increment the uniforms variable and don't > have to be called in-sequence during uniform setup. > > Cc: Francisco Jerez > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 7 --- > src

<    1   2   3   4   5   6   7   8   9   10   >