[Mesa-dev] [PATCH v3] glx: fix error code when there is no context bound

2016-05-29 Thread Tapani Pälli
From: Bernard Kilarski v2: change all related NULL checks to check against dummyContext v3: really check for dummyContext *only* when ctx was from __glXGetCurrentContext Signed-off-by: Bernard Kilarski Signed-off-by: Matt Roper Signed-off-by: Tapani Pälli Cc: "11.2" --- src/glx/glx_pbuf

[Mesa-dev] [PATCH] glsl: dont crash when attempting to assign a value to a builtin define

2016-05-29 Thread Timothy Arceri
For example GL_ARB_enhanced_layouts = 3; Fixes: GL44-CTS.enhanced_layouts.glsl_contant_immutablity --- src/compiler/glsl/ast_to_hir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index d31fce9..ec83eae 10

[Mesa-dev] [PATCH] nvc0: fix some compute texture validation bits on kepler

2016-05-29 Thread Ilia Mirkin
(a) Make sure to update the TIC in case of an updated buffer address (b) Mark newly-inactive textures dirty so that we update the handle in set_tex_handles. Signed-off-by: Ilia Mirkin --- Unfortunately none of this helps UE4 Elemental. src/gallium/drivers/nouveau/nvc0/nvc0_context.h | 2 ++ sr

Re: [Mesa-dev] [PATCH 21/25] i965/fs: Extend remove_duplicate_mrf_writes() to handle non-VGRF to MRF copies.

2016-05-29 Thread Michael Schellenberger
Hi curro, Am 28.05.2016 um 04:06 schrieb Francisco Jerez: > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp > b/src/mesa/drivers/dri/i965/brw_fs.cpp > index 50552cb..660a8db

Re: [Mesa-dev] [PATCH 1/2] configure.ac: Add support for Android builds

2016-05-29 Thread Tomasz Figa
Uhm, dropped other recipients by mistake last time. As I said, it was too late hour to reply for me. :) On Sun, May 29, 2016 at 2:09 AM, Emil Velikov wrote: > On 27 May 2016 at 17:22, Tomasz Figa wrote: >> On Sat, May 28, 2016 at 12:48 AM, Emil Velikov >> wrote: >>> Hello gents, >>> >>> On 27

Re: [Mesa-dev] [PATCH] egl/dri3: don't crash on no context.

2016-05-29 Thread Marek Olšák
Reviewed-by: Marek Olšák Candidate for stable? Marek On Mon, May 30, 2016 at 12:02 AM, Dave Airlie wrote: > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94925 > > Pointed out by Karol Herbst on irc. > > Signed-off-by: Dave Airlie > --- > src/egl/drivers/dri2/platform_x11_dri3.c | 6

Re: [Mesa-dev] [PATCH] radeonsi: Don't offset OFFCHIP_BUFFERING on pre-VI cards.

2016-05-29 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Sun, May 29, 2016 at 9:40 PM, Bas Nieuwenhuizen wrote: > Signed-off-by: Bas Nieuwenhuizen > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96239 > --- > src/gallium/drivers/radeonsi/si_state_shaders.c | 8 ++-- > 1 file changed, 6 insertions(+), 2

[Mesa-dev] [PATCH v3 14/14] squash i965: Remove old CS local ID handling

2016-05-29 Thread Jordan Justen
The old method pushed data for each channels uvec3 data of gl_LocalInvocationID. The new method pushes 1 dword of data that is a 'thread local ID' value. Based on that value, we can generate gl_LocalInvocationIndex and gl_LocalInvocationID with some simple calculations. Signed-off-by: Jordan Just

[Mesa-dev] [PATCH v3 10/14] squash anv: Support new local ID generation & cross-thread constants

2016-05-29 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/intel/vulkan/anv_cmd_buffer.c | 53 -- src/intel/vulkan/anv_private.h | 1 - src/intel/vulkan/gen7_cmd_buffer.c | 15 +-- src/intel/vulkan/gen8_cmd_buffer.c | 13 -- src/intel/vulkan/genX_cmd_buffer.c |

[Mesa-dev] [PATCH v3 13/14] squash i965/nir: Don't lower invocation index from local ID

2016-05-29 Thread Jordan Justen
With our newer code, it is now more efficient to generate the ID from the local invocation index. Therefore, we want to prevent nir core code from deriving local invocation index from the local invocation ID. Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_compiler.c | 3 +-- 1 fi

[Mesa-dev] [PATCH v3 11/14] squash i965: Don't lower the CS derived variable in the GLSL compiler

2016-05-29 Thread Jordan Justen
We will add a more compact lowering support in i965 nir code for gl_LocalInvocationIndex. For gl_GlobalInvocationID, we will now rely on nir lowering. Signed-off-by: Jordan Justen Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c | 1 - 1 file changed, 1 deletion(-) dif

[Mesa-dev] [PATCH v3 01/14] glsl: Add glsl LowerCsDerivedVariables option

2016-05-29 Thread Jordan Justen
v2: * Move lower flag to context constants. (Ken) Signed-off-by: Jordan Justen Reviewed-by: Kenneth Graunke (v1) --- src/compiler/glsl/builtin_variables.cpp | 29 ++--- src/compiler/glsl/glsl_parser_extras.cpp | 2 +- src/compiler/glsl/ir.h | 3 ++-

[Mesa-dev] [PATCH v3 12/14] squash i965: Run the intrinsics lowering pass

2016-05-29 Thread Jordan Justen
This pass replaces the local id and local index intrinsics with i965 specific nir code. Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_fs.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index bd3

[Mesa-dev] [PATCH v3 08/14] i965: Add CS push constant info to brw_cs_prog_data

2016-05-29 Thread Jordan Justen
We need information about push constants in a few places for the GL driver, and another couple places for the vulkan driver. When we add support for uploading both a common (cross-thread) set of push constants, combined with the previous per-thread push constant data, things are going to get even

[Mesa-dev] [PATCH v3 05/14] i965: Put CS local thread ID uniform in last push register

2016-05-29 Thread Jordan Justen
This thread ID uniform will be used to compute the gl_LocalInvocationIndex and gl_LocalInvocationID values. It is important for this uniform to be added in the last push constant register. fs_visitor::assign_constant_locations is updated to make sure this happens. The reason this is important is

[Mesa-dev] [PATCH v3 02/14] nir: Make lowering gl_LocalInvocationIndex optional

2016-05-29 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/compiler/nir/nir.c | 4 src/compiler/nir/nir.h | 2 ++ src/compiler/nir/nir_gather_info.c | 1 + src/compiler/nir/nir_intrinsics.h | 1 + src/compiler/nir/nir_lower_system_values.c | 16

[Mesa-dev] [PATCH v3 00/14] i965: Rework CS local IDs for gen7+

2016-05-29 Thread Jordan Justen
git://people.freedesktop.org/~jljusten/mesa hsw-cs-cross-thread-constants-v3 v3: * Redo uniform handling and add tweaks based on Jason's suggestions v2: * https://lists.freedesktop.org/archives/mesa-dev/2016-May/118566.html v1: * https://lists.freedesktop.org/archives/mesa-dev/2016-May/117952

[Mesa-dev] [PATCH v3 04/14] i965/anv: Add uniform for a CS thread local base ID

2016-05-29 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/intel/vulkan/anv_pipeline.c | 4 src/mesa/drivers/dri/i965/brw_compiler.h | 1 + src/mesa/drivers/dri/i965/brw_cs.c | 3 +++ src/mesa/drivers/dri/i965/brw_fs.cpp | 8 4 files changed, 16 insertions(+) diff --git a/src/intel/vu

[Mesa-dev] [PATCH v3 07/14] i965: Store number of threads in brw_cs_prog_data

2016-05-29 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_compiler.h | 1 + src/mesa/drivers/dri/i965/brw_fs.cpp | 15 --- src/mesa/drivers/dri/i965/gen7_cs_state.c | 32 ++- 3 files changed, 23 insertions(+), 25 deletions(-) diff --git a/src/m

[Mesa-dev] [PATCH v3 09/14] squash-fwd i965: Support new local ID push constant & cross-thread constants

2016-05-29 Thread Jordan Justen
The cross thread constant support appears on Haswell. It allows us to upload a set of uniform data for all threads without duplicating it per thread. We also support per-thread data which allows us to store a per-thread ID in one of the uniforms that can be used to calculate the gl_LocalInvocation

[Mesa-dev] [PATCH v3 06/14] i965: Add nir based intrinsic lowering and thread ID uniform

2016-05-29 Thread Jordan Justen
We add a lowering pass for nir intrinsics. This pass can replace nir intrinsics with driver specific nir lower code. We lower the gl_LocalInvocationIndex intrinsic based on a uniform which is loaded with a thread specific ID. We also lower the gl_LocalInvocationID based on gl_LocalInvocationIndex

[Mesa-dev] [PATCH v3 03/14] i965: Add nir channel_num system value

2016-05-29 Thread Jordan Justen
v2: * simd16/32 fixes (curro) Signed-off-by: Jordan Justen --- src/compiler/nir/nir_intrinsics.h| 1 + src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 15 +++ 2 files changed, 16 insertions(+) diff --git a/src/compiler/nir/nir_intrinsics.h b/src/compiler/nir/nir_intrinsics.h i

[Mesa-dev] [PATCH] egl/dri3: don't crash on no context.

2016-05-29 Thread Dave Airlie
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94925 Pointed out by Karol Herbst on irc. Signed-off-by: Dave Airlie --- src/egl/drivers/dri2/platform_x11_dri3.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/egl/drivers/dri2/platform_x11_dri3.c b/src/egl/

[Mesa-dev] NumSamples API vs internal

2016-05-29 Thread Dave Airlie
One of the CTS tests does a copy image from a 1 sample texture to a 4 sample texture and expects it to fail as per the spec. However the i965 driver quantizes the number of samples and stores the internal value into NumSamples directly. Is this correct behaviour, or do we need to introduce _NumSa

[Mesa-dev] [PATCH] mesa/xfb: report calculated size for XFB buffer objects.

2016-05-29 Thread Dave Airlie
From: Dave Airlie This fixes: GL45-CTS.direct_state_access.xfb_buffers This test looks correct to me, we should work out the size value and report it rather than using only the size from the Range interface. Signed-off-by: Dave Airlie --- src/mesa/main/transformfeedback.c | 3 ++- 1 file chan

[Mesa-dev] [PATCH] radeonsi: Don't offset OFFCHIP_BUFFERING on pre-VI cards.

2016-05-29 Thread Bas Nieuwenhuizen
Signed-off-by: Bas Nieuwenhuizen Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96239 --- src/gallium/drivers/radeonsi/si_state_shaders.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/rade

Re: [Mesa-dev] [PATCH 00/25] i965: Scalar back-end support for SIMD32, part 4.

2016-05-29 Thread Francisco Jerez
Francisco Jerez writes: > Jason Ekstrand writes: > >> On Fri, May 27, 2016 at 7:05 PM, Francisco Jerez >> wrote: >> >>> This fixes the few code quality regressions from the previous series >>> enabling SIMD32 CS codegen in the back-end -- AFAICT by the end of the >>> series we can finally enabl

[Mesa-dev] [PATCH 3/5] gallium: add PIPE_CAP_TGSI_VOTE for when the VOTE ops are allowed

2016-05-29 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/docs/source/screen.rst | 1 + src/gallium/drivers/freedreno/freedreno_screen.c | 1 + src/gallium/drivers/i915/i915_screen.c | 1 + src/gallium/drivers/ilo/ilo_screen.c | 1 + src/gallium/drivers/llvmpipe/lp_screen.c

[Mesa-dev] [PATCH 5/5] nvc0: add support for VOTE tgsi opcodes

2016-05-29 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- .../drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 23 ++ .../drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 27 +- .../drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 23 ++ .../drivers/nouveau/codegen/nv50_i

[Mesa-dev] [PATCH 2/5] gallium: add VOTE_* opcodes to implement GL_ARB_shader_group_vote

2016-05-29 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/auxiliary/tgsi/tgsi_info.c | 3 +++ src/gallium/docs/source/tgsi.rst | 17 + src/gallium/include/pipe/p_shader_tokens.h | 7 ++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/tgsi

[Mesa-dev] [PATCH 4/5] st/mesa: expose GL_ARB_shader_group_vote when supported by backend

2016-05-29 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/mesa/state_tracker/st_extensions.c | 1 + src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 14 ++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index

[Mesa-dev] [PATCH 1/5] mesa: hook up core bits of GL_ARB_shader_group_vote

2016-05-29 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/compiler/glsl/builtin_functions.cpp| 22 ++ src/compiler/glsl/glcpp/glcpp-parse.y | 3 +++ src/compiler/glsl/glsl_parser_extras.cpp | 1 + src/compiler/glsl/glsl_parser_extras.h | 2 ++ src/co

[Mesa-dev] [PATCH 0/5] GL_ARB_shader_group_vote support

2016-05-29 Thread Ilia Mirkin
Turns out Matt already did a bunch of this work last year, but since I only found out about that after I wrote my patches, I decided to keep mine in place (I like the "vote" naming better TBH). This passes the very simple piglit tests I just sent out to the list. Ilia Mirkin (5): mesa: hook up c

Re: [Mesa-dev] [PATCH] glsl: use has_double() helper

2016-05-29 Thread Eduardo Lima Mitev
Reviewed-by: Eduardo Lima Mitev On 05/28/2016 03:56 AM, Timothy Arceri wrote: > --- > src/compiler/glsl/ast_to_hir.cpp | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/src/compiler/glsl/ast_to_hir.cpp > b/src/compiler/glsl/ast_to_hir.cpp > index a2eb32d..7c5c4e5 10064

Re: [Mesa-dev] [PATCH 3/3] anv: bail out if anv_wsi_init() fails

2016-05-29 Thread Jason Ekstrand
On May 29, 2016 9:41 AM, "Emil Velikov" wrote: > > From: Emil Velikov > > Otherwise we'll end up setting up a device with no winsys integration. Seems reasonable. Running headless isn't a problem but winsys failing to initialize basically only happens on out-of-memory so we should fail in that c

Re: [Mesa-dev] [PATCH 2/3] anv: error out of anv_init_wsi() if build platform-less

2016-05-29 Thread Jason Ekstrand
No, if we have no platforms, it should succeed at setting up all zero of them. On May 29, 2016 9:41 AM, "Emil Velikov" wrote: > From: Emil Velikov > > Strictly speaking one can build 'platform-less', thus we should error > out in that case. > > Signed-off-by: Emil Velikov > --- > Not 100% sure

Re: [Mesa-dev] [PATCH] glsl: fix explicit uniform block alignment

2016-05-29 Thread Eduardo Lima Mitev
On 05/28/2016 03:40 AM, Timothy Arceri wrote: > This stops the offset being bumped again when and an explicit there seems to be an extra "and" above. > alignment has already been applied. > > Fixes alignment issues in: > GL44-CTS.enhanced_layouts.uniform_block_alignment > > Note the test still

Re: [Mesa-dev] [PATCH 00/25] i965: Scalar back-end support for SIMD32, part 4.

2016-05-29 Thread Jason Ekstrand
On May 29, 2016 2:18 AM, "Francisco Jerez" wrote: > > Jason Ekstrand writes: > > > On Fri, May 27, 2016 at 7:05 PM, Francisco Jerez > > wrote: > > > >> This fixes the few code quality regressions from the previous series > >> enabling SIMD32 CS codegen in the back-end -- AFAICT by the end of the

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

2016-05-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=93551 --- Comment #30 from Vedran Miletić --- (In reply to kilobug from comment #29) > > With recent enough Mesa, forcing OpenGL 4.2 and GLSL 420 is not required. > > Did you use llvm 3.8 or 3.9 ? 3.9. -- You are receiving this mail because: You ar

[Mesa-dev] [PATCH 3/3] anv: bail out if anv_wsi_init() fails

2016-05-29 Thread Emil Velikov
From: Emil Velikov Otherwise we'll end up setting up a device with no winsys integration. Signed-off-by: Emil Velikov --- Hard-coding the rendernode name in anv_physical_device_init() is a bad idea really. We could/should be using drmGetDevices() to get info on all the devices (master/render/et

[Mesa-dev] [PATCH 2/3] anv: error out of anv_init_wsi() if build platform-less

2016-05-29 Thread Emil Velikov
From: Emil Velikov Strictly speaking one can build 'platform-less', thus we should error out in that case. Signed-off-by: Emil Velikov --- Not 100% sure if this is the correct error. NO_PLATFORM or NOT_SUPPORTED_PLATFORM seems like a better choice yet is seems to be missing in the vulkan API. -

[Mesa-dev] [PATCH 1/3] anv: resolve wayland-only build

2016-05-29 Thread Emil Velikov
From: Emil Velikov Ensure that the final X11/XCB hunk is guarded by the correct macro. Otherwise we'll require the symbol even when building without said platform. Cc: Cedric Sodhi Reported-by: Cedric Sodhi Signed-off-by: Emil Velikov --- src/intel/vulkan/anv_wsi.c | 2 ++ 1 file changed, 2

[Mesa-dev] [PATCH 1/2] gallium/util: fix coverity MIXED_ENUMS warning

2016-05-29 Thread Rob Clark
From: Rob Clark CID 1362171, 1362170 Looks like it should be pipe_transfer_usage in the prototype, based on how the parameter is used. Note that I don't see any users of u_staging so maybe we should just remove it? Signed-off-by: Rob Clark --- src/gallium/auxiliary/util/u_staging.c | 2 +- s

[Mesa-dev] [PATCH 2/2] svga: fix coverity MIXED_ENUMS warning

2016-05-29 Thread Rob Clark
From: Rob Clark Another pipe_resource_usage vs pipe_transfer_usage mixup. CID 1362169, 1362168 Signed-off-by: Rob Clark --- src/gallium/drivers/svga/svga_resource_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/svga/svga_resource_buffer.c b/sr

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

2016-05-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=93551 --- Comment #29 from kilobug --- > With recent enough Mesa, forcing OpenGL 4.2 and GLSL 420 is not required. Did you use llvm 3.8 or 3.9 ? -- You are receiving this mail because: You are the assignee for the bug. You are the QA Contact for the

Re: [Mesa-dev] [PATCH] Fix warnings.

2016-05-29 Thread Vedran Miletic
On 05/29/2016 01:54 PM, Romain Failliot wrote: Can now compile with -Werror. Fixed -Wunused-variable, -Wunused-but-set-variable, -Wmaybe-uninitialized and -Wunused-function. To prevent warnings for variables only used in asserts, I void them right after the call to assert(). The changes look

Re: [Mesa-dev] [PATCH] st/mesa: fix setting of point_size_per_vertex in ES contexts

2016-05-29 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Sun, May 29, 2016 at 4:47 AM, Ilia Mirkin wrote: > GL ES 2.0+ does not have a GL_PROGRAM_POINT_SIZE enable, unlike desktop > GL. So we have to go and check the last pre-rasterizer stage to see > whether it outputs a point size or not. > > This fixes a number of

[Mesa-dev] [PATCH] Fix warnings.

2016-05-29 Thread Romain Failliot
Can now compile with -Werror. Fixed -Wunused-variable, -Wunused-but-set-variable, -Wmaybe-uninitialized and -Wunused-function. To prevent warnings for variables only used in asserts, I void them right after the call to assert(). --- src/compiler/spirv/vtn_variables.c | 1 + src/galli

Re: [Mesa-dev] [PATCH 00/25] i965: Scalar back-end support for SIMD32, part 4.

2016-05-29 Thread Francisco Jerez
Jason Ekstrand writes: > On Fri, May 27, 2016 at 7:05 PM, Francisco Jerez > wrote: > >> This fixes the few code quality regressions from the previous series >> enabling SIMD32 CS codegen in the back-end -- AFAICT by the end of the >> series we can finally enable GL 4.3 on all Gen8+ hardware. >>