Vadym Shovkoplias [Fri, 7 Sep 2018 12:14:52 +0000 (15:14 +0300)]
glsl/linker: Check the invariance of built-in special variables
From Section 4.6.4 (Invariance and Linkage) of the GLSL ES 1.0 specification
"The invariance of varyings that are declared in both the vertex and
fragment shaders must match. For the built-in special variables,
gl_FragCoord can only be declared invariant if and only if
gl_Position is declared invariant. Similarly gl_PointCoord can only
be declared invariant if and only if gl_PointSize is declared
invariant. It is an error to declare gl_FrontFacing as invariant.
The invariance of gl_FrontFacing is the same as the invariance of
gl_Position."
Fixes:
* glsl-pcoord-invariant.shader_test
* glsl-fcoord-invariant.shader_test
* glsl-fface-invariant.shader_test
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107734
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Tapani Pälli [Tue, 11 Sep 2018 07:32:32 +0000 (10:32 +0300)]
intel/tools: fix initial position of window in aubinator viewer
Currently position is set before widgets are sized by gtk and
calculation can get wrong results where window is positioned
offscreen. Patch fixes this by setting aubfile window position
as 0,0 only when size_allocate has been called to the widget.
Now window is always positioned to 0,0 if imgui.ini is missing.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Erik Faye-Lund [Thu, 6 Sep 2018 10:21:53 +0000 (11:21 +0100)]
winsys/virgl: avoid unintended behavior
If we end up never taking the loop that writes ret, we can end up with
an uninitialized value, and if we're *really* unlucky, that value can
be -1, causing us to go down an error-path instead of a success path.
This was obviously not intended, so let's just initialize this to zero.
Noticed by Valgrind:
Conditional jump or move depends on uninitialised value(s)
at 0xBA640A0: virgl_drm_winsys_resource_cache_create (virgl_drm_winsys.c:348)
by 0xBA62FCF: virgl_buffer_create (virgl_buffer.c:170)
by 0xBA605AC: virgl_resource_create (virgl_resource.c:60)
by 0xBCF816F: bufferobj_data (st_cb_bufferobjects.c:344)
by 0xBCF816F: st_bufferobj_data (st_cb_bufferobjects.c:390)
by 0xBB7E836: vbo_use_buffer_objects (vbo_exec_api.c:1136)
by 0xBCFCC6E: st_create_context_priv (st_context.c:414)
by 0xBCFD3CD: st_create_context (st_context.c:590)
by 0xBBB30CA: st_api_create_context (st_manager.c:896)
by 0xB981E76: dri_create_context (dri_context.c:155)
by 0xB97BDCE: driCreateContextAttribs (dri_util.c:473)
by 0x5288331: dri3_create_context_attribs (dri3_glx.c:309)
by 0x5264D64: glXCreateContextAttribsARB (create_context.c:78)
Fixes: a8987b88ff1 ("virgl: add driver for virtio-gpu 3D (v2)")
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Juan A. Suarez Romero [Mon, 10 Sep 2018 12:15:33 +0000 (14:15 +0200)]
travis: use python3.5 for meson
Newer Meson versions require python >=3.5. But in Trusty default python3
version is 3.4.x.
Install python3.5 and makes it the default version for Meson using
update-alternatives method.
CC: Jan Vesely <jano.vesely@gmail.com>
CC: Andres Gomez <agomez@igalia.com>
CC: Emil Velikov <emil.l.velikov@gmail.com>
CC: Jon Turney <jon.turney@dronecode.org.uk>
CC: Eric Engestrom <eric.engestrom@intel.com>
CC: Dylan Baker <dylan@pnwbakers.com>
Fixes: 3824c8e7cda97c3bf856 "meson: disable asserts by default on release builds"
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Samuel Pitoiset [Mon, 10 Sep 2018 16:14:41 +0000 (18:14 +0200)]
radv: adjust ESGS ring buffer size computation on VI+
Noticed while working in this area. Ported from RadeonSI.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Gert Wollny [Mon, 10 Sep 2018 10:39:44 +0000 (12:39 +0200)]
mesa/texture: Also check for LA texture when querying intensity component size
Gallium may pick L16A16_FLOAT to represent GL_INTENSITY16F if no intensity
format is provided by the driver. However, when calling
glGetTexLevelParameteriv(..., GL_TEXTURE_INTENSITY_SIZE, ...)
mesa will return a zero size because the actually used format has no
intensity channel and as a fallback only the sizes of the red/green
channels are checked.
Also checking for LA sizes in the allocated texture resolves this problem.
v2: Only check alpha channel size and return it (Marek)
L and A size are always the same in this case.
Fixes (on virgl):
ext_framebuffer_multisample-fast-clear GL_ARB_texture_float *
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107832
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Ilia Mirkin [Fri, 7 Sep 2018 02:33:13 +0000 (22:33 -0400)]
nv50,nvc0: warn on not-explicitly-handled caps
Not handling caps explicitly means that we're likely getting incorrect
values -- these need to be reviewed and set appropriately.
While we're at it, add in some missing caps, and set all the subpixel
stuff to 8 as that seems to be what the blob reports.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Timothy Arceri [Fri, 7 Sep 2018 22:21:21 +0000 (08:21 +1000)]
mesa: remove duplicate dispatch sanity tests
This removes duplicate tests from gl_core_functions_possible
that are already covered by common_desktop_functions_possible.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Mon, 10 Sep 2018 10:41:27 +0000 (20:41 +1000)]
mesa: tidy up init_matrix_stack()
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Christopher Egert [Sat, 8 Sep 2018 00:16:48 +0000 (02:16 +0200)]
radeon: fix ColorMask
Since commit
af3685d14936844f79e6f372b4b258e29375f21b various OpenGL applications regressed
on the classic mesa radeon driver.
Signed-off-by: Christopher Egert <cme3000@gmail.com>
CC: 18.1 18.2 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Elie Tournier [Thu, 6 Sep 2018 09:46:32 +0000 (10:46 +0100)]
gallium: Correctly handle no config context creation
This patch fixes the following Piglit test:
spec@egl_mesa_configless_context@basic
It also fixes few test in a virgl guest.
v2: Evaluate the value of no_config (Ilia)
Suggested-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Bas Nieuwenhuizen [Mon, 10 Sep 2018 18:34:00 +0000 (20:34 +0200)]
radv: Support v3 of VK_EXT_vertex_attribute_divisor.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
CC: 18.2 <mesa-stable@lists.freedesktop.org>
Marek Olšák [Wed, 29 Aug 2018 06:45:49 +0000 (02:45 -0400)]
radeonsi/nir: port some bindless and sampler code from TGSI
These might be all missing changes for bindless textures.
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Tue, 28 Aug 2018 23:13:18 +0000 (19:13 -0400)]
radeonsi: adjust and simplify max_alloc_size determination
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Fri, 24 Aug 2018 04:28:16 +0000 (00:28 -0400)]
radeonsi: split si_copy_buffer
compute and SDMA will be added into it.
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Tue, 28 Aug 2018 21:45:00 +0000 (17:45 -0400)]
radeonsi: don't call VBO prefetch with size=0
for the next commit.
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Fri, 24 Aug 2018 04:04:11 +0000 (00:04 -0400)]
radeonsi: merge SI and CI dma_clear_buffer and remove the callback
also use assertions for the requirements that offset and size are a multiple
of 4.
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Wed, 29 Aug 2018 05:34:46 +0000 (01:34 -0400)]
radeonsi: fix GPU hangs with bindless textures and LLVM 7.0
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Wed, 29 Aug 2018 04:17:26 +0000 (00:17 -0400)]
ac: remove deprecated use of LLVMInt1Type()
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Wed, 29 Aug 2018 04:15:16 +0000 (00:15 -0400)]
ac: use iN_0/1 constants
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Sat, 25 Aug 2018 02:57:17 +0000 (22:57 -0400)]
ac: add radeon_info::num_good_cu_per_sh
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Sat, 25 Aug 2018 03:00:37 +0000 (23:00 -0400)]
ac: revert new LLVM 7.0 behavior for fdiv
Cc: 18.2 <mesa-stable@lists.freedesktop.org>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Tue, 28 Aug 2018 18:59:25 +0000 (14:59 -0400)]
radeonsi: fix printing a BO list into ddebug reports
important for debugging
Cc: 18.1 18.2 <mesa-stable@lists.freedesktop.org>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Tue, 28 Aug 2018 19:49:31 +0000 (15:49 -0400)]
r600: fix HTILE for NPOT textures with mipmapping
Cc: 18.1 18.2 <mesa-stable@lists.freedesktop.org>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Tue, 28 Aug 2018 18:39:09 +0000 (14:39 -0400)]
winsys/radeon: fix CMASK fast clear for NPOT textures with mipmapping on SI/CI
Cc: 18.2 <mesa-stable@lists.freedesktop.org>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Tue, 28 Aug 2018 19:49:31 +0000 (15:49 -0400)]
radeonsi: fix HTILE for NPOT textures with mipmapping on SI/CI
VI uses addrlib so it's unaffected.
Cc: 18.1 18.2 <mesa-stable@lists.freedesktop.org>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Brian Paul [Mon, 10 Sep 2018 17:29:12 +0000 (11:29 -0600)]
docs: document new features/extensions in driver for WS 15 / Fusion 11
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Thu, 6 Sep 2018 21:06:22 +0000 (15:06 -0600)]
svga: assorted fixes/changes in svga_pipe_blit.c
To align the code with VMware's in-house copy.
Signed-off-by: Brian Paul <brianp@vmware.com>
Brian Paul [Thu, 6 Sep 2018 20:56:47 +0000 (14:56 -0600)]
svga: set buffer bind_flags in svga_buffer_add_host_surface()
To match the in-house VMware code.
Signed-off-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Sun, 29 Apr 2018 22:13:05 +0000 (15:13 -0700)]
svga: add format conversion for legacy formats
This patch extends the format_conversion table to support
different view formats on texture buffer.
For legacy image formats such as INTENSITY, LUMINANCE, LUMINANCE_ALPHA,
special swizzle masks will be used on the red or RG channels.
This fixes piglit test arb_texture_buffer_object-formats fs|vs arb
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Thu, 15 Feb 2018 20:11:43 +0000 (12:11 -0800)]
svga: remove obsolete code to reemit gs binding
The svga_reemit_gs_bindings function is no longer needed. Remove it.
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Brian Paul [Wed, 27 Dec 2017 18:36:03 +0000 (11:36 -0700)]
svga: move variant->fs_shadow_compare_units assignment
Fixes a crash since the variant object isn't allocated until later
in the function. Not sure how this got through.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Charmaine Lee [Mon, 18 Dec 2017 17:41:54 +0000 (09:41 -0800)]
svga: fix resource checking in is_blending_enabled()
This patch makes sure a valid color buffer is bound before
checking its resource. This fixes Unigine Valley running in SM41 device.
Reviewed-by: Brian Paul <brianp@vmware.com>
Neha Bhende [Wed, 13 Dec 2017 23:02:13 +0000 (15:02 -0800)]
svga: Use texture_copy_region instead of texture_copy_handle for multisampling
This fixes some of tests cases in arb_copy_image-formats and also fixes
SurfaceCopy related errors in vmware.log when multi sampled surfaces are
used.
Tested with piglit, glretrace on windows and linux VM.
v2: As per Brian's comment
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Charmaine Lee [Fri, 8 Dec 2017 05:29:49 +0000 (21:29 -0800)]
svga: add missing devcap check for texture array support
The patch checks DXFMT_ARRAY devcap for texture array support.
Tested with MTT-piglit. No regressions.
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Wed, 6 Dec 2017 23:33:45 +0000 (15:33 -0800)]
svga: no need to check MULTISAMPLE devcap for view format
According to the current SVGA contract, any view format can be
used on the underlying resource that is multisample. So there
is no need to check the MULTISAMPLE devcap for the view format.
Fixes black rendering issue with Tropics running with 4xMSAA.
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Thu, 7 Dec 2017 17:52:47 +0000 (09:52 -0800)]
svga: sync devcap name changes in svga3d_devcaps.h
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Thu, 7 Dec 2017 17:35:00 +0000 (09:35 -0800)]
svga: explicit set DXFMT_SHADER_SAMPLE for DS format for pre-SM41 device
Explicit set the DXFMT_SHADER_SAMPLE bit for depth stencil formats
for pre-SM41 device only. This bit is now set by the SM41 device.
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Thu, 7 Dec 2017 20:04:17 +0000 (12:04 -0800)]
svga: remove unused variable
Trivial.
Brian Paul [Fri, 8 Dec 2017 04:12:10 +0000 (21:12 -0700)]
svga: draw round points when msaa is enabled
See comments for details. This allows the piglit
ext_framebuffer_multisample-point-smooth test to pass.
Also, test the pipe_rasterizer_state::point_quad_rasterization field
to see if sprite point rasterization is needed because it's possible
for no sprite_coord_enable bits to be set when drawing sprites.
Finally, remove old, stale comments.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Wed, 6 Dec 2017 03:41:55 +0000 (20:41 -0700)]
svga: check number of samples before emitting MSAA decls/opcodes
If real MSAA is not available, we only support 1 sample/pixel. In that
case, we must not declare MSAA resources or emit MSAA opcodes. Do that
by checking the sample count.
Fixes several piglit MSAA tests, such as
arb_texture_multisample-sample-depth (when the hard-coded sample count
of 4 is fixed in that test).
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Tue, 5 Dec 2017 00:09:24 +0000 (17:09 -0700)]
svga: remove obsolete comment on format_cap_table[]
We removed the special cases referred to in this comment in the commit
"svga: add a separate function to get dx format capabilities from
vgpu10 device".
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Fri, 17 Nov 2017 18:18:38 +0000 (11:18 -0700)]
svga: allow TGSI_TEXTURE_CUBE_ARRAY in emit_tg4()
Technically, SM4.1 doesn't support cube map arrays, but our backend
renderers actually do. This allows the Piglit textureGather cube
map array tests to pass.
Tested with GLrenderer, DX11renderer and SWrenderer.
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Charmaine Lee [Mon, 4 Dec 2017 18:03:51 +0000 (10:03 -0800)]
svga: no dma on multisample surface
Force direct map on multisample surface.
Fixes SVGA Driver Errors running multisample piglit tests on Linux VM
v2: use texture for the check.
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Charmaine Lee [Sat, 2 Dec 2017 04:59:42 +0000 (20:59 -0800)]
svga: src surface for IntraSurfaceCopy cannot be multisample
Fixes SVGA Driver Errors with piglit test arb_copy_image-targets
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Charmaine Lee [Fri, 1 Dec 2017 20:45:30 +0000 (12:45 -0800)]
svga: fix missing format multisample devcap check
In commit
e4048f6cd1, svga_is_dx_format_supported() is supposed to
also check the SVGA3D_DXFMT_MULTISAMPLE bit for multisample
support of a format. Somehow that code is not included in that commit.
This patch fixes it.
Fixes piglit test spec@ext_framebuffer_multisample@formats all_samples.
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Thu, 30 Nov 2017 16:54:44 +0000 (08:54 -0800)]
svga: fix incorrect multisample support in VGPU9 device
Commit
e4048f6cd1 unintentionally allows multisample support for VGPU9 device.
This patch fixes this regression.
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Charmaine Lee [Wed, 29 Nov 2017 21:27:58 +0000 (13:27 -0800)]
svga: fix the missing devcap for SVGA3D_BC3_UNORM_SRGB
Set the devcap to SVGA3D_DEVCAP_DXFMT_BC3_UNORM_SRGB
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Charmaine Lee [Wed, 29 Nov 2017 21:25:30 +0000 (13:25 -0800)]
svga: add a separate function to get dx format capabilities from vgpu10 device
Currently we have one function to get format capabailities and
we convert DX10 devcaps back to DX9. This can be confusing.
Going forward we will have a separate function for dealing with dx formats.
This patch also fixes the depth stencil devcap. Instead of hardcoding
the capabilities for the depth stencil formats, we will inquire the
device for the capabilities. Note: we will still need to explicity set
the SVGA3D_DXFMT_SHADER_SAMPLE bit for SVGA3D_R32_FLOAT_X8X24 and
SVGA3D_R24_UNORM_X8 since this bit is not advertised but supported
by the device.
v2: reapply the patch after svga_is_format_supported is moved to svga_format.c
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Charmaine Lee [Wed, 29 Nov 2017 21:09:26 +0000 (13:09 -0800)]
svga: assign a separate function for is_format_supported() for vgpu10 device
This patch adds a new function svga_is_dx_format_supported() to check
for format support in a VGPU10 device.
v2: reapply the patch after svga_is_format_supported is moved to svga_format.c
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Brian Paul [Wed, 29 Nov 2017 18:28:10 +0000 (11:28 -0700)]
svga: add some devcap debugging code
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Charmaine Lee [Mon, 27 Nov 2017 21:24:26 +0000 (13:24 -0800)]
svga: fix depth and coverage mask output declaration
Set the component mask to zero for both registers.
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Fri, 17 Nov 2017 03:46:35 +0000 (19:46 -0800)]
svga: add sample positions for 2 samples
Fixes piglit tests spec@arb_sample_shading@builtin-gl-sample-position 2
spec@arb_texture_multisample@fb-completeness@2
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Thu, 16 Nov 2017 06:21:22 +0000 (22:21 -0800)]
svga: check sample count devcaps
Check sample count devcaps from the svga device to determine the
supported sample counts.
Reviewed-by: Brian Paul <brianp@vmware.com>
Brian Paul [Tue, 14 Nov 2017 16:36:23 +0000 (09:36 -0700)]
svga: fix 1-element cube map array issue
As with 1D and 2D array textures, if there's only one array element
(one cubemap in this case) we have to issue different shader code.
This fixes a number of Piglit cubemap array tests.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Tue, 14 Nov 2017 16:34:29 +0000 (09:34 -0700)]
svga: simplify array test in svga_init_shader_key_common()
And squash commit a patch to silence a compiler warning (add
default case to the switch statement).
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Charmaine Lee [Mon, 6 Nov 2017 22:13:47 +0000 (14:13 -0800)]
winsys/drm: check for CAPS2/SM41 support if VGPU10 is enabled
No need to check for HW_CAPS2 or SM4_1 support if VGPU10 is not
enabled or is explicitly disabled via the environment variable
SVGA_VGPU10.
Reviewed-by: Deepak Rawat <drawat@vmware.com>
Deepak Rawat [Thu, 2 Nov 2017 00:40:50 +0000 (17:40 -0700)]
winsys/drm: Add support for quality level in surface ioctl
A new argument "quality level" is added in surface define v3 which
represets precision settings for surface. This commit add support
for quality level in DRM_VMW_GB_SURFACE_CREATE_EXT and
DRM_VMW_GB_SURFACE_REF_EXT.
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Mon, 30 Oct 2017 14:30:33 +0000 (07:30 -0700)]
svga: sync svga3d_types.h with upstream changes
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Fri, 27 Oct 2017 22:41:37 +0000 (15:41 -0700)]
winsys/drm: enable intra_surface_copy if HW_CAP2 is supported
With drm version 2_15, we can inquire for support of HW_CAP2.
If it is supported, we can enable intra_surface_copy support.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
Charmaine Lee [Fri, 27 Oct 2017 17:24:46 +0000 (10:24 -0700)]
svga: add git version logging at init time
Before we can log the git version in the host log,
we'll add the git version in the init debug message.
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Wed, 25 Oct 2017 05:10:20 +0000 (22:10 -0700)]
svga: fix a typo in svga_texture_copy_region()
Trivial.
Charmaine Lee [Tue, 24 Oct 2017 17:57:42 +0000 (10:57 -0700)]
svga: use helper function to do copy region
Use the common helper function svga_texture_copy_region
for copy region command.
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Thu, 19 Oct 2017 23:03:44 +0000 (16:03 -0700)]
svga: fix cubemap array rendering with backed surface view
This patch fixes the layer index when rendering to a
backed surface view of a cubemap array.
Fixes piglit test fbo-generatemipmap-cubemap array.
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Mon, 16 Oct 2017 18:31:15 +0000 (11:31 -0700)]
svga: add a helper function to send ResolveCopy command
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Fri, 13 Oct 2017 22:08:02 +0000 (15:08 -0700)]
svga: sync svga3d header files
This is a squash of what was orginally three commits.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Charmaine Lee [Wed, 11 Oct 2017 21:26:52 +0000 (14:26 -0700)]
svga: add SM4_1 enable debug print
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Tue, 10 Oct 2017 22:30:21 +0000 (15:30 -0700)]
svga: fix swizzling for texture gather
Texture swizzling for texture gather needs to be done to the selected texels
rather than to the returned vector. This patch has specical cases
for the different swizzles in emit_tg4().
Fixes a lot of piglit texture gather tests.
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Wed, 4 Oct 2017 23:51:35 +0000 (16:51 -0700)]
svga: fix starting index for system values
Currently, the starting index for system values is assigned to
the next index after the highest index of the tgsi declared input registers.
But the tgsi index might be different from the actual assigned index, hence
this might cause overlap of indices.
With this patch, the shader linker keeps track of the highest index of the
translated input registers, and the next index will be used for the
starting index for system values.
Fixes SHIM errors running arb_copy_image-formats on SM4_1 device.
Reviewed-by: Brian Paul <brianp@vmware.com>
Deepak Rawat [Tue, 19 Sep 2017 22:56:26 +0000 (15:56 -0700)]
winsys/svga: Add support for new surface ioctl, multisample pattern
Kernel driver version 2.15 added new surface ioctl named:
DRM_VMW_GB_SURFACE_CREATE_EXT
DRM_VMW_GB_SURFACE_REF_EXT
The new ioctl has support for 64-bit svga3d_flags if
DRM_VMW_PARAM_SM4_1 is available.
Multisampling surface mob size calculation is added. Also synced the
relevant header update.
svga device modified the surface define command V3 with new parameter
multisampling pattern. Adding support for that in winsys.
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Wed, 5 Sep 2018 15:48:35 +0000 (09:48 -0600)]
svga: enable MSAA for SM4_1 device
The SVGA device is deprecating the DX9 MSAA support.
This patch enables MSAA for SM4_1 device by explicitly
setting the SVGA3D_SURFACE_MULTISAMPLE bit.
For SM4_1 device, only 4 samples is supported.
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Tue, 26 Sep 2017 23:23:58 +0000 (16:23 -0700)]
svga: add sample count to the surface_can_create interface
With this patch, sample count is also taken into account
when determining if a resource can be created.
Reviewed-by: Brian Paul <brianp@vmware.com>
Brian Paul [Wed, 4 Oct 2017 17:21:18 +0000 (11:21 -0600)]
svga: implement support for GL_ARB_texture_query_lod
Just translate the TGSI LODQ intruction to VGPU10 LOD instruction.
All (4) Piglit GL_ARB_texture_query_lod tests pass.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Neha Bhende [Fri, 25 Aug 2017 12:06:41 +0000 (05:06 -0700)]
svga: Add support for arb_texture_gather
With sm4_1, we can support single channel 2D or CubeMap textures.
This patch exercises this feature.
Tested with piglit
v2: As per Brian's comment
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Tue, 1 Aug 2017 03:12:07 +0000 (21:12 -0600)]
svga: add support for interpolation at sample position
Vs. sampling at the centroid or the fragment center.
Note that this does not fix failures with the Piglit
arb_sample_shading-interpolate-at-sample-position or
arb_sample_shading-ignore-centroid-qualifier.exe tests at this time.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Tue, 1 Aug 2017 03:12:07 +0000 (21:12 -0600)]
svga: clarify sys value -> input register mapping
We translate TGSI system value registers to VGPU10 input registers.
Add a comment and set file = TGSI_FILE_INPUT. That's not stricly
necessary since we map both TGSI_FILE_INPUT and TGSI_FILE_SYSTEM_VALUE
to VGPU10_OPERAND_TYPE_INPUT, but this makes the code a bit more
understandable.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Tue, 1 Aug 2017 03:12:07 +0000 (21:12 -0600)]
svga: add support for FS sample mask output
This, with the previous work for sample position/id query, allows
us to enable per-sample shading for VGPU 10.1.
Note that quite a few Piglit arb_sample_shading tests still do not
pass, but many do.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Tue, 1 Aug 2017 03:12:07 +0000 (21:12 -0600)]
svga: add support for sample id, sample position
Sample ID is just a system value. Sample position must be implemented
with the VGPU10_OPCODE_SAMPLE_POS instruction.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Tue, 1 Aug 2017 03:12:07 +0000 (21:12 -0600)]
svga: implement no-op svga_set_min_samples()
This is part of the per-sample shading feature (PIPE_CAP_SAMPLE_SHADING).
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Charmaine Lee [Wed, 4 Oct 2017 17:05:58 +0000 (11:05 -0600)]
svga: add support for independent blend function per render target
This patch adds support for GL_ARB_draw_buffers_blend extension
for SM4_1 device.
Fixes piglit test fbo-draw-buffers-blend.
This patch is squashed with a subsequent patch which fixed a
regression.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Thu, 25 May 2017 19:46:49 +0000 (13:46 -0600)]
svga: emit shader version as 4.0 or 4.1 depending on device support
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Thu, 25 May 2017 18:45:01 +0000 (12:45 -0600)]
svga: restructure nested if's in emit_src_register()
To make it cleaner for subsequent changes.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Wed, 24 May 2017 13:38:48 +0000 (07:38 -0600)]
svga: sync VGPU10ShaderTokens.h with upstream changes
This includes new DX 10.1 opcodes and tokens.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Charmaine Lee [Sat, 6 May 2017 00:00:55 +0000 (17:00 -0700)]
svga: add support for shadow cubemap array
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Fri, 5 May 2017 21:32:45 +0000 (14:32 -0700)]
svga: add support for rendering to cubemap array
Fixes piglit test arb_texture_cube_map_array-fbo-cubemap-array
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Fri, 5 May 2017 21:24:53 +0000 (14:24 -0700)]
svga: add support for TXL2 opcode
This patch adds support for cubemap array texture lookup with
explicit LOD.
Fixes piglit test arb_texture_cube_map_array-cubemap-lod
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Wed, 4 Oct 2017 16:56:30 +0000 (10:56 -0600)]
svga: add support for cubemap array
This patch adds support for cubemap array for SM4_1.
Fixes piglit test arb_texture_cube_map_array-cubemap
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Brian Paul [Wed, 4 Oct 2017 16:49:42 +0000 (10:49 -0600)]
svga: add have_sm4_1 flag, helper function
Signed-off-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Sat, 1 Sep 2018 05:28:08 +0000 (01:28 -0400)]
gallium/u_inlines: remove the destroy variable in pipe_reference_described
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Sat, 1 Sep 2018 05:22:08 +0000 (01:22 -0400)]
gallium/u_inlines: improve pipe_reference_described perf for debug builds
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Marek Olšák [Sat, 1 Sep 2018 05:17:03 +0000 (01:17 -0400)]
gallium/auxiliary: don't dereference counters twice needlessly
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Sat, 1 Sep 2018 04:36:14 +0000 (00:36 -0400)]
gallium/u_inlines: normalize naming, use dst & src, style fixes (v2)
v2: update comments
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Sun, 9 Sep 2018 01:02:18 +0000 (21:02 -0400)]
util: try to fix the Android and MacOS build
Bionic does not have pthread_setaffinity_np.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107869
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Jason Ekstrand [Mon, 10 Sep 2018 17:05:41 +0000 (12:05 -0500)]
anv: Support v3 of VK_EXT_vertex_attribute_divisor
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Jason Ekstrand [Mon, 10 Sep 2018 17:07:51 +0000 (12:07 -0500)]
vulkan: Update the XML and headers to 1.1.84
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sergii Romantsov [Fri, 7 Sep 2018 09:43:41 +0000 (12:43 +0300)]
mesa/meson: 32bit xmlconfig linkage
Building of 32bit mesa with meson causes linkage issue:
"undefined reference to `util_get_process_name'"
Fixed by adding link-with mesa_util for xmlconfig primary.
v2: Removed '[]', commit message corrected.
v3: Reverted changes in gbm and glx libraries.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107843
Fixes: 2e1e6511f76370870b5cd "util: extract get_process_name from xmlconfig.c"
Cc: Marek Olšák <marek.olsak@amd.com>
Cc: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Sergii Romantsov <sergii.romantsov@globallogic.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Jose Fonseca [Fri, 7 Sep 2018 12:27:47 +0000 (13:27 +0100)]
Require Visual Studio 2015.
We no longer need or use Visual Studio 2013.
https://ci.appveyor.com/project/jrfonseca/mesa/build/52
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Jose Fonseca [Mon, 10 Sep 2018 09:08:36 +0000 (10:08 +0100)]
util: Make util_context_thread_changed a no-op on Windows.
Spite using thrd_t types, these functions are wed to pthreads, and break
Windows builds, because thrd_current() is not implemented there, as it's
impossible to have an efficient thrd_current() implementation on
Windows.
Trivial.
Erik Faye-Lund [Wed, 5 Sep 2018 13:34:51 +0000 (14:34 +0100)]
virgl: do not map zero-sized resource
When creating textures, we avoid creating backing-store for all
multisampled textures, not just depth buffers.
So we can't try to map them later. That's just going to fail. So
let's take the blit-based code-path that seems to avoid this problem.
This make this piglit test-case no longer crash (although it still
fails):
bin/copyteximage 2D -samples=2 -auto
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Erik Faye-Lund [Wed, 5 Sep 2018 13:17:24 +0000 (14:17 +0100)]
virgl: remove dead code
We don't use the size we calculate in this function, so let's just
drop the calculation
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>