Kristian Høgsberg
a1d30f867d
vk: Add support for dynamic and pipeline color blend state
2015-05-26 17:12:37 -07:00
Kristian Høgsberg
610e6291da
vk: Allocate samplers from dynamic stream
2015-05-26 11:50:34 -07:00
Kristian Høgsberg
b29f44218d
vk: Emit color calc state
...
This involves pulling stencil ref values out of DS dynamic state and the
blend constant out of CB dynamic state.
2015-05-26 11:27:31 -07:00
Kristian Høgsberg
998837764f
vk: Program depth bias
...
This makes 3DSTATE_RASTER a split state command.
2015-05-26 11:27:31 -07:00
Kristian Høgsberg
cbe7ed416e
vk: Implement dynamic and pipeline ds state
2015-05-25 20:20:31 -07:00
Kristian Høgsberg
37743f90bc
vk: Set up depth and stencil buffers
2015-05-25 20:20:31 -07:00
Kristian Høgsberg
0997a7b2e3
vk: Add basic MOCS settings
...
This matches what we do for GL.
2015-05-25 20:20:31 -07:00
Jason Ekstrand
ae8c93e023
vk/cmd_buffer: Initialize the pipeline pointer to NULL
...
If a meta operation is called before the pipeline is set, this can cause
uses of undefined values. They *should* be harmless, but we might as well
shut up valgrind on this one too.
2015-05-25 17:14:49 -07:00
Jason Ekstrand
912944e59d
vk/device: Use the correct number of viewports when creating default VP state
...
Fixes valgrind uninitialized value errors
2015-05-25 17:14:49 -07:00
Jason Ekstrand
57153da2d5
vk: Actually implement some sort of destructor for all object types
2015-05-22 15:15:08 -07:00
Jason Ekstrand
0f0b5aecb8
vk/pipeline: Track VB's that are actually used by the pipeline
...
Previously, we just blasted out whatever VB's we had marked as "dirty"
regardless of which ones were used by the pipeline. Given that the stride
of the VB is embedded in the pipeline this can cause problems. One problem
is if the pipeline doesn't use the given VB binding we emit a bogus stride.
Another problem is that we weren't properly resetting the dirty bits when
the pipeline changed.
2015-05-21 16:58:53 -07:00
Jason Ekstrand
0a54751910
vk/device: Memset descriptor sets to 0 and handle descriptor set holes
2015-05-21 16:33:04 -07:00
Jason Ekstrand
519fe765e2
vk: Do relocations in surface states when they are created
...
Previously, we waited until later and did a pass through the used surfaces
and did the relocations then. This lead to doing double-relocations which
was causing us to get bogus surface offsets.
2015-05-21 15:55:29 -07:00
Kristian Høgsberg
f9e66ea621
vk: Remove render pass stub call
...
This isn't really a stub.
2015-05-20 20:34:52 -07:00
Kristian Høgsberg
a29df71dd2
vk: Add WSI implementation
2015-05-20 20:34:52 -07:00
Kristian Høgsberg
f886647b75
vk: Add debug stubs
2015-05-20 20:34:52 -07:00
Kristian Høgsberg
a1bd426393
vk: Stream surface state instead of using the surface pool
...
Since the binding table pointer is only 16 bits, we can only have 64kb
of binding table state allocated at any given time. With a block size of
1kb, that amounts to just 64 command buffers, which is not enough.
2015-05-20 20:34:52 -07:00
Chad Versace
a61f307996
vk: Fix result of vkCreateInstance
...
When fill_physical_device() fails, don't return VK_SUCCESS.
2015-05-20 19:51:10 -07:00
Kristian Høgsberg
e4c11f50b5
vk: Call finish for binding table state stream
2015-05-18 21:12:13 -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
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
5286ef7849
vk: Provide more realistic values for device info
2015-05-18 10:27:08 -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
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
75cb85c56a
vk: Add missing VKAPI for vkQueueRemoveMemReferences
2015-05-17 21:08:30 -07:00
Jason Ekstrand
057bef8a84
vk/device: Use bias rather than layers for computing binding table size
...
Because we statically use the first 8 binding table entries for render
targets, we need to create a table of size 8 + surfaces.
2015-05-16 10:42:53 -07:00
Jason Ekstrand
4223de769e
vk/device: Simplify surface_count calculation
2015-05-16 10:23:09 -07:00
Kristian Høgsberg
3b9f32e893
vk: Make cmd_buffer->bindings a pointer
...
This lets us save and restore efficiently by just moving the pointer to
a temporary bindings struct for meta.
2015-05-15 18:12:07 -07:00
Kristian Høgsberg
9540130c41
vk: Move vertex buffers into struct anv_bindings
2015-05-15 16:34:31 -07:00
Kristian Høgsberg
bf096c9ec3
vk: Build binding tables at bind descriptor time
...
This changes the way descriptor sets and layouts work so that we fill
out binding table contents at the time we bind descriptor sets. We
manipulate the binding table contents and sampler state in a shadow-copy
in anv_cmd_buffer. At draw time, we allocate the actual binding table
and sampler state and flush the anv_cmd_buffer copies.
2015-05-15 16:05:31 -07:00
Kristian Høgsberg
0a775e1eab
vk: Rename dyn_state_pool to dynamic_state_pool
...
Given that we already tolerate surface_state_pool and the even longer
instruction_state_pool, there's no reason to arbitrarily abbreviate
dynamic.
2015-05-15 15:22:29 -07:00
Kristian Høgsberg
f5b0f1351f
vk: Consolidate image, buffer and color attachment views
...
These are all just surface state, offset and a bo.
2015-05-15 15:22:29 -07:00
Jason Ekstrand
a1309c5255
vk/pass: Emit a flushing pipe control at the end of the pass
...
This is rather crude but it at least makes sure that all the render targets
get flushed at the end of the pass. We probably actually want to do
somthing based on image layout traansitions, but this will work for now.
2015-05-13 22:23:30 -07:00
Kristian Høgsberg
83c7e1f1db
vk: Add support for sampler descriptors
2015-05-13 14:47:11 -07:00
Kristian Høgsberg
4f9eaf77a5
vk: Use a typesafe anv_descriptor struct
2015-05-13 14:47:11 -07:00
Kristian Høgsberg
18acfa7301
vk: Fix copy-n-paste sType in vkCreateSampler
2015-05-13 14:47:11 -07:00
Kristian Høgsberg
a1ec789b0b
vk: Add a dynamic state stream to anv_cmd_buffer
...
We'll need this for sampler state.
2015-05-13 14:47:11 -07:00
Kristian Høgsberg
3f52c016fa
vk: Move struct anv_sampler to private.h
2015-05-13 14:47:11 -07:00
Kristian Høgsberg
a77229c979
vk: Allocate layout->count number of descriptors
...
layout->count is the number of descriptors the application
requested. layout->total is the number of entries we need across all
stages.
2015-05-13 14:47:11 -07:00
Kristian Høgsberg
a3fd136509
vk: Fill out sampler state from API values
2015-05-13 14:47:11 -07:00
Kristian Høgsberg
2b7a060178
vk: Fix stale error handling in vkQueueSubmit
2015-05-12 14:38:58 -07:00
Kristian Høgsberg
cb986ef597
vk: Submit all cmd buffers passed to vkQueueSubmit
2015-05-12 14:38:12 -07:00
Jason Ekstrand
ffe9f60358
vk: Add stub() and stub_return() macros and mark piles of functions as stubs
2015-05-12 13:45:02 -07:00