Juan A. Suarez Romero [Mon, 15 Jan 2018 10:58:50 +0000 (10:58 +0000)]
mesa: add missing RGB9_E5 format in _mesa_base_fbo_format
This fixes KHR-GL45.internalformat.renderbuffer.rgb9_e5.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 24 Jan 2018 19:51:08 +0000 (11:51 -0800)]
i965: Stop disabling aux during texture preparation
Previously, we were handling self-dependencies by marking the render
buffer and then passing disable_aux=true to prepare_texture so that it
would do a resolve. This works but ends us up doing to much resolving
in some cases. Specifically, if we're doing something such as mipmap
generation, this would cause us to resolve all levels of the texture if
even one of them is overlapping.
Instead, this commit makes us wait until we process the framebuffer to
do these resolves and we only resolve the slices needed for rendering.
Doing this resolve puts them into the pass-through state so, even if we
do texture using CCS_E, the CCS data will effectively be ignored and the
real surface contents read.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 24 Jan 2018 07:47:26 +0000 (23:47 -0800)]
i965/draw: Set NEW_AUX_STATE when draw aux changes
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104411
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104383
Fixes: ea0d2e98ecb369ab84e78c84709c0930ea8c293a
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 24 Jan 2018 07:13:10 +0000 (23:13 -0800)]
i965: Replace draw_aux_buffer_disabled with draw_aux_usage
Instead of keeping an array of booleans, we now hang onto an array of
isl_aux_usage enums. This means that the thing we are passing from
brw_draw.c to surface state setup is the thing that surface state setup
actually needs instead of an input to compute what it needs.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 24 Jan 2018 19:43:55 +0000 (11:43 -0800)]
i965/surface_state: Drop brw_aux_surface_disabled
The only purpose of this function is to disable aux on texture surfaces
when the corresponding renderbuffer has aux disabled. However, the act
of disabling aux on the renderbuffer will cause it to be resolved and
intel_miptree_texture_aux_usage will already check the resolved status
of a texture and return ISL_AUX_USAGE_NONE for it. Even if we used CCS
for it, that wouldn't really be a problem because the CCS will be in the
pass-through state and so it would effectively be ignored.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Tue, 23 Jan 2018 07:40:48 +0000 (23:40 -0800)]
i965/miptree: Add an aux_disabled parameter to render_aux_usage
Only one of the callers of intel_miptree_render_aux_usage actually took
brw->draw_aux_buffer_disabled into account. This was causing us to
ignore draw_aux_buffer_disabled for the intel_miptree_prepare_render.
This isn't a problem because the draw_aux_buffer_disabled entry was set
during texture preparation and we already did the resolve at that time.
However, this also meant that the aux_usage we were passing to
brw_cache_flush_for_render and brw_render_cache_add_bo was wrong so our
automatic cache flushing around aux_usage changes wasn't happening.
This was causing GPU hangs in Oxenfree.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104711
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104411
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104383
Fixes: ea0d2e98ecb369ab84e78c84709c0930ea8c293a
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Tue, 23 Jan 2018 07:33:53 +0000 (23:33 -0800)]
i965/miptree: Take an aux_usage in prepare/finish_render
Both callers of intel_miptree_prepare/finish_render have to call
intel_miptree_render_aux_usage anyway for other reasons. They may as
well pass the result in instead of us calling it again.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Tue, 23 Jan 2018 06:45:14 +0000 (22:45 -0800)]
aubinator: Multiply count by 4 to compute buffer sizes
The count field is in terms of dwords and not bytes.
Timothy Arceri [Tue, 23 Jan 2018 21:48:49 +0000 (08:48 +1100)]
st/glsl_to_nir: remove reallocation of sampler/image location
As far as I can tell this always just reassigns the same value.
Also as we don't curretly store UniformHash in the shader cache
removing this will help with adding a shader cache to gallium
nir drivers.
Reviewed-by: Rob Clark <robdclark@gmail.com>
Jordan Justen [Thu, 25 Jan 2018 01:07:30 +0000 (17:07 -0800)]
docs: add 18.1.0-devel release notes template
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Jordan Justen [Thu, 25 Jan 2018 01:02:55 +0000 (17:02 -0800)]
mesa: bump version to 18.1.0-devel
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Greg V [Wed, 24 Jan 2018 18:02:43 +0000 (21:02 +0300)]
meson: handle LLVM 'x.x.xgit-revision' versions
When LLVM is built inside of a git repo (even way below, e.g. /usr/ports/.git
exists, and LLVM is built in /usr/ports/devel/llvm50/work), its version
becomes something like 5.0.0git-
f8ab206b2176.
New meson versions already handle this, but we support older versions too.
Fixes: 673dda8330769 ("meson: build "radv" vulkan driver for radeon hardware")
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Greg V [Wed, 24 Jan 2018 18:02:42 +0000 (21:02 +0300)]
meson: fix getting cflags from pkg-config
get_pkgconfig_variable('cflags') always returns an empty list, it's a
function for getting *custom* variables.
Meson does not yet support asking for cflags, so explicitly invoke
pkg-config for now.
Fixes: 68076b87474e ("meson: build gallium vdpau state tracker")
Fixes: a817af8a89eb ("meson: build gallium xvmc state tracker")
Fixes: 1d36dc674d52 ("meson: build gallium omx state tracker")
Fixes: 5a785d51a6d6 ("meson: build gallium va state tracker")
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Greg V [Wed, 24 Jan 2018 18:02:40 +0000 (21:02 +0300)]
meson: fix BSD build
CC: 18.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Greg V [Wed, 24 Jan 2018 18:02:39 +0000 (21:02 +0300)]
meson: fix missing dependencies
Fixes: 66f97f6640f5 ("meson: build radeonsi")
Reviewed-by: Emil Velikov <emil.velikov@colalbora.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Grazvydas Ignotas [Mon, 22 Jan 2018 22:44:36 +0000 (00:44 +0200)]
anv: correct a duplicate check in an assert
Looks like checking both sources was intended, instead of the first one
twice. Found with Coccinelle, coccinellery/xand/xand.cocci semantic patch.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Marc Dietrich [Wed, 24 Jan 2018 21:03:51 +0000 (22:03 +0100)]
meson: fix HAVE_LLVM version define in meson build
LLVM patch level is not included in HAVE_LLVM.
Fixes: e6418ab1566d ("meson: build "radv" vulkan driver for radeon hardware")
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Dylan Baker [Tue, 23 Jan 2018 18:28:08 +0000 (10:28 -0800)]
meson: correctly set SYSCONFDIR for loading dirrc
Fixes: d1992255bb29 ("meson: Add build Intel "anv" vulkan driver")
Reported-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Dave Airlie [Wed, 24 Jan 2018 03:13:49 +0000 (13:13 +1000)]
radv: add multisample Z optimisation from amdvlk
This was just found while reading for other stuff,
src/core/hw/gfxip/gfx6/gfx6DepthStencilView.cpp.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Wed, 24 Jan 2018 02:53:26 +0000 (12:53 +1000)]
radv: move spi_baryc_cntl to pipeline
We need to enable the pos float location 2 mode anytime we have
persample not just when forced by the frag shader.
This fixes:
dEQP-VK.pipeline.multisample.min_sample_shading*
Fixes: 58c97a079 (radv: enable location at sample when persample is forced.)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Marek Olšák [Wed, 10 Jan 2018 12:35:39 +0000 (13:35 +0100)]
gallium/u_tests: add texture_barrier and FBFETCH tests
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Wed, 10 Jan 2018 12:37:08 +0000 (13:37 +0100)]
radeonsi: don't ignore pitch for imported textures
Cc: 17.2 17.3 <mesa-stable@lists.freedesktop.org>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Scott D Phillips [Wed, 24 Jan 2018 19:24:12 +0000 (11:24 -0800)]
meson: Fix define for USE_SSE41
Before we were adding -DHAVE_SSE41 which isn't what the code is
looking for, so some uses of the sse4.1 code were always being
skipped.
v2: Don't add any compile check for the quite old -msse4.1 option (Dylan)
Fixes: 84486f6462 ("meson: Enable SSE4.1 optimizations")
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Gert Wollny [Tue, 17 Oct 2017 10:36:50 +0000 (12:36 +0200)]
mesa/st/glsl_to_tgsi: remove now unneeded assert.
With the implementation of the tracking of the registers used in reladdr
asserting that a driver calling merge_register() uses the address register
is no longer needed.
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Gert Wollny [Thu, 7 Dec 2017 12:57:21 +0000 (13:57 +0100)]
mesa/st/tests: Add tests for lifetime tracking with indirect addressing
Add a code line type that accepts one layer of indirect addressing and
add tests to check that temporary register access used for indirect
addressing is accounted for in the lifetime estimation.
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Gert Wollny [Thu, 7 Dec 2017 12:51:22 +0000 (13:51 +0100)]
mesa/st/glsl_to_tgsi: Add tracking of indirect addressing registers
So far indirect addressing was not tracked to estimate the temporary
life time, and it was not needed, because code to load the address
registers was always emitted eliminating the reladdr* handles in the
past glsl-to.tgsi stages. Now, with Mareks patch allowing any 1D register
to be used for addressing on some hardware this changed, and
the tracking becomes necessary.
Because the registers have no direct indication on whether the reladdr* was
already loaded into an address register, the temporaries in reladdr* are
always tracked as reads. This may result in a slight over-estimation of the
lifetime in the cases when the load to the address register was emitted.
v2: no changes
v3: Use debug_log variable instead of directly writing to std::err in debugging
output.
v6: fix indention and typos
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (v1)
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Gert Wollny [Tue, 3 Oct 2017 07:49:37 +0000 (09:49 +0200)]
mesa/st/tests: Add tests for improved tracking of temporaries
Additional tests are added that check the tracking of access to temporaries
in if-else branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Gert Wollny [Fri, 8 Sep 2017 11:40:09 +0000 (13:40 +0200)]
mesa/st/glsl_to_tgsi: Add tracking of ifelse writes in register merging
Improve the life-time evaluation of temporary registers by also tracking
writes in both if and else branches and in up to 32 nested scopes.
As a result the estimated required register life-times can be further
reduced enabling more registers to be merged.
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Gert Wollny [Thu, 12 Oct 2017 15:10:31 +0000 (17:10 +0200)]
mesa/st/tests: cleanup whitespace usage and correct some comments
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Gert Wollny [Wed, 11 Oct 2017 17:56:46 +0000 (19:56 +0200)]
mesa/st/tests: unify MockCodeLine* classes
* Merge the classes MockCodeLine and MockCodelineWithSwizzle into
one, and refactor tests accordingly.
* Change memory allocations to use ralloc* interface.
v2:
* move the test classes into a conveniance library
* rename the Mock* classes to Fake* since they are not really
Mocks
* Base assertion of correct number of src and dst registers in tests
on what the operatand actually expects
* Fix number of destinations in one test
v6:
* fix local includes using "..." insteadof <...>
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Gert Wollny [Thu, 14 Sep 2017 10:49:07 +0000 (12:49 +0200)]
mesa/st/tests: Fix zero-byte allocation leaks
Don't allocate a zero-sized array, when no texture offsets are given.
v5: correct spaces and empty lines
Reviewed-by: Brian Paul <brianp@vmware.com>(v4)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (v1)
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Gert Wollny [Fri, 1 Dec 2017 14:46:20 +0000 (15:46 +0100)]
mesa/st/glsl_to_tgsi: Add some operators for glsl_to_tgsi related classes
Add the equal operator and the "<<" stream write operator for the
st_*_reg classes and the "<<" operator to the instruction class, and
make use of these operators in the debugging output.
v5: Fix empty lines
Reviewed-by: Brian Paul <brianp@vmware.com> (v4)
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Gert Wollny [Mon, 4 Dec 2017 22:01:08 +0000 (23:01 +0100)]
mesa/program: Add missing file types to printout
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Brian Paul [Tue, 23 Jan 2018 17:48:51 +0000 (10:48 -0700)]
vbo: fix incorrect min/max_index values in display list draw call
This fixes another regression from commit
8e4efdc895ea ("vbo: optimize
some display list drawing"). The problem was the min_index, max_index
values passed to the vbo drawing function were not computed to compensate
for the biased prim::start values.
https://bugs.freedesktop.org/show_bug.cgi?id=104746
https://bugs.freedesktop.org/show_bug.cgi?id=104742
https://bugs.freedesktop.org/show_bug.cgi?id=104690
Tested-by: Clayton Craft <clayton.a.craft@intel.com>
Fixes: 8e4efdc895ea ("vbo: optimize some display list drawing")
Reviewed-by: Emil Velikov <emil.velikov@collabora.co.uk>
Brian Paul [Thu, 18 Jan 2018 23:50:43 +0000 (16:50 -0700)]
vbo: whitespace/formatting fixes in vbo_split_inplace.c
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 18 Jan 2018 23:43:43 +0000 (16:43 -0700)]
vbo: whitespace/formatting fixes in vbo.h
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 18 Jan 2018 23:10:49 +0000 (16:10 -0700)]
vbo/i965: move vbo_all_varyings_in_vbos() to brw_draw.c
It's only used in brw_draw_prims().
s/GLboolean/bool/, etc.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 18 Jan 2018 21:50:08 +0000 (14:50 -0700)]
vbo: remove unused vbo_any_varyings_in_vbos() function
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 18 Jan 2018 21:47:18 +0000 (14:47 -0700)]
vbo: remove unneeded #includes
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 18 Jan 2018 21:39:22 +0000 (14:39 -0700)]
vbo: remove vbo_context.h and change includes to use vbo.h instead
Now vbo.h is the public interface to the VBO module.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 18 Jan 2018 21:32:38 +0000 (14:32 -0700)]
vbo: move remaining items from vbo_context.h to vbo.h
Non-VBO sources files sometimes included vbo.h while others included
vbo_context.h. We're moving all public types, functions to the former.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 18 Jan 2018 21:22:29 +0000 (14:22 -0700)]
vbo: move VBO-private types, prototypes, etc. into new vbo_private.h header
Things which should not be used outside the VBO module.
More public/private clean-ups coming.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 18 Jan 2018 21:13:34 +0000 (14:13 -0700)]
mesa: use new _vbo_install_exec_vtxfmt() function
Instead of reaching into the vbo_context object in vtxfmt.c
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 18 Jan 2018 20:51:06 +0000 (13:51 -0700)]
nouveau: remove vbo_context() call
_vbo_DestroyContext() can be safely called even if there's no VBO
module. Removes a dependency on the vbo_context() function.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 18 Jan 2018 20:50:04 +0000 (13:50 -0700)]
i965: use vbo_set_[indirect]_draw_func()
Instead of poking into the vbo_context object.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 18 Jan 2018 20:28:10 +0000 (13:28 -0700)]
vbo: move vbo_sizeof_ib_type() into vbo_exec_array.c
It's only used in this one file.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 18 Jan 2018 20:21:56 +0000 (13:21 -0700)]
mesa: move vbo_count_tessellated_primitives() to api_validate.c
It's only used in this file and has nothing VBO-specific about it.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 18 Jan 2018 19:53:12 +0000 (12:53 -0700)]
mesa: update comment on gl_display_list
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 18 Jan 2018 19:42:53 +0000 (12:42 -0700)]
mesa: whitespace clean-ups in mtypes.h
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 18 Jan 2018 19:36:42 +0000 (12:36 -0700)]
mesa: remove unused MAT_INDEX_AMBIENT/DIFFUSE/SPECULAR contants
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 18 Jan 2018 19:22:14 +0000 (12:22 -0700)]
vbo: move DLIST_DANGLING_REFS from mtypes.h to vbo_save_api.c
It's only used in this file.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Wed, 17 Jan 2018 19:54:04 +0000 (12:54 -0700)]
vbo: replace assert(0) with unreachable()
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Wed, 17 Jan 2018 22:46:28 +0000 (15:46 -0700)]
vbo: fix, add comment in vbo_save.h
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Wed, 17 Jan 2018 19:20:49 +0000 (12:20 -0700)]
vbo: whitespace, formatting fixes in vbo_split.[ch]
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Topi Pohjolainen [Tue, 16 Jan 2018 12:17:00 +0000 (14:17 +0200)]
i965: Don't try to disable render aux buffers for compute
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104546
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Jason Ekstrand [Sat, 16 Dec 2017 00:55:54 +0000 (16:55 -0800)]
anv/cmd_buffer: Move gen7 index buffer state to graphics state
Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Sat, 16 Dec 2017 00:53:03 +0000 (16:53 -0800)]
anv/cmd_buffer: Move num_workgroups to compute state
While we're here, make it an anv_address.
Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Sat, 16 Dec 2017 00:48:53 +0000 (16:48 -0800)]
anv/cmd_buffer: Move dynamic state to graphics state
Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Sat, 16 Dec 2017 00:47:56 +0000 (16:47 -0800)]
anv/cmd_buffer: Use a temporary variable for dynamic state
We were already doing this for some packets to keep the lines shorter.
We may as well just do it for all of them.
Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Sat, 16 Dec 2017 00:39:53 +0000 (16:39 -0800)]
anv/cmd_buffer: Move vb_dirty bits into anv_cmd_graphics_state
Vertex buffers are entirely a graphics pipeline thing.
Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Sat, 16 Dec 2017 00:38:10 +0000 (16:38 -0800)]
anv/cmd_buffer: Move dirty bits into anv_cmd_*_state
Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Fri, 15 Dec 2017 22:02:27 +0000 (14:02 -0800)]
anv: Separate compute and graphics descriptor sets
The Vulkan spec says:
"pipelineBindPoint is a VkPipelineBindPoint indicating whether the
descriptors will be used by graphics pipelines or compute pipelines.
There is a separate set of bind points for each of graphics and
compute, so binding one does not disturb the other."
Up until now, we've been ignoring the pipeline bind point and had just
one bind point for everything. This commit separates things out into
separate bind points.
Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102897
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Fri, 15 Dec 2017 21:59:33 +0000 (13:59 -0800)]
anv/cmd_buffer: Use anv_descriptor_for_binding for samplers
Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Fri, 15 Dec 2017 21:47:53 +0000 (13:47 -0800)]
anv/cmd_buffer: Add a helper for binding descriptor sets
This lets us unify some code between push descriptors and regular
descriptors. It doesn't do much for us yet but it will.
Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Fri, 15 Dec 2017 20:33:34 +0000 (12:33 -0800)]
anv/cmd_buffer: Refactor ensure_push_descriptor_set
It's now a function which returns the push descriptor set. Since we set
the error on the command buffer, returning the error is a little
redundant. Returning the descriptor set (or NULL on error) is more
convenient.
Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Fri, 15 Dec 2017 21:41:21 +0000 (13:41 -0800)]
anv: Remove semicolons from vk_error[f] definitions
With the semicolons, they can't be used in a function argument without
throwing syntax errors.
Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Fri, 15 Dec 2017 19:39:31 +0000 (11:39 -0800)]
anv/cmd_buffer: Add substructs to anv_cmd_state for graphics and compute
Initially, these just contain the pipeline in a base struct.
Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Fri, 15 Dec 2017 17:32:29 +0000 (09:32 -0800)]
anv/cmd_buffer: Use some pre-existing pipeline temporaries
There are several places where we'd already saved the pipeline off to a
temporary variable but, due to an artifact of history, weren't actually
using that temporary everywhere. No functional change.
Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Fri, 15 Dec 2017 17:23:08 +0000 (09:23 -0800)]
anv/cmd_buffer: Rework anv_cmd_state_reset
This splits anv_cmd_state_reset into separate init and finish functions.
This lets us share init code with cmd_buffer_create. This potentially
fixes subtle bugs where we may have missed some bit of state that needs
to get initialized on command buffer creation.
Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Fri, 15 Dec 2017 17:12:11 +0000 (09:12 -0800)]
anv/cmd_buffer: Get rid of the meta query workaround
Meta has been gone for a long time.
Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Fri, 15 Dec 2017 16:52:21 +0000 (08:52 -0800)]
anv/cmd_state: Drop the scratch_size field
This is a legacy left-over from the mechanism we used to use to handle
scratch. The new (and better) mechanism doesn't use this.
Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Fri, 15 Dec 2017 19:27:39 +0000 (11:27 -0800)]
anv/pipeline: Don't assert on more than 32 samplers
This prevents an assert when running one unreleased Vulkan game.
Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Dave Airlie [Tue, 23 Jan 2018 01:07:26 +0000 (11:07 +1000)]
radv: fix sample_mask_in loading. (v3.1)
This is ported from radeonsi and fixes:
dEQP-VK.pipeline.multisample_shader_builtin.sample_mask.bit_*
v2: don't call this path for radeonsi, it does it in the epilog.
use the radeonsi code path.
v3: handle NULL pCreateInfo->pMultisampleState properly (Samuel)
v3.1: set ps_iter_samples default to 1 (Bas)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fixes: bdcbe7c76 (radv: add sample mask input support)
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Tue, 23 Jan 2018 06:07:50 +0000 (16:07 +1000)]
radv: don't use hw resolves for r16g16 norm formats.
radeonsi has a workaround for this, but it uses a R16A16 format,
which vulkan doesn't have, we could probably come up with a work
around but for now just avoid hw resolves.
Fixes:
dEQP-VK.renderpass.suballocation.multisample.r16g16_*norm*
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fixes: 2a04f5481d (radv/meta: select resolve paths)
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Tue, 23 Jan 2018 04:57:12 +0000 (14:57 +1000)]
radv: don't use hw resolve for integer image formats
From reading AMDVLK it currently never uses hw resolve paths.
This patch takes from radeonsi which doesn't use hw resolve
for integer formats, and does the same for radv.
This fixes:
dEQP-VK.renderpass.suballocation.multisample*uint tests.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fixes: 2a04f5481d (radv/meta: select resolve paths)
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Tue, 23 Jan 2018 05:48:08 +0000 (15:48 +1000)]
radv: add fs_key meta format support to resolve passes.
Some of the hw resolve passes need the SPI color format setup
correctly.
This fixes lots of 16-bit and 32-bit format tests in
dEQP-VK.renderpass.suballocation.multisample*
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fixes: f4e499ec7914 "radv: add initial non-conformant radv vulkan driver"
Signed-off-by: Dave Airlie <airlied@redhat.com>
Grazvydas Ignotas [Mon, 22 Jan 2018 22:41:00 +0000 (15:41 -0700)]
winsys/svga: check correct member after create
.mob_fenced was already checked, probably a copy-paste bug.
Found by Coccinelle.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Grazvydas Ignotas [Mon, 22 Jan 2018 22:41:00 +0000 (15:41 -0700)]
svga: fix context alloc error handling
'cleanup' path is dereferencing 'svga' a lot, 'done' is a better choice.
Found by Coccinelle.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Christoph Haag [Sat, 20 Jan 2018 17:53:13 +0000 (18:53 +0100)]
meson: remove lib prefix from libd3dadapter9.so
Fixes: 6b4c7047d57178d336 ("meson: build gallium nine state_tracker")
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Emil Velikov [Tue, 23 Jan 2018 17:01:06 +0000 (17:01 +0000)]
docs: update calendar 18.0.0-rc1 is out
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Eric Engestrom [Tue, 19 Dec 2017 13:41:35 +0000 (13:41 +0000)]
radeon: remove left over dead code
Fixes: 4e0d99a63588c67a955f "r100: Use shared debug code"
Cc: Pauli Nieminen <suokkos@gmail.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Eric Engestrom [Fri, 12 Jan 2018 15:10:28 +0000 (15:10 +0000)]
docs: ask for backport nominations to cc: the author
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Marc Dietrich [Tue, 23 Jan 2018 14:49:43 +0000 (15:49 +0100)]
meson: fix some defines misspelled errors in meson.build
Defines
- HAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL
- HAVE_FUNC_ATTRIBUTE_VISIBILITY
were misspelled.
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Bas Nieuwenhuizen [Mon, 22 Jan 2018 08:01:29 +0000 (09:01 +0100)]
ac/nir: Use instance_rate_inputs per attribute, not per variable.
This did the wrong thing if we had e.g. an array for which only some
of the attributes use the instance index. Tripped up some new CTS
tests.
CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Jason Ekstrand [Sat, 20 Jan 2018 18:39:16 +0000 (10:39 -0800)]
anv: Return trampoline entrypoints from GetInstanceProcAddr
Technically, the Vulkan spec requires that we return valid entrypoints
for all core functionality and any available device extensions. This
means that, for gen-specific functions, we need to return a trampoline
which looks at the device and calls the right device function. In 99%
of cases, the loader will do this for us but, aparently, we're supposed
to do it too. It's a tiny increase in binary size for us to carry this
around but really not bad.
Before:
text data bss dec hex filename
3541775 204112 6136
3752023 394057 libvulkan_intel.so
After:
text data bss dec hex filename
3551463 205632 6136
3763231 396c1f libvulkan_intel.so
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Jason Ekstrand [Sat, 20 Jan 2018 18:14:10 +0000 (10:14 -0800)]
anv/entrypoints: Use an named tuple for params
This allows us to store a bit more detailed data per-param
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Jason Ekstrand [Wed, 17 Jan 2018 02:08:09 +0000 (18:08 -0800)]
anv: Only advertise enabled entrypoints
The Vulkan spec annoyingly requires us to track what core version and
what all extensions are enabled and only advertise those entrypoints.
Any call to vkGet*ProcAddr for an entrypoint for an extension the client
has not explicitly enabled is supposed to return NULL.
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Jason Ekstrand [Wed, 17 Jan 2018 02:24:56 +0000 (18:24 -0800)]
anv: Add a per-device dispatch table
We also switch GetDeviceProcAddr over to use it.
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Jason Ekstrand [Wed, 17 Jan 2018 02:11:03 +0000 (18:11 -0800)]
anv: Add a per-instance dispatch table
We also switch GetInstanceProcAddr over to use it.
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Jason Ekstrand [Wed, 17 Jan 2018 00:14:25 +0000 (16:14 -0800)]
anv: Properly NULL for GetInstanceProcAddr with a null instance
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Jason Ekstrand [Wed, 17 Jan 2018 02:08:33 +0000 (18:08 -0800)]
anv/extensions: Fix VkVersion::c_vk_version for patch == None
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Jason Ekstrand [Wed, 17 Jan 2018 01:20:33 +0000 (17:20 -0800)]
anv/entrypoints: Parse entrypoints before extensions/features
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Jason Ekstrand [Wed, 17 Jan 2018 01:00:05 +0000 (17:00 -0800)]
anv/entrypoints: Expose the different dispatch tables
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Jason Ekstrand [Wed, 17 Jan 2018 00:52:50 +0000 (16:52 -0800)]
anv/entrypoints: Split entrypoint index lookup into its own function
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Jason Ekstrand [Wed, 17 Jan 2018 00:46:35 +0000 (16:46 -0800)]
anv/entrypoints: Add a LAYERS helper variable
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Jason Ekstrand [Tue, 19 Sep 2017 21:44:15 +0000 (14:44 -0700)]
anv/entrypoints: Add an Entrypoint class
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Jason Ekstrand [Wed, 17 Jan 2018 00:22:45 +0000 (16:22 -0800)]
anv: Add a per-device table of enabled extensions
Nothing uses this at the moment, but we will need it soon.
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Jason Ekstrand [Wed, 17 Jan 2018 00:15:13 +0000 (16:15 -0800)]
anv: Use tables for device extension wrangling
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Jason Ekstrand [Wed, 17 Jan 2018 00:13:48 +0000 (16:13 -0800)]
anv: Add a per-instance table of enabled extensions
Nothing needs this yet but we will want it later.
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Jason Ekstrand [Tue, 16 Jan 2018 23:49:28 +0000 (15:49 -0800)]
anv: Use tables for instance extension wrangling
This lets us move a bunch of stuff out of codegen and back into
anv_device.c which is a bit nicer.
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>