Jason Ekstrand
d842a6965f
vk/compiler: Free the GL errors data
2015-06-09 12:36:23 -07:00
Jason Ekstrand
9f292219bf
vk/compiler: Free more of prog_data when tearing down a pipeline
2015-06-09 12:36:23 -07:00
Jason Ekstrand
66b00d5e5a
vk/queue: Embed the queue in and allocate it with the device
2015-06-09 12:36:23 -07:00
Jason Ekstrand
38f5eef59d
vk/device: Free border color states when we have valgrind
2015-06-09 12:36:23 -07:00
Jason Ekstrand
999b56c507
vk/device: Destroy all batch buffers
...
Due to a copy+paste error, we were destroying all but the first batch or
surface state buffer. Now we destroy them all.
2015-06-09 12:36:23 -07:00
Jason Ekstrand
3a38b0db5f
vk/meta: Clean up temporary objects
2015-06-09 12:36:23 -07:00
Jason Ekstrand
9d6f55dedf
vk/surface_view: Add a destructor
2015-06-09 12:36:23 -07:00
Chad Versace
e6162c2fef
vk/image: Add anv_image::h_align,v_align
...
Use the new fields to compute RENDER_SURFACE_STATE.Surface*Alignment.
We still hardcode them to 4, though.
2015-06-09 12:19:24 -07:00
Jason Ekstrand
58afc24e57
vk/allocator: Remove the concept of a slave block pool
...
This reverts commit d24f8245db .
2015-06-08 17:46:32 -07:00
Jason Ekstrand
b6363c3f12
vk/device: Remove the binding table pools/streams
2015-06-08 17:45:57 -07:00
Jason Ekstrand
531549d9fc
vk/pipeline: Move freeing the program stream to pipeline.c
...
It's created in pipeline.c so we should free it there.
2015-06-08 14:27:04 -07:00
Jason Ekstrand
66a4dab89a
vk/pipeline: Don't destroy the program stream
...
It's freed in compiler.cpp and we don't want to free it twice.
2015-06-08 13:53:19 -07:00
Jason Ekstrand
920fb771d4
vk/allocator: Make the use of NULL_BLOCK in state_stream_finish explicit
2015-06-08 13:53:19 -07:00
Kristian Høgsberg Kristensen
52637c0996
vk: Quiet a few warnings
2015-06-08 08:51:40 -07:00
Kristian Høgsberg Kristensen
9eab70e54f
vk: Create a minimal context for the compiler
...
This avoids the full brw context initialization and just sets up context
constants, initializes extensions and sets a few driver vfuncs for the
front-end GLSL compiler.
2015-06-08 08:51:40 -07:00
Jason Ekstrand
ce00233c13
vk/cmd_buffer: Use the dynamic state stream in emit_dynamic and merge_dynamic
2015-06-05 17:26:41 -07:00
Jason Ekstrand
e69588b764
vk/device: Use a 64-byte alignment for CC state
2015-06-05 17:26:26 -07:00
Jason Ekstrand
c2eeab305b
vk/pipeline: Actually free the program stream and dynamic pool
2015-06-05 17:26:26 -07:00
Jason Ekstrand
ed2ca020f8
vk/allocator: Avoid double-free in the bo pool
2015-06-05 17:12:28 -07:00
Jason Ekstrand
aa523d3c62
vk/gem: Call VALGRIND_FREELIKE_BLOCK before unmapping
2015-06-05 16:41:49 -07:00
Chad Versace
87d98e1935
vk: Fix 2 incorrect typecasts
...
The compiler didn't find the cast errors because all Vulkan types are
just integers.
2015-06-04 14:32:22 -07:00
Chad Versace
b981379bcf
vk: Make make clean remove generated spirv headers
2015-06-04 14:26:46 -07:00
Jason Ekstrand
8d930da35d
vk/allocator: Remove an unneeded VG() wrapper
2015-06-04 09:14:33 -07:00
Jason Ekstrand
7f90e56e42
vk/device: Dissalow device destruction
2015-06-04 09:14:33 -07:00
Chad Versace
9cd42b3dea
vk: Fix build
...
Commit 1286bd, which deleted vk.c, broke the build. Update the Makefile
to fix it.
2015-06-04 09:01:30 -07:00
Jason Ekstrand
251aea80b0
vk/DS: Mask stencil masks to 8 bits
2015-06-03 16:59:13 -07:00
Kristian Høgsberg Kristensen
a37d122e88
vk: Set color/blend state in meta clear if not set yet
2015-06-02 23:08:05 -07:00
Kristian Høgsberg Kristensen
1286bd3160
vk: Delete vk.c test case
...
We now have crucible up and running and all vk sub-cases have been moved
over. Delete this crufty old hack of a test case.
2015-06-02 22:57:42 -07:00
Kristian Høgsberg Kristensen
2f6aa424e9
vk: Update generated headers with support for 64 bit fields
2015-06-02 22:57:42 -07:00
Kristian Høgsberg Kristensen
5744d1763c
vk: Set cb_state to NULL at cmd buffer create time
...
Dynamic color/blend state can be NULL in case we're not rendering to
color targets (only output to depth and/or stencil). Initialize
cmd_buffer->cb_state to NULL so we can reliably detect whether it's been
set or not.
2015-06-02 22:57:42 -07:00
Kristian Høgsberg Kristensen
c8f078537e
vk: Implement vertexOffset parameter of vkCmdDrawIndexed()
...
As exposed by the func.draw_indexed test, we were ignoring the argument
and hardcoding 0.
2015-06-02 22:57:42 -07:00
Jason Ekstrand
e702197e3f
vk/formats: Add a name to the metadata and better logging
2015-06-02 11:30:39 -07:00
Jason Ekstrand
fbafc946c6
vk/formats: Rework the formats table
2015-06-02 11:30:39 -07:00
Kristian Høgsberg Kristensen
f98c89ef31
vk: Move query related functionality to new file query.c
2015-06-01 21:52:45 -07:00
Jason Ekstrand
d4cbf6a728
vk/compiler: Add an index_count to the bind map and check for OOB
2015-06-01 12:25:58 -07:00
Jason Ekstrand
510b5c3bed
vk/HACK: Plumb real descriptor set/index into textures
2015-06-01 12:25:58 -07:00
Kristian Høgsberg Kristensen
5caa408579
vk: Indent tables to align '=' at column 48
2015-05-31 22:36:26 -07:00
Kristian Høgsberg Kristensen
76bb658518
vk: Add support for anisotropic bits
2015-05-31 22:15:34 -07:00
Kristian Høgsberg Kristensen
dc56e4f7b8
vk: Implement support for sampler border colors
...
This supports the three Vulkan border color types for float color
formats. The support for integer formats is a little trickier, as we
don't know the format of the texture at this time.
2015-05-31 17:20:48 -07:00
Jason Ekstrand
e497ac2c62
vk/device: Only flush the texture cache when setting state base address
...
After further examination, it appears that the other flushes and stalls
weren't actually needed.
2015-05-30 18:04:50 -07:00
Jason Ekstrand
2251305e1a
vk/cmd_buffer: Track descriptor set dirtying per-stage
2015-05-30 10:07:29 -07:00
Jason Ekstrand
33cccbbb73
vk/device: Emit PIPE_CONTROL flushes surrounding new STATE_BASE_ADDRESS
...
According to the bspec, you're supposed to emit a PIPE_CONTROL with a CS
stall and a render target flush prior to chainging STATE_BASE_ADDRESS. A
little experimentation, however, shows that this is not enough. It also
appears as if you have to flush the texture cache after chainging base
address or things won't propagate properly.
2015-05-30 08:08:07 -07:00
Jason Ekstrand
b2b9fc9fad
vk/allocator: Don't call VALGRIND_MALLOCLIKE_BLOCK on fresh gem_mmap's
2015-05-29 21:15:47 -07:00
Jason Ekstrand
03ffa9ca31
vk: Don't crash on partial descriptor sets
2015-05-29 20:43:10 -07:00
Jason Ekstrand
4ffbab5ae0
vk/device: Allow for starting a new surface state buffer
...
This commit allows for us to create a whole new surface state buffer when
the old one runs out of room. We simply re-emit the state base address for
the new state, re-emit binding tables, and keep going.
2015-05-29 17:49:41 -07:00
Jason Ekstrand
c4bd5f87a0
vk/device: Do lazy surface state emission for binding tables
...
Before, we were emitting surface states up-front when binding tables were
updated. Now, we wait to emit the surface states until we emit the binding
table. This makes meta simpler and should make it easier to deal with
swapping out the surface state buffer.
2015-05-29 16:51:11 -07:00
Kristian Høgsberg Kristensen
4aecec0bd6
vk: Store dynamic slot index with struct anv_descriptor_slot
...
We need to make sure we use the right index into dynamic offset
array. Dynamic descriptors can be present or not in different stages and
to get the right offset, we need to compute the index at
vkCreateDescriptorSetLayout time.
2015-05-29 11:32:53 -07:00
Kristian Høgsberg Kristensen
fad418ff47
vk: Implement dynamic buffer offsets
...
We do this by creating a surface state on the fly that incorporates the
dynamic offset. This patch also refactor the descriptor set layout
constructor a bit to be less clever with switch statement fall
through. Instead of duplicating the subtle code to update the sampler
and surface slot map, we just use two switch statements.
2015-05-28 22:41:20 -07:00
Jason Ekstrand
9ffc1bed15
vk/device: Split state base address emit into its own function
2015-05-28 15:34:08 -07:00
Jason Ekstrand
468c89a351
vk/device: Use anv_batch_emit for MI_BATCH_BUFFER_START
2015-05-28 15:25:02 -07:00