Kristian Høgsberg
e4c11f50b5
vk: Call finish for binding table state stream
2015-05-18 21:12:13 -07:00
Jason Ekstrand
851495d344
vk/meta: Use the new *view_init functions and stack-allocated views
...
This should save us a good deal of the leakage that meta currently has.
2015-05-18 20:57:43 -07:00
Jason Ekstrand
4668bbb161
vk/image: Factor view creation out into separate *_init functions
...
The *_init functions work basically the same as the Vulkan entrypoints
except that they act on an already-created view and take an optional
command buffer option. If a command buffer is given, the surface state is
allocated out of the command buffer's state stream.
2015-05-18 20:57:43 -07:00
Jason Ekstrand
7c9f209427
Revert "vk/allocator: Don't use memfd when valgrind is detected"
...
This reverts commit b6ab076d6b .
It turns out setting USE_MEMFD to 0 is really bad because it means we can't
resize the pool. Besides, valgrind SVN handles memfd so we really don't
need this fallback for valgrind anymore.
2015-05-18 20:57:43 -07:00
Jason Ekstrand
923691c70d
vk: Use a separate block pool and state stream for binding tables
...
The binding table pointers packet only allows for a 16-bit binding table
address so all binding tables have to be in the first 64 KB of the surface
state BO. We solve this by adding a slave block pool that pulls off the
first 64 KB worth of blocks and reserves them for binding tables.
2015-05-18 20:57:43 -07:00
Jason Ekstrand
d24f8245db
vk/allocator: Add a concept of a slave block pool
...
We probably need a better name but this will do for now.
2015-05-18 20:57:43 -07:00
Kristian Høgsberg
997596e4c4
vk/test: Add test that prints format features
2015-05-18 20:52:44 -07:00
Kristian Høgsberg
241b59cba0
vk/test: Test timestamps and occlusion queries
2015-05-18 20:52:44 -07:00
Kristian Høgsberg
ae9ac47c74
vk: Make timestamp command work correctly
...
This was using the wrong timestamp register and needs to write a 64 bit
value.
2015-05-18 20:52:43 -07:00
Kristian Høgsberg
82ddab4b18
vk: Make occlusion query work, both copy and get functions
2015-05-18 20:52:43 -07:00
Kristian Høgsberg
1d40e6ade8
vk: Update generated header files
...
This fixes a problem where register addresses where incorrectly shifted.
2015-05-18 20:52:43 -07:00
Kristian Høgsberg
f330bad545
vk: Only fill render targets for meta clear
...
Clear inherits the render targets from the current render pass. This
means we need to fill out the binding table after switching to meta
bindings. However, meta copies etc happen outside a render pass and
break when we try to fill in the render targets. This change fills the
render targets only for meta clear.
2015-05-18 20:52:43 -07:00
Jason Ekstrand
b6c7d8c911
vk/pipeline: Use a state_stream for storing programs
...
Previously, we were effectively using a state_stream, it was just
hand-rolled based on a block pool. Now we actually use the data structure.
2015-05-18 15:58:20 -07:00
Jason Ekstrand
4063b7deb8
vk/allocator: Add support for valgrind tracking of state pools and streams
...
We leave the block pool untracked so that reads/writes to freed blocks
will get caught and do the tracking at the state pool/stream level. We
have to do a few extra gymnastics for streams because valgrind works in
terms of poitners and we work in terms of separate map and offset.
Fortunately, the users of the state pool and stream should always be using
the map pointer provided in the anv_state structure. We just have to
track, per block, the map that was used when we initially got the block.
Then we can make sure we always use that map and valgrind should stay
happy.
2015-05-18 15:58:20 -07:00
Jason Ekstrand
b6ab076d6b
vk/allocator: Don't use memfd when valgrind is detected
2015-05-18 15:58:20 -07:00
Jason Ekstrand
682d11a6e8
vk/allocator: Assert that block_pool_grow succeeds
2015-05-18 15:48:19 -07:00
Jason Ekstrand
28804fb9e4
vk/gem: VG_CLEAR the padding for the gem_mmap struct
2015-05-18 12:05:17 -07:00
Jason Ekstrand
8440b13f55
vk/meta: Rework the indentation style
...
No functional change.
2015-05-18 10:43:51 -07:00
Kristian Høgsberg
5286ef7849
vk: Provide more realistic values for device info
2015-05-18 10:27:08 -07:00
Kristian Høgsberg
69fd473321
vk: Use a temporary buffer for formatting in finishme
...
This is more likely to avoid breaking up the message when racing with
other threads.
2015-05-18 10:27:08 -07:00
Jason Ekstrand
cd7ab6ba4e
vk/meta: Add an initial implementation of vkCmdCopyBuffer
...
Compile-tested only
2015-05-18 10:27:08 -07:00
Jason Ekstrand
c25ce55fd3
vk/meta: Add an initial implementation of vkCmdCopyBufferToImage
...
Compile-tested only
2015-05-18 10:27:08 -07:00
Jason Ekstrand
08bd554cda
vk/meta: Add an initial implementation of vkCmdBlitImage
...
Compile-tested only
2015-05-18 10:27:08 -07:00
Jason Ekstrand
fb27d80781
vk/meta: Add an initial implementation of vkCmdCopyImage
...
Compile-tested only
2015-05-18 10:27:08 -07:00
Jason Ekstrand
c15f3834e3
vk/gem: Set the gem_mmap.flags parameter to 0 if it exists
2015-05-18 10:27:08 -07:00
Jason Ekstrand
f7b0f922be
vk/gem: Only VK_CLEAR the addr_ptr in gen_mmap
2015-05-18 10:27:07 -07:00
Kristian Høgsberg
ca7e62d421
vk: Add a logger wrapper for the generated entrypoint
2015-05-18 10:27:07 -07:00
Kristian Høgsberg
eb92745b2e
vk/gem: Just return -1 from anv_gem_wait() on error
...
We were returning -errno, unlike all the other gem functions.
2015-05-18 10:27:07 -07:00
Kristian Høgsberg
05754549e8
vk: Fix vkGetOjectInfo return values
...
We weren't properly returning the allocation count.
2015-05-18 10:27:07 -07:00
Kristian Høgsberg
6afb26452b
vk: Implement fences
...
This basic implementation uses a throw-away bo for synchronization.
2015-05-18 10:27:07 -07:00
Kristian Høgsberg
e26a7ffbd9
vk/meta: Use anv_* internal entrypoints
2015-05-18 10:27:07 -07:00
Kristian Høgsberg
b7fac7a7d1
vk: Implement allocation count query
2015-05-18 10:27:07 -07:00
Kristian Høgsberg
783e6217fc
vk: Change pData/pDataSize semantics
...
We now always copy the entire struct unless pData is NULL and
unconditionally write back the struct size. It's not clear this is
useful if the structs may grow over time, but it seems to be the
expected behaviour for now.
2015-05-18 10:27:07 -07:00
Kristian Høgsberg
b4b3bd1c51
vk: Return VK_SUCCESS from vkAllocDescriptorSets
...
This should've been returning VK_SUCCESS all along.
2015-05-18 10:27:07 -07:00
Kristian Høgsberg
a9f2115486
vk: Return VK_SUCCESS for all descriptor pool entry points
2015-05-18 10:27:07 -07:00
Kristian Høgsberg
60ebcbed54
vk: Start Implementing vkGetFormatInfo()
...
We move the format table and vkGetFormatInfo to their own file in the
process.
2015-05-18 10:27:07 -07:00
Kristian Høgsberg
454345da1e
vk: Add script for generating ifunc entry points
...
This lets us generate a hash table for vkGetProcAddress and lets us call
public functions internally without the public entrypoint overhead.
2015-05-18 10:27:02 -07:00
Kristian Høgsberg
333bcc2072
vk: Fix vulkan header inconsistency
...
The function pointer typedef and the function prototype for
vkCmdClearColorImage() didn't agree. Fix the typedef to match the
prototype.
2015-05-17 21:08:31 -07:00
Kristian Høgsberg
b9eb56a404
vk: Add function pointer typedef for intel extension
...
Also guard function prototype by VK_PROTOTYPES.
2015-05-17 21:08:30 -07:00
Kristian Høgsberg
75cb85c56a
vk: Add missing VKAPI for vkQueueRemoveMemReferences
2015-05-17 21:08:30 -07:00
Jason Ekstrand
a924ea0c75
Merge remote-tracking branch 'fdo-personal/wip/nir-vtn' into vulkan
...
This adds the SPIR-V -> NIR translator.
2015-05-16 12:43:16 -07:00
Jason Ekstrand
a63952510d
nir/spirv: Don't assert that the current block is empty
...
It's possible that someone will give us SPIR-V code in which someone
needlessly branches to new blocks. We should handle that ok now.
2015-05-16 12:34:34 -07:00
Jason Ekstrand
4e44dcc312
nir/spirv: Add initial support for samplers
2015-05-16 12:34:15 -07:00
Jason Ekstrand
d6f52dfb3e
nir/spirv: Move Exp and Log to the list of currently unhandled ALU ops
...
NIR doesn't have the native opcodes for them anymore
2015-05-16 12:33:32 -07:00
Jason Ekstrand
a53e795524
nir/types: Add support for sampler types
2015-05-16 12:32:58 -07:00
Jason Ekstrand
0fa9211d7f
nir/spirv: Make the global constants in spirv.h static
...
I've been promissed in a bug that this will be fixed in a future version of
the header. However, in the interest of my branch building, I'm adding
these changes in myself for the moment.
2015-05-16 11:16:34 -07:00
Jason Ekstrand
036a4b1855
nir/spirv: Handle jump-to-loop in a more general way
2015-05-16 11:16:34 -07:00
Jason Ekstrand
56f533b3a0
nir/spirv: Handle boolean uniforms correctly
2015-05-16 11:16:34 -07:00
Jason Ekstrand
64bc58a88e
nir/spirv: Handle control-flow with loops
2015-05-16 11:16:34 -07:00
Jason Ekstrand
3a2db9207d
nir/spirv: Set a name on temporary variables
2015-05-16 11:16:34 -07:00