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
Jason Ekstrand
2dc0f7fe5b
vk/device: Actually destroy batch buffers
2015-05-28 13:08:21 -07:00
Jason Ekstrand
8cf932fd25
vk/query: Don't emit a CS stall by itself
...
Both the bspec and the simulator don't like this. I'm not sure if stalling
at the scoreboard is right but it at least shuts up the simulator.
2015-05-28 10:27:53 -07:00
Jason Ekstrand
730ca0efb1
vk/device: Fixups for batch buffer chaining
...
Some how these didn't get merged with the other batch buffer chaining
stuff. Oh well, it's here now.
2015-05-28 10:26:11 -07:00
Jason Ekstrand
de221a672d
meta: Add a default ds_state and use it when no ds state is set
2015-05-28 10:06:45 -07:00
Jason Ekstrand
6eefeb1f84
vk/meta: Share the dummy RS and CB state between clear and blit
2015-05-28 10:00:38 -07:00
Kristian Høgsberg Kristensen
5a317ef4cb
vk: Initialize dynamic state binding points to NULL
...
We rely on these being initialized to NULL so meta can reliably detect
whether or not they've been set. ds_state is also allowed to not be
present so we need a well-defined value for that.
2015-05-27 22:13:48 -07:00
Chad Versace
1435bf4bc4
.gitignore: Ignore spirv2nir binary
2015-05-27 17:01:09 -07:00
Chad Versace
f559fe9134
.gitignore: Scope Vulkan's generated source files
...
Don't ignore any file named entrypoints.{c,h}. Ignore it only if it's in
src/vulkan.
2015-05-27 16:59:53 -07:00
Chad Versace
ca385dcf2a
vk: gitignore generated source files
2015-05-27 16:57:31 -07:00
Chad Versace
466f61e9f6
vk/glsl_scraper: Replace adhoc arg parsing with argparse
2015-05-27 16:56:02 -07:00
Chad Versace
fab9011c44
vk/image: Assert that VkImageTiling is valid
2015-05-27 16:21:04 -07:00
Chad Versace
c0739043b3
vk/image: Remove trailing whitespace
2015-05-27 16:15:47 -07:00
Chad Versace
4514e63893
vk/glsl: Reject invalid options
...
The script incorrectly interpreted --blah as the input filename.
2015-05-27 16:14:26 -07:00
Chad Versace
fd8b5e0df2
vk/glsl_scraper: Indent large text blocks
...
Indent them to the same level as if the text was code.
No changes in entrypoints.{c,h} after a clean build.
2015-05-27 16:09:31 -07:00
Chad Versace
df4b02f4ed
vk/glsl_scraper: Fix code style for imports
...
Python style is one module imported per line, and imports are at the top
of the file.
2015-05-27 16:04:12 -07:00
Jason Ekstrand
b23885857f
vk/meta: Actually create the CB state for blits
2015-05-27 12:06:30 -07:00
Jason Ekstrand
da8f148203
vk: Rework anv_batch and use chaining batch buffers
...
This mega-commit primarily does two things. First, is to turn anv_batch
into a better abstraction of a batch. Instead of actually having a BO, it
now has a few pointers to some piece of memory that are used to add data to
the "batch". If it gets to the end, there is a function pointer that it
can call to attempt to grow the batch.
The second change is to start using chained batch buffers. When the end of
the current batch BO is reached, it automatically creates a new one and
ineserts an MI_BATCH_BUFFER_START command to chain to it. In this way, our
batch buffers are effectively infinite in length.
2015-05-27 11:48:28 -07:00
Jason Ekstrand
59def43fc8
Fixup for growable reloc lists
2015-05-27 11:48:28 -07:00
Jason Ekstrand
1c63575de8
vk/cmd_buffer: Allocate the surface_bo from device->batch_bo_pool
2015-05-27 11:48:28 -07:00
Jason Ekstrand
403266be05
vk/device: Make reloc lists growable
2015-05-27 11:48:28 -07:00
Jason Ekstrand
5ef81f0a05
vk/device: Use a bo pool for batch buffers
2015-05-27 11:48:28 -07:00
Jason Ekstrand
6f3e3c715a
vk/allocator: Add a BO pool
2015-05-27 11:48:28 -07:00
Jason Ekstrand
59328bac10
vk/allocator: Add a free list that acts on pointers instead of offsets
2015-05-27 11:48:28 -07:00
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
2514ac5547
vk/test: Create and use color/blend dynamic and pipeline state
2015-05-26 17:12:37 -07:00
Kristian Høgsberg
1cd8437b9d
vk/meta: Allocate and set color/blend state
...
For color blend, we have to set our own state to avoid inheriting bogus
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
5e637c5d5a
vk/pack: Generate length macros for structs
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
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