Kristian Høgsberg
0dbed616af
vk: Add support for texture component swizzle
...
This also drops the share create_surface_state helper and moves filling
out SURFACE_STATE directly into anv_image_view_init() and
anv_color_attachment_view_init().
2015-05-26 11:27:29 -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
7c0d0021eb
vk/test: Add new depth-stencil test
...
Not yet a depth stencil test, but will become one.
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
Kristian Høgsberg
c03314bdd3
vk: Update to header files with nested struct support
...
This will let us do MOCS settings right.
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
1b211feb6c
vk/compiler: Zero out the vs_prog_data struct when VS is disabled
...
Prevents uninitialized value errors
2015-05-25 17:14:49 -07:00
Jason Ekstrand
903bd4b056
vk/compiler: Fix up the binding hack and make it work in NIR
2015-05-25 12:57:32 -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
Jason Ekstrand
ccf2bf9b99
vk/test: Use the glsl_scraper for building shaders
2015-05-21 12:24:02 -07:00
Jason Ekstrand
f3d70e4165
vk/glsl_scraper: Use the LunarG back-door for GLSL source
2015-05-21 12:22:44 -07:00
Jason Ekstrand
cb56372eeb
vk/glsl_scraper: Use a fake GLSL version that glslang will accept
2015-05-21 12:21:02 -07:00
Jason Ekstrand
0e441cde71
vk: Bake the GLSL_VK_SHADER macro into the scraper output file
2015-05-21 12:21:00 -07:00
Jason Ekstrand
f17e835c26
vk/meta: Use glsl_scraper for our GLSL source
...
We are not yet using SPIR-V for meta but this is a first step.
2015-05-21 11:39:54 -07:00
Jason Ekstrand
b13c0f469b
vk: More out-of-tree build fixes
2015-05-21 11:32:59 -07:00
Jason Ekstrand
f294154e42
vk: Fix for out-of-tree builds
2015-05-21 10:23:18 -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
63da974529
vk: Mark remaining unsupported formats as such
2015-05-20 20:34:52 -07:00
Kristian Høgsberg
387a1bb58f
vk: Mark VK_FORMAT_UNDEFINED as 1 cpp, 1 channel
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
Kristian Høgsberg
01504057f5
vk: Use surface_format_info from dri driver for vkGetFormatInfo
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
Jason Ekstrand
14929046ba
vk/compiler: Add shader language detection
...
This commit adds support for the LunarG GLSL back-door as well as detecting
regular GLSL and SPIR-V. The SPIR-V path doesn't exist yet, so that will
cause an assert-fail.
2015-05-20 17:05:41 -07:00
Jason Ekstrand
47c1cf5ce6
vk/test: Add a test for testing buffer copies
2015-05-20 16:20:04 -07:00
Jason Ekstrand
bea66ac5ad
vk/meta: Add support for copying arbitrary size buffers
2015-05-20 16:20:04 -07:00
Jason Ekstrand
9557b85e3d
vk/meta: Use the biggest format possible for buffer copies
...
This should substantially improve throughput of buffer copies.
2015-05-20 16:20:04 -07:00
Jason Ekstrand
13719e9225
vk/meta: Fix buffer copy extents
2015-05-20 16:20:04 -07:00
Jason Ekstrand
d7044a19b1
vk/meta: Use texture() instead of texture2D()
2015-05-19 12:44:35 -07:00
Jason Ekstrand
edff076188
vk: Use binding instead of index in uniform layout qualifiers
...
This more closely matches what the Vulkan docs say to do.
2015-05-19 12:44:22 -07:00
Jason Ekstrand
e37a89136f
vk/glsl_scraper: Add a --glsl-only option
2015-05-19 11:29:07 -07:00
Jason Ekstrand
4bcf58a192
vk/glsl_scraper: Use the line number from the end of the macro
...
We used to use the line number from the start of the macro but this doesn't
seem to match the c preprocessor
2015-05-19 11:29:07 -07:00
Jason Ekstrand
1573913194
vk/glsl_scraper: Don't open files until needed
...
This prevents us from writing an empty file when the compile failed.
2015-05-19 11:29:07 -07:00
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