Commit graph

189 commits

Author SHA1 Message Date
Kristian Høgsberg Kristensen
5d72d7b12d anv: Fix misc simple warnings 2016-02-15 17:32:07 -08:00
Kristian Høgsberg Kristensen
b0c30b77d4 anv: Submit fence bo only after all command buffers
We were submitting the fence bo after each command buffer in a multi
command buffer submit, causing us to occasionally complete the fence too
early.
2016-02-12 15:08:09 -08:00
Kristian Høgsberg Kristensen
39a120aefe anv: Implement VkPipelineCache
We hash the input SPIR-V, specialization constants, entrypoint and the
shader key using SHA1 to determine a unique identifier for the
combination. A VkPipelineCache is then a hash table mapping these
identifiers to the corresponding prog_data and kernel data.
2016-02-12 11:53:49 -08:00
Jason Ekstrand
699f21216f anv/device: clflush simple batches if !LLC 2016-02-12 11:00:42 -08:00
Jason Ekstrand
ea93041ccc anv/device: Use a normal BO in submit_simple_batch 2016-02-11 21:39:15 -08:00
Jason Ekstrand
3a2b23a447 anv: Add a vk_icdGetInstanceProcAddr entrypoint
Aparently there are some issues in symbol resolution if an application
packages its own loader and you have a system-installed one.  I don't
really understand the details, but it's not onorous to add.
2016-02-11 21:20:12 -08:00
Jason Ekstrand
25b09d1b5d anv/event: Use a 64-bit value
The immediate write from PIPE_CONTROL is 64-bits at least on BDW.  This
used to work on 64-bit archs because the compiler would align the following
anv_state struct up for us.  However, in 32-bit builds, they overlap and it
causes problems.
2016-02-11 19:00:56 -08:00
Kristian Høgsberg Kristensen
6cdada0360 anv: Move invariant state to small initial batch
We use the simple batch helper to submit a batch at driver startup time
which holds all the state that never changes.  We don't have a whole lot
and once we enable tesselation there'll be even less. Even so, it's a
simple mechanism and reduces our steady state batch sizes a bit.
2016-02-05 16:13:53 -08:00
Kristian Høgsberg Kristensen
c9c3344c4f anv: Split out batch submit helper from anv_DeviceWaitIdle
We'll reuse this mechanism in the next commit.
2016-02-05 16:13:52 -08:00
Jason Ekstrand
fd99f3d658 anv/device: Improve version error reporting 2016-02-02 13:16:13 -08:00
Jason Ekstrand
0d2145b50f anv/fence: Default to not ready
This is kind-of silly.  We *really* need to do a better job of making sure
all objects have all their default values set.  We probably also want to,
eventually, put everything into the BO (to save memory) and, more
specifically, make the GPU write the "ready" flag.  That way GetFenceStatus
won't ever have to call into the kernel.
2016-02-02 12:22:03 -08:00
Kristian Høgsberg Kristensen
dc5fdcd6b7 anv: Advertise robustBufferAccess
The GPU does most of this for us as long as we set up tight bounds for
the buffers, which we do. Additionally, we range check dynamically
buffers in the shader. With that it's safe to turn on robustBufferAccess.
2016-02-01 12:00:05 -08:00
Jason Ekstrand
c688e4db11 anv/wsi: Rework to be compatable with the loader 2016-01-29 20:39:21 -08:00
Jason Ekstrand
a19ceee46c anv/device: Fix version check
The bottom-end check was wrong so it was only working on <= 1.0.0.  Oops.
2016-01-29 20:36:58 -08:00
Kristian Høgsberg Kristensen
0c4ef36360 anv: clflush is only orderered against mfence
We can't use the more fine-grained load and store fence commands (lfence
and mfence), since clflush is only guaranteed to be ordered with respect
to mfence.
2016-01-29 14:56:41 -08:00
Kristian Høgsberg Kristensen
31d3486bd2 anv: Limit flushing to the range of mapped memory 2016-01-29 14:56:41 -08:00
Jason Ekstrand
608b411e9f anv/device: Add a better version check.
We now check that the requested version is precicely within the range of
versions that we support.
2016-01-28 08:19:40 -08:00
Jason Ekstrand
6286a74f6b anv/device: Advertise 1.0.2 2016-01-27 22:02:51 -08:00
Jason Ekstrand
c64bc5463d anv/device: Improve the api version check to allow 1.0.X 2016-01-27 21:56:46 -08:00
Chad Versace
8cc6f058ce anv/gen8: Begin enabling pipeline multisample state
As far as I can tell, this patch sets all pipeline multisample state
except:
    - alpha to coverage
    - alpha to one
    - the dispatch count for per-sample dispatch
2016-01-27 16:52:27 -08:00
Kenneth Graunke
38a3a535eb anv: Update the device limits.
Fixes dEQP-VK.api.info.device.properties.  I haven't tested any others.
2016-01-26 23:09:45 -08:00
Francisco Jerez
6840cc1513 anv/image: clflush surface state map in anv_fill_buffer_surface_state().
Some of its users had the required clflush on non-LLC platforms, some
didn't.  Put the clflush in anv_fill_buffer_surface_state() so we
don't forget.
2016-01-26 15:14:50 -08:00
Jason Ekstrand
6b6a8a99f8 HACK/i965: Default to scalar GS on BDW+ 2016-01-25 15:52:53 -08:00
Chad Versace
1c5d7b38e2 anv: Use isl_device_get_sample_counts()
Use it in vkGetPhysicalDeviceProperties.
2016-01-22 17:19:57 -08:00
Kristian Høgsberg Kristensen
7b7a7c2bfc vk: Make maxSamplerAllocationCount more reasonable
We can't allocate 4 billion samplers. Let's go with 64k.
2016-01-20 14:36:52 -08:00
Jason Ekstrand
e45748bade anv/device: Default to scalar GS on BDW+ 2016-01-20 11:16:44 -08:00
Jason Ekstrand
56dbf13045 anv: Add support for VK_WHOLE_SIZE several places 2016-01-19 16:53:35 -08:00
Jason Ekstrand
580b2e85e4 isl/device: Add a flag for bit 6 swizzling 2016-01-18 17:21:05 -08:00
Jason Ekstrand
45d17fcf9b anv: Misc allocation scope fixes 2016-01-18 14:04:13 -08:00
Jason Ekstrand
d49298c702 gen8: Fix border color
The border color packet is specified as a 64-byte aligned address relative
to dynamic state base address.  The way the packing functions are currently
set up, we need to provide it with (offset >> 6) because it just shoves the
bits in where the PRM says they go and isn't really aware that it's an
address.
2016-01-18 12:16:31 -08:00
Jason Ekstrand
24a6fcba77 vulkan-1.0.0: Bump the version to 1.0.0 2016-01-14 08:26:37 -08:00
Jason Ekstrand
aab9517f3d vulkan-1.0.0: Misc. field and argument renames 2016-01-14 07:41:45 -08:00
Jason Ekstrand
802f00219a anv/device: Update features and limits 2016-01-14 07:30:46 -08:00
Jason Ekstrand
aee970c844 anv/device: Bump the max program size again
No one will ever need more than 128K, right?
2016-01-12 13:49:05 -08:00
Kristian Høgsberg Kristensen
925ad84700 vk: Advertise number of timestamp bits
We have 36 bits.
2016-01-09 00:51:14 -08:00
Kristian Høgsberg Kristensen
dae800daa8 vk: Expose correct timestampPeriod for SKL
Skylake uses 83.333ms per tick.
2016-01-09 00:50:04 -08:00
Kristian Høgsberg Kristensen
7c5e1fd998 vk: Remove unsupported warnings for Skylake and Broxton
These are working as well as Broadwell and Cherryiew. The recent merge
from mesa master brings in Kabylake device info and that should be all
we need to enable that.
2016-01-08 22:29:06 -08:00
Jordan Justen
c7f6e42a7d anv: Increate dynamic pool block size from 2k to 16k
This is needed because compute push constant data is replicated per
invocation. For gen7, this can be up to 64. With a push constant data
max of 128 bytes, this is 8k of data. We need additional space for
local-id payloads, so we are going with 16k for now.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-01-08 13:03:30 -08:00
Kristian Høgsberg Kristensen
30521fb19e vk: Implement a basic pipeline cache
This is not really a cache yet, but it allows us to share one state
stream for all pipelines, which means we can bump the block size without
wasting a lot of memory.
2016-01-05 12:03:21 -08:00
Kristian Høgsberg Kristensen
f551047751 vk: Destroy device->mutex when destroying the device 2016-01-05 12:03:21 -08:00
Kristian Høgsberg Kristensen
5526c1782a vk: Handle allocation failures in meta init paths
Fixes dEQP-VK.api.object_management.alloc_callback_fail.* failures.
2016-01-04 10:07:08 -08:00
Jason Ekstrand
6b0b57225c anv/device: Only allocate whole pages in AllocateMemory
The kernel is going to give us whole pages anyway, so allocating part of a
page doesn't help.  And this ensures that we can always work with whole
pages.
2016-01-02 07:52:24 -08:00
Jason Ekstrand
f076d5330d anv/device: Handle non-4k-aligned calls to MapMemory
As per the spec:

   minMemoryMapAlignment is the minimum required alignment, in bytes, of
   host-visible memory allocations within the host address space. When
   mapping a memory allocation with vkMapMemory, subtracting offset bytes
   from the returned pointer will always produce a multiple of the value of
   this limit.
2016-01-01 09:29:29 -08:00
Jason Ekstrand
3421ba1843 anv/device: Place memory types at heapIndex == 0
Previously, they were at heapIndex == 1 even though we only advertised one
heap.
2015-12-30 19:32:43 -08:00
Kristian Høgsberg Kristensen
a00524a216 vk: Unstub VkSemaphore implementation
There really is nothing to do for us here, at least with the current
kernel interface.
2015-12-28 21:57:56 -08:00
Jason Ekstrand
9c84b6cce0 anv/device: Set device->info sooner in CreateDevice
anv_block_pool_init calls anv_block_pool_grow which checks
device->info.has_llc to see if it needs to set caching parameters.
If we don't set device->info early enough, this reads an undefined value
which is probably 0 and not what we want on llc platforms.

Found with valgrind.
2015-12-28 13:29:01 -08:00
Kristian Høgsberg Kristensen
220ac9337b vk: Only require wc bo mmap for !llc GPUs 2015-12-19 22:25:57 -08:00
Kristian Høgsberg Kristensen
c4802bc44c vk/gen8: Implement VkEvent for gen8
We use PIPE_CONTROL for setting and resetting the event from cmd buffers
and MI_SEMAPHORE_WAIT in polling mode for waiting on an event.
2015-12-19 22:17:19 -08:00
Kristian Høgsberg Kristensen
8ac46d84ff vk: Fix check for I915_PARAM_MMAP_VERSION
Comparing the wrong thing for < 1.
2015-12-18 17:24:19 -08:00
Jason Ekstrand
b1325404c5 anv/device: Handle zero-sized memory allocations 2015-12-17 11:00:38 -08:00