platform/upstream/mesa.git
6 years agoradv: use num_patches output from tcs shader.
Dave Airlie [Tue, 20 Feb 2018 01:22:07 +0000 (11:22 +1000)]
radv: use num_patches output from tcs shader.

Instead of recalculating the value, use the shader calculated value.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agoradv/tess: remove last chunk of tess sgprs
Dave Airlie [Mon, 19 Feb 2018 19:15:25 +0000 (19:15 +0000)]
radv/tess: remove last chunk of tess sgprs

This removes the last TES-specifc user sgpr.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agoradv: pass num_patches to tes from tcs
Dave Airlie [Mon, 19 Feb 2018 07:31:55 +0000 (07:31 +0000)]
radv: pass num_patches to tes from tcs

TES needs num_patches to do some of the calculations.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agoradv: drop tess offchip layout for tcs.
Dave Airlie [Mon, 19 Feb 2018 07:14:04 +0000 (07:14 +0000)]
radv: drop tess offchip layout for tcs.

This removes the last TCS specific user sgpr.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agoradv: drop tcs_out_offsets
Dave Airlie [Mon, 19 Feb 2018 06:51:15 +0000 (06:51 +0000)]
radv: drop tcs_out_offsets

Move all calculations to shader generation.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agoradv: drop tcs_out_layout
Dave Airlie [Mon, 19 Feb 2018 06:38:30 +0000 (06:38 +0000)]
radv: drop tcs_out_layout

Move all calculations to shader generation.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agoradv/tess: drop tcs_in_layout setting completely.
Dave Airlie [Mon, 19 Feb 2018 06:14:40 +0000 (06:14 +0000)]
radv/tess: drop tcs_in_layout setting completely.

Inline all calcs at shader creation.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agoradv: drop ls_out_layout const.
Dave Airlie [Mon, 19 Feb 2018 05:53:33 +0000 (05:53 +0000)]
radv: drop ls_out_layout const.

We can precalculate input_vertex_size at compile time.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agoradv/shader_info: start gathering tess output info (v2)
Dave Airlie [Mon, 19 Feb 2018 05:49:04 +0000 (05:49 +0000)]
radv/shader_info: start gathering tess output info (v2)

This gathers the ls outputs written by the vertex shader,
and the tcs outputs, these are needed to calculate certain
tcs parameters.

These have to be separate for combined gfx9 shaders.

This is a bit pessimistic compared to the nir pass,
as we don't work out the individual slots for tcs outputs,
but I actually thing it should be fine to just mark the whole
thing used here.

v2: move to radv, handle clip dist (Samuel),
    handle compacts and patchs properly.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agoradv: migrate unique index info shader info (v2)
Dave Airlie [Mon, 19 Feb 2018 05:48:40 +0000 (05:48 +0000)]
radv: migrate unique index info shader info (v2)

This just moves this function to an inline so the shader_info
pass can use it.

v2: use inline (Samuel)

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agoRevert "mesa: do not trigger _NEW_TEXTURE_STATE in glActiveTexture()"
Samuel Pitoiset [Wed, 14 Mar 2018 08:46:33 +0000 (09:46 +0100)]
Revert "mesa: do not trigger _NEW_TEXTURE_STATE in glActiveTexture()"

This reverts commit f314a532fdc7af8381586144d2631d9968331f05.

This appears to introduce some blinking textures in UT2004. Not
sure exactly what's the root cause because we don't have much
information about the issue.

Anyway, this was just a micro optimization that actually breaks,
at least, one app almost one year later.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105436
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
6 years agoanv: silence unused variable warning
Lionel Landwerlin [Thu, 15 Mar 2018 16:34:47 +0000 (16:34 +0000)]
anv: silence unused variable warning

Fixes: 59b0ea0c748 ("anv: Stop returning VK_ERROR_INCOMPATIBLE_DRIVER")
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
6 years agoi965: silence unused function warning
Lionel Landwerlin [Thu, 15 Mar 2018 16:15:06 +0000 (16:15 +0000)]
i965: silence unused function warning

[123/227] Compiling C object 'src/mesa/drivers/dri/i965/libi965_gen110@sta/genX_blorp_exec.c.o'.
../src/mesa/drivers/dri/i965/genX_blorp_exec.c:99:1: warning: ‘blorp_get_surface_base_address’ defined but not used [-Wunused-function]
 blorp_get_surface_base_address(struct blorp_batch *batch)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
6 years agoanv: silence unused function warning on gen11
Lionel Landwerlin [Thu, 15 Mar 2018 16:14:34 +0000 (16:14 +0000)]
anv: silence unused function warning on gen11

[84/227] Compiling C object 'src/intel/vulkan/libanv_gen110@sta/genX_blorp_exec.c.o'.
../src/intel/vulkan/genX_blorp_exec.c:68:1: warning: ‘blorp_get_surface_base_address’ defined but not used [-Wunused-function]
 blorp_get_surface_base_address(struct blorp_batch *batch)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
6 years agomeson: fix pipe-loaders after omx changes
Dylan Baker [Tue, 13 Mar 2018 23:03:41 +0000 (16:03 -0700)]
meson: fix pipe-loaders after omx changes

with_gallium_omx used to be a boolean, but now it's a string. That means
it needs to be compared to 'disabled' instead of false.

CC: Rob Clark <robdclark@gmail.com>
Fixes: 34e852d5b50772199797ea839fc8d6b3805633ff
       ("meson: Re-add auto option for omx")
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Tested-by: Rob Clark <robdclark@gmail.com
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
6 years agomeson: require amdgpu >= 2.4.91
Dylan Baker [Wed, 14 Mar 2018 16:07:16 +0000 (09:07 -0700)]
meson: require amdgpu >= 2.4.91

the meson equivalent of f8773edb0a0cf5ff885cd3494717323983eedeed

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
6 years agoconfigure.ac: require libdrm_amdgpu 2.4.91
Marek Olšák [Wed, 14 Mar 2018 00:57:59 +0000 (20:57 -0400)]
configure.ac: require libdrm_amdgpu 2.4.91

Since 2.4.90 is problematic, just ask for the next version.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
6 years agoconfigure.ac: blacklist libdrm 2.4.90
Marek Olšák [Wed, 14 Mar 2018 00:22:11 +0000 (20:22 -0400)]
configure.ac: blacklist libdrm 2.4.90

Cc: 18.0 17.3 17.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
6 years agoradv: dump LLVM IR when a hang is detected
Samuel Pitoiset [Wed, 14 Mar 2018 09:36:20 +0000 (10:36 +0100)]
radv: dump LLVM IR when a hang is detected

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoradv: record LLVM IR when debugging shaders
Samuel Pitoiset [Wed, 14 Mar 2018 09:34:13 +0000 (10:34 +0100)]
radv: record LLVM IR when debugging shaders

If AMD_shader_info or RADV_TRACE_FILE is used we might need to
keep trace of LLVM IR.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoradv: add dump_shader to the NIR compiler options
Samuel Pitoiset [Wed, 14 Mar 2018 09:28:49 +0000 (10:28 +0100)]
radv: add dump_shader to the NIR compiler options

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoradv: pass the NIR compiler options to ac_compile_llvm_module()
Samuel Pitoiset [Wed, 14 Mar 2018 09:23:22 +0000 (10:23 +0100)]
radv: pass the NIR compiler options to ac_compile_llvm_module()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoradv: print some information when RADV_TRACE_FILE is set
Samuel Pitoiset [Wed, 14 Mar 2018 11:02:13 +0000 (12:02 +0100)]
radv: print some information when RADV_TRACE_FILE is set

Just to be sure all options are enabled when trying to generate
a hang report.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoradv: only display options that are enabled
Samuel Pitoiset [Wed, 14 Mar 2018 11:01:49 +0000 (12:01 +0100)]
radv: only display options that are enabled

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agomailmap: Use Eric Engestrom's personal email address
Eric Engestrom [Thu, 2 Jun 2016 15:46:49 +0000 (16:46 +0100)]
mailmap: Use Eric Engestrom's personal email address

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
6 years agospirv/radv: add AMD_gcn_shader capability, remove current extensions
Alejandro Piñeiro [Thu, 8 Mar 2018 11:43:00 +0000 (12:43 +0100)]
spirv/radv: add AMD_gcn_shader capability, remove current extensions

So now, during spirv_to_nir, it uses the capability instead of the
extension. Note that we are really doing here is treating
SPV_AMD_gcn_shader as other supported extensions. SPV_AMD_gcn_shader
is not the first SPV extension supported. For example, the capability
draw_parameters infers if the extension SPV_KHR_shader_draw_parameters
is supported or not.

This could be seen as counter-intuitive, and that it would be easier
to define which extensions are supported, and based our checks on
that, but we need to take into account that some capabilities are
optional from core, and others came from new extensions.

Also this commit would make the implementation of ARB_spirv_extensions
easier.

v2: AMD_gcn_shader capability renamed to gcn_shader (Daniel Schürmann)

Reviewed-by: Daniel Schürmann <daniel.schuermann@campus.tu-berlin.de>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agospirv: update arguments for vtn_nir_alu_op_for_spirv_opcode()
Samuel Iglesias Gonsálvez [Wed, 14 Mar 2018 07:49:43 +0000 (08:49 +0100)]
spirv: update arguments for vtn_nir_alu_op_for_spirv_opcode()

We don't need anymore the source and destination's data type, just
their bitsize.

v2:
- Use glsl_get_bit_size () instead (Jason).

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
6 years agospirv: fix the translation of SPIR-V conversion opcodes to NIR
Samuel Iglesias Gonsálvez [Wed, 14 Mar 2018 07:32:08 +0000 (08:32 +0100)]
spirv: fix the translation of SPIR-V conversion opcodes to NIR

There are some SPIRV opcodes (like UConvert and SConvert) have some
expectations of the output that doesn't depend on the operands
data type. Generalize the solution of all of them.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
6 years agovbo: Correctly handle source arrays in vbo_split_copy.
Mathias Fröhlich [Tue, 13 Mar 2018 08:12:48 +0000 (09:12 +0100)]
vbo: Correctly handle source arrays in vbo_split_copy.

The original approach did optimize away a bit too many fields.
Restablish the pointer into the original array and correctly feed that
one.

Reviewed-by: Brian Paul <brianp@vmware.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105471
Fixes: 64d2a20480547d5897fd9d7b8fd306f2625138cb
    mesa: Make gl_vertex_array contain pointers to first order VAO members.
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
6 years agosched.h needs to be imported on Darwin/OSX targets.
Apple SWE [Wed, 14 Mar 2018 01:29:45 +0000 (18:29 -0700)]
sched.h needs to be imported on Darwin/OSX targets.

sched_yield is used but the include reference on Darwin is missing. This patch
conditionally guards on Darwin/OSX to import sched.h first.

Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
6 years agoAdd processor topology calculation implementation for Darwin/OSX targets.
Apple SWE [Wed, 14 Mar 2018 01:24:26 +0000 (18:24 -0700)]
Add processor topology calculation implementation for Darwin/OSX targets.

The implementation for bootstrapping SWR on Darwin targets is based on the Linux version.
Instead of reading the output of /proc/cpuinfo, sysctlbyname is used to determine the
physical identifiers, processor identifiers, core counts and thread-processor affinities.

With this patch, it is possible to use SWR as an alternate renderer on OSX to softpipe and
llvmpipe.

Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
6 years agovirgl: resize resource bo allocation if we need to.
Dave Airlie [Mon, 12 Mar 2018 00:21:21 +0000 (10:21 +1000)]
virgl: resize resource bo allocation if we need to.

This fixes an illegal command buffer on the host seen with
piglit arb_internalformat_query2-max-dimensions

Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agonv50,nvc0: Support BGRX1010102 and RGBX1010102 for sampling.
Mario Kleiner [Mon, 12 Mar 2018 20:45:44 +0000 (21:45 +0100)]
nv50,nvc0: Support BGRX1010102 and RGBX1010102 for sampling.

Add them as usable for textures, so they can be used by
Wayland drm in 10 bpc mode and for X11 compositing under
GLX and EGL. We need these formats to be supported at
least for sampling, otherwise GLX_texture_from_pixmap
and the equivalent EGL image extension won't work with
X11 drawables of depth 30 and just display an all black
window.

Do not expose these formats as renderable, and thereby
not as a fbconfig/EGLConfig/Visual, as NVidia hw does
not support 10 bpc unorm formats without alpha channel.

Tested under X11 + GLX/EGL + DRI2/DRI3 for compositing,
and under Wayland+Weston drm backend with a Tesla and
Pascal gpu.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
6 years agoutil: Use set_foreach instead of rolling our own
Thomas Helland [Wed, 15 Apr 2015 21:08:19 +0000 (23:08 +0200)]
util: Use set_foreach instead of rolling our own

This follows the same pattern as in the hash_table.

Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>
6 years agoglsl: Use hash table cloning in copy propagation
Thomas Helland [Mon, 9 Jan 2017 22:14:46 +0000 (23:14 +0100)]
glsl: Use hash table cloning in copy propagation

Walking the whole hash table, inserting entries by hashing them first
is just a really bad idea. We can simply memcpy the whole thing.

V2: Remove leftover creation of acp in two places

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
6 years agoutil: Implement a hash table cloning function
Thomas Helland [Mon, 9 Jan 2017 22:01:50 +0000 (23:01 +0100)]
util: Implement a hash table cloning function

V2: Don't rzalloc; we are about to rewrite the whole thing (Vladislav)

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
6 years agost/mesa: Factorize duplicate code in st_BlitFramebuffer()
Guillaume Charifi [Tue, 20 Feb 2018 13:30:06 +0000 (14:30 +0100)]
st/mesa: Factorize duplicate code in st_BlitFramebuffer()

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
6 years agoautotools: add -I/src/egl to tizonia
Dylan Baker [Wed, 7 Mar 2018 23:13:08 +0000 (15:13 -0800)]
autotools: add -I/src/egl to tizonia

This fixes the following build breakage:

make[5]: Entering directory
'/mnt/sdc1/Gits/mesa/src/gallium/state_trackers/omx/tizonia'
   CC       h264dprc.lo
In file included from h264dprc.c:45:0:
../../../../../src/egl/drivers/dri2/egl_dri2.h:47:10: fatal error:
wayland/wayland-egl/wayland-egl-backend.h: No such file or directory
  #include "wayland/wayland-egl/wayland-egl-backend.h"
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

meson got the same fix in 7598dedfde49391564cdb3d355e7bd98e1880782.

Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
6 years agoRevert "Add processor topology calculation implementation for Darwin/OSX targets."
Dylan Baker [Wed, 14 Mar 2018 16:30:17 +0000 (09:30 -0700)]
Revert "Add processor topology calculation implementation for Darwin/OSX targets."

This reverts commit de0d10db93d85de79c7b4451c4851ace2976f8f4.

This breaks the build on at least Linux, probably other non-apple
platforms.

Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
6 years agoRevert "sched.h needs to be imported on Darwin/OSX targets."
Dylan Baker [Wed, 14 Mar 2018 16:28:58 +0000 (09:28 -0700)]
Revert "sched.h needs to be imported on Darwin/OSX targets."

This reverts commit 9dc5063262d0a5130cf0723a33079f3fd17560c3.

This breaks the build on at least Linux, probably other non-apple
platforms.

Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
6 years agocompiler: int8/uint8 support
Karol Herbst [Thu, 25 Jan 2018 12:59:06 +0000 (07:59 -0500)]
compiler: int8/uint8 support

OpenCL kernels also have int8/uint8.

v2: remove changes in nir_search as Jason posted a patch for that

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
6 years agoradv: Fix CmdCopyImage between uncompressed and compressed images
Alex Smith [Mon, 12 Mar 2018 14:30:05 +0000 (14:30 +0000)]
radv: Fix CmdCopyImage between uncompressed and compressed images

From the spec:

    "When copying between compressed and uncompressed formats the
     extent members represent the texel dimensions of the source
     image and not the destination."

However, as per 7b890a36, we must still use the destination image type
when clamping the extent so that we copy the correct number of layers
for 2D to 3D copies.

Fixes: 7b890a36 "radv: Fix vkCmdCopyImage for 2d slices into 3d Images"
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
6 years agoradv: fix vkGetDeviceQueue2() when create flags don't match
Samuel Pitoiset [Tue, 13 Mar 2018 20:54:53 +0000 (21:54 +0100)]
radv: fix vkGetDeviceQueue2() when create flags don't match

This fixes CTS:
dEQP-VK.api.device_init.create_device_queue2_unmatched_flags

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@gmail.com>
6 years agospirv: Handle doubles when multiplying a mat by a scalar
Neil Roberts [Tue, 13 Mar 2018 12:26:19 +0000 (13:26 +0100)]
spirv: Handle doubles when multiplying a mat by a scalar

The code to handle mat multiplication by a scalar tries to pick either
imul or fmul depending on whether the matrix is float or integer.
However it was doing this by checking whether the base type is float.
This was making it choose the int path for doubles (and presumably
float16s).

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
6 years agoanv/entrypoints: VkGetDeviceProcAddr returns NULL for core instance commands
Iago Toral Quiroga [Mon, 12 Mar 2018 07:27:04 +0000 (08:27 +0100)]
anv/entrypoints: VkGetDeviceProcAddr returns NULL for core instance commands

af5f2322d0c64 addressed this for extension commands, but the spec mandates
this behavior also for core API commands. From the Vulkan spec,
Table 2. vkGetDeviceProcAddr behavior:

device     pname                            return
----------------------------------------------------------
(..)
device     core device-level command        fp
(...)

See that it specifically states "device-level".

Since the vk.xml file doesn't state if core commands are instance or
device level, we identify device level commands as the ones that take a
VkDevice, VkQueue or VkCommandBuffer as their first parameter.

Fixes test failures in new work-in-progress CTS tests.

Also see the public issue:
https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/2323

v2:
  - Include reference to github issue (Emil)
  - Rebased on top of Vulkan 1.1 changes.

v3:
  - Remove the not in the condition and switch the then/else cases (Jason)

Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (v1)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
6 years agoanv/entrypoints: dispatches to VkQueue are device-level
Iago Toral Quiroga [Mon, 12 Mar 2018 07:29:57 +0000 (08:29 +0100)]
anv/entrypoints: dispatches to VkQueue are device-level

v2:
  - Add trampoline functions (Jason)
  - Add an assertion for unhandled trampoline cases

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
6 years agoradv: drop assert on bindingDescriptorCount > 0
Dave Airlie [Thu, 8 Mar 2018 00:15:12 +0000 (10:15 +1000)]
radv: drop assert on bindingDescriptorCount > 0

The spec is pretty clear that this can be 0, and that it operates
as a reserved binding.

Fixes:
dEQP-VK.binding_model.descriptor_update.empty_descriptor.uniform_buffer

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agosched.h needs to be imported on Darwin/OSX targets.
Apple SWE [Wed, 14 Mar 2018 01:29:45 +0000 (18:29 -0700)]
sched.h needs to be imported on Darwin/OSX targets.

sched_yield is used but the include reference on Darwin is missing. This patch
conditionally guards on Darwin/OSX to import sched.h first.

Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
6 years agoAdd processor topology calculation implementation for Darwin/OSX targets.
Apple SWE [Wed, 14 Mar 2018 01:24:26 +0000 (18:24 -0700)]
Add processor topology calculation implementation for Darwin/OSX targets.

The implementation for bootstrapping SWR on Darwin targets is based on the Linux version.
Instead of reading the output of /proc/cpuinfo, sysctlbyname is used to determine the
physical identifiers, processor identifiers, core counts and thread-processor affinities.

With this patch, it is possible to use SWR as an alternate renderer on OSX to softpipe and
llvmpipe.

Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
6 years agor600: fix abs for op3 sources
Roland Scheidegger [Tue, 13 Mar 2018 02:40:42 +0000 (03:40 +0100)]
r600: fix abs for op3 sources

If a src was referencing the same temp as the dst, the per-component
copy code didn't work.
e.g.
  cndge r0.xy, r0.xx, |r2|, r3
got expanded into
  mov  r12.x, |r2|
  cndge r0.x, r0.x, r12, r3
  mov  r12.y, |r2|
  cndge r0.y, r0.x, r12, r3
hence for the second cndge r0.x was mistakenly the previous cndge result.
Fix this by doing all the movs first, so there's no bogus alu.last in between.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=102905

Tested-by: <iive@yahoo.com>
Reviewed-by: Dave Airlie <airlied@gmail.com>
6 years agoradv: mark all tess output for an indirect access.
Dave Airlie [Wed, 14 Mar 2018 00:21:46 +0000 (10:21 +1000)]
radv: mark all tess output for an indirect access.

If a shader does a tcs store with an indirect access, we
were only marking the first spot as used. For indirect access
we always now mark all slots used by the variable.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105464
Fixes: 94f9591995 (radv/ac: add support for TCS/TES inputs/outputs.)
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agoac/nir: pass the nir variable through tcs loading.
Dave Airlie [Wed, 14 Mar 2018 00:19:45 +0000 (10:19 +1000)]
ac/nir: pass the nir variable through tcs loading.

I was going to have to add another parameter to this monster,
so we should just pass the nir_variable in, I can't find any
reason this would be a bad idea.

This needed for the next fix.

Fixes: 94f9591995 (radv/ac: add support for TCS/TES inputs/outputs.)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agoradv: get correct offset into LDS for indexed vars.
Dave Airlie [Tue, 13 Mar 2018 19:41:53 +0000 (05:41 +1000)]
radv: get correct offset into LDS for indexed vars.

This seems more correct to me, since if we have an array
of floats they'll be vec4 aligned, and if we do af[2],
we want the const index to increase by 2 slots in the non
compact case.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105464
Fixes: 94f9591995 (radv/ac: add support for TCS/TES inputs/outputs.)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agonir: lower_load_const_to_scalar fix for 8/16b types
Rob Clark [Sat, 10 Mar 2018 17:27:42 +0000 (12:27 -0500)]
nir: lower_load_const_to_scalar fix for 8/16b types

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
6 years agoUpdate the documentation for meson
Dylan Baker [Thu, 1 Mar 2018 19:32:56 +0000 (11:32 -0800)]
Update the documentation for meson

Meson is pretty well tested and works in most configurations now, so we
can remove the warning about it being unsuited for actual use.

It's also worth documenting that meson 0.42.0 or greater is required.

v2: - Minor rewording of supported platforms as suggested by Emil
    - Add two missing tags as reported by xmllint --html

Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (v1)
6 years agoac/nir: Use lower_vote_eq_to_ballot instead of ac_nir_lower_subgroups
Jason Ekstrand [Sat, 10 Mar 2018 18:08:22 +0000 (10:08 -0800)]
ac/nir: Use lower_vote_eq_to_ballot instead of ac_nir_lower_subgroups

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agonir/subgroups: Add lowering for vote_ieq/vote_feq to a ballot
Jason Ekstrand [Sat, 10 Mar 2018 18:05:58 +0000 (10:05 -0800)]
nir/subgroups: Add lowering for vote_ieq/vote_feq to a ballot

This is based heavily on 97f10934edf8ac, "ac/nir: Add vote_ieq/vote_feq
lowering pass." from Bas Nieuwenhuizen.  This version is a bit more
general since it's in common code.  It also properly handles NaN due to
not flipping the comparison for floats.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agomeson: don't use compiler.has_header
Dylan Baker [Mon, 12 Mar 2018 18:19:52 +0000 (11:19 -0700)]
meson: don't use compiler.has_header

Meson's compiler.has_header is completely useless, it only checks that a
header exists, not whether it's usable. This creates problems if a
header contains a conditional #error declaration, like so:

> #if __x86_64__
> # error "Doesn't work with x86_64!"
> #endif

Compiler.has_header will return true in this case, even when compiling
for x86_64. This is useless.

Instead, we'll do a compile check so that any #error declarations will
be treated as errors, and compilation will work.

Fixes compilation on x32 architecture.

Gentoo Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=649746
meson bug: https://github.com/mesonbuild/meson/issues/2246
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
6 years agoi965: Emit texture cache invalidates around blorp_copy
Jason Ekstrand [Sat, 10 Mar 2018 05:23:23 +0000 (21:23 -0800)]
i965: Emit texture cache invalidates around blorp_copy

This is a terrible hack but it fixes CTS regressions.  It's still
incredibly unclear exactly what is going wrong in the hardware to cause
this to be an issue so this isn't a good fix by any means.  However, it
does fix tests so there is that.

Fixes: fb0e9b5197 "i965: Track the depth and render caches separately"
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103746
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
6 years agobrodacom/vc4: Fix simulator since the perfmon change.
Eric Anholt [Mon, 12 Mar 2018 18:33:40 +0000 (11:33 -0700)]
brodacom/vc4: Fix simulator since the perfmon change.

It would be nice to support perfmon with simulator, and might be a useful
tool for regression testing performance (since the simulator would be
deterministic).

6 years agospirv: Silence compiler warning about undefined srcs[0]
Eric Anholt [Wed, 21 Feb 2018 04:28:09 +0000 (20:28 -0800)]
spirv: Silence compiler warning about undefined srcs[0]

v2: Use assume() at the srcs[] definition instead.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
6 years agoac/nir: rename radeon_llvm_reg_index_soa() to ac_llvm_reg_index_soa()
Samuel Pitoiset [Tue, 13 Mar 2018 13:59:11 +0000 (14:59 +0100)]
ac/nir: rename radeon_llvm_reg_index_soa() to ac_llvm_reg_index_soa()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoac/nir: remove some unnecessary includes and declarations
Samuel Pitoiset [Tue, 13 Mar 2018 13:11:36 +0000 (14:11 +0100)]
ac/nir: remove some unnecessary includes and declarations

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoac/nir: drop radv prefix from radv_lower_gather4_integer()
Samuel Pitoiset [Tue, 13 Mar 2018 13:12:04 +0000 (14:12 +0100)]
ac/nir: drop radv prefix from radv_lower_gather4_integer()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoac/nir: move ac_nir_compiler_options and friends to radv folder
Samuel Pitoiset [Tue, 13 Mar 2018 13:54:04 +0000 (14:54 +0100)]
ac/nir: move ac_nir_compiler_options and friends to radv folder

Also replace ac_ by radv_.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoac: move ac_shader_info to radv folder
Samuel Pitoiset [Tue, 13 Mar 2018 13:49:11 +0000 (14:49 +0100)]
ac: move ac_shader_info to radv folder

This is RADV specific code.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoac/nir: move ac_shader_variant_info and friends to radv folder
Samuel Pitoiset [Tue, 13 Mar 2018 13:34:35 +0000 (14:34 +0100)]
ac/nir: move ac_shader_variant_info and friends to radv folder

Also replace ac_ by radv_.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoac/nir: move all RADV related code to radv_nir_to_llvm.c
Samuel Pitoiset [Fri, 9 Mar 2018 15:58:10 +0000 (16:58 +0100)]
ac/nir: move all RADV related code to radv_nir_to_llvm.c

Now the "ac/nir" prefix will really be the shared code between
RadeonSI and RADV, that might avoid confusions in the future.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoac/nir: make emit_barrier() non-static
Samuel Pitoiset [Fri, 9 Mar 2018 15:56:31 +0000 (16:56 +0100)]
ac/nir: make emit_barrier() non-static

Required in order to move all RADV specific code outside of ac/nir.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoac/nir: move radeon_llvm_reg_index_soa() to ac_nir_to_llvm.h
Samuel Pitoiset [Fri, 9 Mar 2018 15:54:46 +0000 (16:54 +0100)]
ac/nir: move radeon_llvm_reg_index_soa() to ac_nir_to_llvm.h

Required in order to move all RADV specific code outside of ac/nir.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoac/nir: make handle_shader_output_decl() non-static
Samuel Pitoiset [Fri, 9 Mar 2018 15:53:06 +0000 (16:53 +0100)]
ac/nir: make handle_shader_output_decl() non-static

Required in order to move all RADV specific code outside of ac/nir.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoac/nir: change prototype of handle_shader_output_decl()
Samuel Pitoiset [Fri, 9 Mar 2018 15:49:55 +0000 (16:49 +0100)]
ac/nir: change prototype of handle_shader_output_decl()

This allows to remove the ac_nir_context dependency.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoac/nir: move unpack_param() to ac_llvm_build.c
Samuel Pitoiset [Fri, 9 Mar 2018 15:39:35 +0000 (16:39 +0100)]
ac/nir: move unpack_param() to ac_llvm_build.c

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoac/nir: move trim_vector to ac_llvm_build.c
Samuel Pitoiset [Fri, 9 Mar 2018 15:36:31 +0000 (16:36 +0100)]
ac/nir: move trim_vector to ac_llvm_build.c

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoac/nir: move cast_ptr() to ac_llvm_build.c
Samuel Pitoiset [Fri, 9 Mar 2018 15:26:34 +0000 (16:26 +0100)]
ac/nir: move cast_ptr() to ac_llvm_build.c

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agoac/nir: move ac_build_alloca() to ac_llvm_build.c
Samuel Pitoiset [Fri, 9 Mar 2018 15:22:44 +0000 (16:22 +0100)]
ac/nir: move ac_build_alloca() to ac_llvm_build.c

As well as si_build_alloca_undef() and drop the si prefix.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
6 years agogallium: silence __builtin_frame_address nonzero argument is unsafe warning
Timothy Arceri [Fri, 9 Mar 2018 00:00:55 +0000 (11:00 +1100)]
gallium: silence __builtin_frame_address nonzero argument is unsafe warning

Calling __builtin_frame_address with a nonzero argument is unsafe
but is sometimes done for debugging purposes. Since this code is
part of some debug util code I'm assuming that is the case here
and using GCC pragma to silence the warning.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
6 years agomeson: Add moduledir to d3d.pc
Dylan Baker [Fri, 9 Mar 2018 16:27:31 +0000 (08:27 -0800)]
meson: Add moduledir to d3d.pc

This is required to build wine with the nine patchset

Fixes: 6b4c7047d57178d3362a710ad503057c6a582ca3
       ("meson: build gallium nine state_tracker")
Reported-by: Mike Lothian <mike@fireburn.co.uk>
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
6 years agogallium: Use struct gl_array_attributes* as st_pipe_vertex_format argument.
Mathias Fröhlich [Sat, 10 Mar 2018 15:01:31 +0000 (16:01 +0100)]
gallium: Use struct gl_array_attributes* as st_pipe_vertex_format argument.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
6 years agomesa: Don't write to user buffer in glGetTexParameterIuiv on error
Ian Romanick [Thu, 8 Mar 2018 05:05:34 +0000 (21:05 -0800)]
mesa: Don't write to user buffer in glGetTexParameterIuiv on error

With some sets of optimization flags, GCC will generate warnings like
this:

src/mesa/main/texparam.c:2327:27: warning: ‘*((void *)&ip+12)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
             params[3] = ip[3];
                         ~~^~~
src/mesa/main/texparam.c:2320:16: note: ‘*((void *)&ip+12)’ was declared here
          GLint ip[4];
                ^~

ip is not initialized in cases where a GL error is generated.  In these
cases, we should *not* write to the user's buffer, so this is actually a
bug.  I wrote a new piglit test gl-3.0-texparameteri to show this bug.

I suspect that Coverity also detected this, but the scan site is
currently down.

Fixes: c2c507786 "main: Added entry points for glGetTextureParameteriv, Iiv, and Iuiv."
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
6 years agogallium: work around libtool relink issue for libdrm
Roman Gilg [Mon, 5 Mar 2018 16:41:44 +0000 (17:41 +0100)]
gallium: work around libtool relink issue for libdrm

This is similar to commit 90633079. libtool links first to system directories
instead of custom locations of libdrm on relinking. Since a more recent libdrm
version than the one provided by the system is often needed when compiling
mesa, make sure this works by putting libdrm in front.

See also: https://bugs.freedesktop.org/show_bug.cgi?id=100259

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
6 years agovulkan: autotools: do not redirect stdin/stdout for wayland-scanner
Emil Velikov [Thu, 8 Mar 2018 17:08:45 +0000 (17:08 +0000)]
vulkan: autotools: do not redirect stdin/stdout for wayland-scanner

The tool accepts the input and output files as arguments.
There's no need for the redirection.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
6 years agowayland-drm: autotools: do not redirect stdin/stdout for wayland-scanner
Emil Velikov [Thu, 8 Mar 2018 17:07:39 +0000 (17:07 +0000)]
wayland-drm: autotools: do not redirect stdin/stdout for wayland-scanner

The tool accepts the input and output files as arguments.
There's no need for the redirection.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
6 years agoegl: autotools: do not redirect stdin/stdout for wayland-scanner
Emil Velikov [Thu, 8 Mar 2018 16:16:18 +0000 (16:16 +0000)]
egl: autotools: do not redirect stdin/stdout for wayland-scanner

The tool accepts the input and output files as arguments.
There's no need for the redirection.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
6 years agodocs: document removal of GLX_SGIX_swap_{barrier,group} stubs
Emil Velikov [Thu, 8 Mar 2018 14:07:07 +0000 (14:07 +0000)]
docs: document removal of GLX_SGIX_swap_{barrier,group} stubs

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
6 years agoglx: remove empty GLX_SGIX_swap_group stubs
Emil Velikov [Mon, 5 Mar 2018 18:33:14 +0000 (18:33 +0000)]
glx: remove empty GLX_SGIX_swap_group stubs

The extension was never implemented. Quick search suggests:
 - no actual users (on my Arch setup)
 - the Nvidia driver does not implement the extension

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
6 years agogallium/x11: remove empty GLX_SGIX_swap_group stubs
Emil Velikov [Mon, 5 Mar 2018 18:30:40 +0000 (18:30 +0000)]
gallium/x11: remove empty GLX_SGIX_swap_group stubs

The extension was never implemented. Quick search suggests:
 - no actual users (on my Arch setup)
 - the Nvidia driver does not implement the extension

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
6 years agox11: remove empty GLX_SGIX_swap_group stubs
Emil Velikov [Mon, 5 Mar 2018 18:28:35 +0000 (18:28 +0000)]
x11: remove empty GLX_SGIX_swap_group stubs

The extension was never implemented. Quick search suggests:
 - no actual users (on my Arch setup)
 - the Nvidia driver does not implement the extension

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
6 years agoglx: remove empty GLX_SGIX_swap_barrier stubs
Emil Velikov [Mon, 5 Mar 2018 18:25:16 +0000 (18:25 +0000)]
glx: remove empty GLX_SGIX_swap_barrier stubs

The extension was never implemented. Quick search suggests:
 - no actual users (on my Arch setup)
 - the Nvidia driver does not implement the extension

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
6 years agogallium/x11: remove empty GLX_SGIX_swap_barrier stubs
Emil Velikov [Mon, 5 Mar 2018 18:22:38 +0000 (18:22 +0000)]
gallium/x11: remove empty GLX_SGIX_swap_barrier stubs

The extension was never implemented. Quick search suggests:
 - no actual users (on my Arch setup)
 - the Nvidia driver does not implement the extension

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
6 years agox11: remove empty GLX_SGIX_swap_barrier stubs
Emil Velikov [Mon, 5 Mar 2018 18:17:13 +0000 (18:17 +0000)]
x11: remove empty GLX_SGIX_swap_barrier stubs

The extension was never implemented. Quick search suggests:
 - no actual users (on my Arch setup)
 - the Nvidia driver does not implement the extension

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
6 years agoconfigure: remove unused AM_CONDITIONAL
Emil Velikov [Mon, 5 Mar 2018 18:14:51 +0000 (18:14 +0000)]
configure: remove unused AM_CONDITIONAL

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
6 years agoradv: Increase the number of dynamic uniform buffers.
Bas Nieuwenhuizen [Fri, 9 Mar 2018 16:18:03 +0000 (17:18 +0100)]
radv: Increase the number of dynamic uniform buffers.

The vulkan API is not ideal as it does not allow us have a
shared limit.

Feral needs 15+6 for one of their games, and I'm not a fan
of overcommitting the limits, so increase the number of
dynamic uniform buffers to 16.

CC: <mesa-stable@lists.freedesktop.org>
CC: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
6 years agou_vbuf/translate: pass max_index into the set_buffer.
Dave Airlie [Thu, 8 Mar 2018 20:18:55 +0000 (06:18 +1000)]
u_vbuf/translate: pass max_index into the set_buffer.

This fixes a memory trashing crash (not the test) seen with
dEQP-GLES3.stress.draw.unaligned_data.random.203
on virgl.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agor600: implement callstack workaround for evergreen.
Dave Airlie [Fri, 9 Mar 2018 06:03:53 +0000 (16:03 +1000)]
r600: implement callstack workaround for evergreen.

This is ported from the sb backend, there are some issues with
evergreen stacks on the boundary between entries and ALU_PUSH_BEFORE
instructions.

Whenever we are going to use a push before, we check the stack
usage and if we have to use the workaround, then we switch to
a separate push.

I noticed this problem dealing with some of the soft fp64 shaders,
in nosb mode, they are quite stack happy.

This fixes all the glitches and inconsistencies I've seen with them

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Tested-by: Elie Tournier <elie.tournier@collabora.com>
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agogallium/util: add helper util_wait_for_idle
Marek Olšák [Sun, 11 Mar 2018 00:23:45 +0000 (19:23 -0500)]
gallium/util: add helper util_wait_for_idle

This is an old patch that I had.

6 years agou_blit: (trivial) u_blit.h needs to include p_defines.h
Roland Scheidegger [Sat, 10 Mar 2018 01:48:42 +0000 (02:48 +0100)]
u_blit: (trivial) u_blit.h needs to include p_defines.h

(For the pipe_tex_filter enum)

Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
6 years agotravis: bump libxcb version to 1.13
Christian Gmeiner [Sat, 10 Mar 2018 14:53:27 +0000 (15:53 +0100)]
travis: bump libxcb version to 1.13

Fixes following dependency problem:
  Native dependency xcb-dri3 found: NO found '1.11' but need: '>= 1.13'

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Fixes: c80c08e22603 ("vulkan/wsi/x11: Add support for DRI3 v1.2")

6 years agomesa: Make gl_vertex_array contain pointers to first order VAO members.
Mathias Fröhlich [Sun, 4 Mar 2018 17:15:53 +0000 (18:15 +0100)]
mesa: Make gl_vertex_array contain pointers to first order VAO members.

Instead of keeping a copy of the vertex array content in
struct gl_vertex_array only keep pointers to the first order
information originaly in the VAO.
For that represent the current values by struct gl_array_attributes
and struct gl_vertex_buffer_binding.

v2: Change comments.
    Remove gl... prefix from variables except in the i965 directory where
    it was like that before. Reindent because of that.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
6 years agodraw: fix alpha value for very short aa lines
Roland Scheidegger [Fri, 9 Mar 2018 04:27:25 +0000 (05:27 +0100)]
draw: fix alpha value for very short aa lines

The logic would not work correctly for line lengths smaller than 1.0,
even a degenerated line with length 0 would still produce a fragment
with anyhwere between alpha 0.0 and 0.5.

Reviewed-by: Brian Paul <brianp@vmware.com>