Jason Ekstrand [Tue, 7 Jul 2015 00:37:11 +0000 (17:37 -0700)]
vk/vulkan.h: Remove the Vk(Memory|Semaphor|Image)OpenInfo structs
We already deleted the functions that need them. The structs are just
dangling uselessly.
Jason Ekstrand [Tue, 7 Jul 2015 00:33:43 +0000 (17:33 -0700)]
vk/vulkan.h: Remove VK_MEMORY_PROPERTY_PREFER_HOST_LOCAL_BIT
We weren't doing anything with it, so this is a no-op
Jason Ekstrand [Tue, 7 Jul 2015 00:32:28 +0000 (17:32 -0700)]
vk/vulkan.h: Replace DEVICE_COHERENT_BIT with DEVICE_NON_COHERENT_BIT
Jason Ekstrand [Tue, 7 Jul 2015 00:27:11 +0000 (17:27 -0700)]
vk/vulkan.h: Use the query result bits from revision 130
None of the important bits or names actually changed. It just
added/removed some no-op names.
No functional change.
Jason Ekstrand [Tue, 7 Jul 2015 00:26:29 +0000 (17:26 -0700)]
vk/vulkan.h: One more quick enum refactor clean-up
Jason Ekstrand [Tue, 7 Jul 2015 00:23:46 +0000 (17:23 -0700)]
vk/vulkan.h: Get rid of VERTEX_INPUT_STEP_RATE_DRAW
We never supported it, so no functional change.
Jason Ekstrand [Tue, 7 Jul 2015 00:21:19 +0000 (17:21 -0700)]
vk/vulkan.h: Remove the CLEAR_OPTIMAL image layout
Jason Ekstrand [Tue, 7 Jul 2015 00:18:25 +0000 (17:18 -0700)]
vk: Rename CPU_READ/WRITE_BIT to HOST_READ/WRITE_BIT
Jason Ekstrand [Tue, 7 Jul 2015 00:14:30 +0000 (17:14 -0700)]
vk/vulkan.h: Remove VK_IMAGE_CREATE_CLONEABLE_BIT
Jason Ekstrand [Tue, 7 Jul 2015 00:12:47 +0000 (17:12 -0700)]
vk: Remove SHAREABLE bits
They were removed from the Vulkan API and we don't really use them because
there are no multi-GPU i965 systems.
Jason Ekstrand [Tue, 7 Jul 2015 00:08:11 +0000 (17:08 -0700)]
vk/vulkan.h: Re-order the logic op enums
Jason Ekstrand [Tue, 7 Jul 2015 00:06:02 +0000 (17:06 -0700)]
vk/vulkan.h: Reformat a bunch of enums to match revision 130
In theory, no functional change.
Jason Ekstrand [Mon, 6 Jul 2015 23:43:28 +0000 (16:43 -0700)]
vk: Rename NUM_SHADER_STAGE to SHADER_STAGE_NUM
This is a refactor of more than just the header but it lets us finish
reformating the shader stage enum.
Jason Ekstrand [Mon, 6 Jul 2015 23:41:31 +0000 (16:41 -0700)]
vk: Reformat a bunch of enums
This accounts for a number differences between the generated headers and
the hand-written header. Not all reformatting is done in this commit but
it does make the headers much more diffable.
In theory, no functional change.
Jason Ekstrand [Mon, 6 Jul 2015 23:15:12 +0000 (16:15 -0700)]
vk: Pull the VkResult enum from revision 130
Jason Ekstrand [Mon, 6 Jul 2015 23:11:05 +0000 (16:11 -0700)]
vk: re-arrange enums to match the order in revision 130
Jason Ekstrand [Mon, 6 Jul 2015 22:37:17 +0000 (15:37 -0700)]
vk: Rename a parameter in CmdBindDynamicStateObject
Jason Ekstrand [Mon, 6 Jul 2015 22:34:55 +0000 (15:34 -0700)]
vk: Remove multi-device stuff
Jason Ekstrand [Mon, 6 Jul 2015 22:32:40 +0000 (15:32 -0700)]
vk: Remove ClearDescriptorSets
Jason Ekstrand [Mon, 6 Jul 2015 22:32:27 +0000 (15:32 -0700)]
vk: Remove begin/end descriptor pool update
Jason Ekstrand [Mon, 6 Jul 2015 22:30:05 +0000 (15:30 -0700)]
vk: Remove stub for CloneImageData
Jason Ekstrand [Mon, 6 Jul 2015 22:28:10 +0000 (15:28 -0700)]
vk: Remove the stub support for memory priorities
Jason Ekstrand [Mon, 6 Jul 2015 22:27:58 +0000 (15:27 -0700)]
vk: Remove the stub support for explicit memory references
Jason Ekstrand [Mon, 6 Jul 2015 22:19:04 +0000 (15:19 -0700)]
vk/vulkan.h: Reformat structs to match revision 130
Structs in the old version were specified as
typedef struct VkSomeThing_
{
type field; // comment
} VkSomeThing;
However, in the generated headers, you have
typedef struct {
type field;
} VkSomeThing;
This commit also removes some unneeded whitespaces.
Jason Ekstrand [Mon, 6 Jul 2015 22:09:21 +0000 (15:09 -0700)]
vk/vulkah.h: Re-arrange structures to match the order in 130
Connor Abbott [Mon, 6 Jul 2015 21:58:55 +0000 (14:58 -0700)]
nir/spirv: fix some bugs
Connor Abbott [Sat, 4 Jul 2015 22:53:47 +0000 (15:53 -0700)]
nir/spirv: add support for builtins inside structures
We may be able to revert this depending on the outcome of bug 14190, but
for now it gets vertex shaders working with SPIR-V.
Connor Abbott [Sat, 4 Jul 2015 22:51:24 +0000 (15:51 -0700)]
nir/spirv: fix a bug with structure creation
We were creating 2 extra bogus fields.
Connor Abbott [Sat, 4 Jul 2015 22:46:58 +0000 (15:46 -0700)]
nir/spirv: fix a bad assertion in the decoration handling
We should be asserting that the parent decoration didn't hand us
a member if the child decoration did, but different child decorations
may obviously have different members.
Connor Abbott [Sat, 4 Jul 2015 17:49:12 +0000 (10:49 -0700)]
nir/spirv: pull out logic for getting builtin locations
Also add support for more builtins.
Connor Abbott [Thu, 2 Jul 2015 22:49:08 +0000 (15:49 -0700)]
nir/spirv: plumb through the type of dereferences
We need this to know if a deref is of a builtin.
Connor Abbott [Thu, 2 Jul 2015 22:22:27 +0000 (15:22 -0700)]
nir/spirv: handle structure member builtin decorations
Connor Abbott [Thu, 2 Jul 2015 21:24:12 +0000 (14:24 -0700)]
nir/spirv: add a vtn_type struct
This will handle decorations that aren't in the glsl_type.
Connor Abbott [Thu, 2 Jul 2015 19:55:25 +0000 (12:55 -0700)]
nir/spirv: move 'type' into the union
Since SSA values now have their own types, it's more convenient to make
'type' only used when we want to look up an actual SPIR-V type, since
we're going to change its type soon to support various decorations that
are handled at the SPIR-V -> NIR level.
Jason Ekstrand [Mon, 6 Jul 2015 21:41:41 +0000 (14:41 -0700)]
vk: Move CreateFramebuffer and CreateRenderPass higher in the header
This matches where they are in the 130 header.
Jason Ekstrand [Mon, 6 Jul 2015 21:38:45 +0000 (14:38 -0700)]
vk: Remove atomic counters stubs
Jason Ekstrand [Mon, 6 Jul 2015 21:30:31 +0000 (14:30 -0700)]
vk: Make vulkan.h look more like vulkan-130.h
Most of these changes are insubstantial. The only potentially substantial
cyhange is that we added a few new #defines for API maximums.
Jason Ekstrand [Mon, 6 Jul 2015 21:16:51 +0000 (14:16 -0700)]
vk: Add a revision 130 header along-side the current header
Jason Ekstrand [Fri, 3 Jul 2015 01:15:06 +0000 (18:15 -0700)]
vk/meta: Add an initial implementation of ClearColorImage
Jason Ekstrand [Fri, 3 Jul 2015 00:10:37 +0000 (17:10 -0700)]
vk/meta: Factor the guts out of cmd_buffer_clear
Jason Ekstrand [Wed, 1 Jul 2015 23:44:10 +0000 (16:44 -0700)]
vk: Roll back to API v90
This is what version 0.1 of the Vulkan SDK is built against.
Jason Ekstrand [Wed, 1 Jul 2015 22:38:26 +0000 (15:38 -0700)]
nir/spirv: Add initial structure member decoration support
Jason Ekstrand [Wed, 1 Jul 2015 22:34:08 +0000 (15:34 -0700)]
nir/spirv: Make vtn_handle_type match the other handler functions
Previously, the caller of vtn_handle_type had to handle actually inserting
the type. However, this didn't really work if the type was decorated in
any way.
Jason Ekstrand [Wed, 1 Jul 2015 21:17:24 +0000 (14:17 -0700)]
nir/spirv: Add basic support for Op[Group]MemberDecorate
Jason Ekstrand [Wed, 1 Jul 2015 21:17:52 +0000 (14:17 -0700)]
vk/x11: Allow for the client querying the size of the format properties
Chad Versace [Tue, 30 Jun 2015 16:41:06 +0000 (09:41 -0700)]
vk/formats: Fix entry for S8_UINT
I forgot to update this when fixing the depth formats.
Chad Versace [Tue, 30 Jun 2015 16:20:07 +0000 (09:20 -0700)]
vk/formats: Document new meaning of anv_format::cpp
The way the code currently works is that anv_format::cpp is the cpp of
anv_format::surface_format.
Me and Kristian disagree about how the code *should* work. Despite that,
I think it's in our discussion's best interest to document how the code
*currently* works. That should eliminate confusion.
If and when the code begins to work differently, then we'll update the
anv_format comments.
Chad Versace [Sat, 27 Jun 2015 05:15:03 +0000 (22:15 -0700)]
vk/depth: Add a FIXME
3DSTATE_DEPTH_BUFFER.Width,Height are wrong.
Chad Versace [Sat, 27 Jun 2015 04:27:54 +0000 (21:27 -0700)]
vk/image: Enable 2d single-sample color miptrees
What's been tested, for both image views and color attachment views:
- VK_FORMAT_R8G8B8A8_UNORM
- VK_IMAGE_VIEW_TYPE_2D
- mipLevels: 1, 2
- baseMipLevel: 0, 1
- arraySize: 1, 2
- baseArraySlice: 0, 1
What's known to be broken:
- Depth and stencil miptrees. To fix this, anv_depth_stencil_view
needs major rework.
- VkImageViewType != 2D
- MSAA
Fixes Crucible tests:
func.miptree.view-2d.levels02.array01.*
func.miptree.view-2d.levels01.array02.*
func.miptree.view-2d.levels02.array02.*
Chad Versace [Sat, 27 Jun 2015 01:48:34 +0000 (18:48 -0700)]
vk/image: Define anv_surface, refactor anv_image
This prepares for upcoming miptree support.
anv_surface is a proxy for color surfaces, depth surfaces, and stencil
surfaces. Embed two instances of anv_surface into anv_image: the
primary surface (color or depth), and an optional stencil surface.
Chad Versace [Sat, 27 Jun 2015 03:12:42 +0000 (20:12 -0700)]
vk/image: Reformat function signatures
Reformat them to match Mesa code-style.
Chad Versace [Sat, 27 Jun 2015 03:06:08 +0000 (20:06 -0700)]
vk/image: Embed VkImageCreateInfo* into anv_image_create_info
All function signatures that matched this pattern,
old: f(const VkImageCreateInfo *, const struct anv_image_create_info *)
were rewritten as
new: f(const struct anv_image_create_info *)
Chad Versace [Sat, 27 Jun 2015 02:50:04 +0000 (19:50 -0700)]
vk/image: Drop some tmp vars in anv_image_view_init()
Variables 'tile_mode' and 'format' are unneeded.
Chad Versace [Sat, 27 Jun 2015 02:23:21 +0000 (19:23 -0700)]
vk/image: Abort on stencil image views
The code doesn't work. Not even close.
Replace the broken code with a FINISHME and abort.
Chad Versace [Fri, 26 Jun 2015 22:27:20 +0000 (15:27 -0700)]
vk: Reindent struct anv_image
Chad Versace [Fri, 26 Jun 2015 22:06:09 +0000 (15:06 -0700)]
vk: Define MIN(a, b) macro
Chad Versace [Fri, 26 Jun 2015 22:07:59 +0000 (15:07 -0700)]
vk: Rename functions ALIGN_*32 -> align_*32
ALIGN_U32 and ALIGN_I32 are functions, not macros. So stop using
allcaps.
Connor Abbott [Fri, 26 Jun 2015 19:14:05 +0000 (12:14 -0700)]
Merge branch 'wip/nir-vtn' into vulkan
Adds composites and matrix multiplication, plus some control flow fixes.
Chad Versace [Fri, 26 Jun 2015 16:47:17 +0000 (09:47 -0700)]
vk/formats: Remove the cpp=0 stencil hack
The format table defined cpp = 0 for stencil-only formats. The real cpp
is 1.
When code begins to lie, especially about stencil buffers, code becomes
increasingly fragile as time progresses, and the damage becomes
increasingly hard to undo. (For precedent, see the painful history of
stencil buffer cpp in the git log for gen6 and gen7 in the i965 driver).
Let's undo the stencil buffer cpp lie now to avoid future pain.
In the format table, set cpp = 1 for VK_FORMAT_S8; replace checks for
cpp == 0; and delete all comments about the hack.
Chad Versace [Fri, 26 Jun 2015 16:17:52 +0000 (09:17 -0700)]
vk/image: Refactor anv_image_create()
From my experience with intel_mipmap_tree.c, I learned that for struct's
like anv_image and intel_mipmap_tree, which have sprawling
multi-function construction codepaths, it's easy to mistakenly use
unitialized struct members during construction.
Let's eliminate the risk of using unitialized anv_image members during
construction. Fill the struct at the function bottom instead of
piecemeal throughout the constructor.
Chad Versace [Fri, 26 Jun 2015 16:05:46 +0000 (09:05 -0700)]
vk/image: Group some assertions closer together
In anv_image_create(), group together the assertions on
VkImageCreateInfo.
Chad Versace [Fri, 26 Jun 2015 14:38:02 +0000 (07:38 -0700)]
vk/formats: #undef fmt at end of format table
Chad Versace [Fri, 26 Jun 2015 14:31:57 +0000 (07:31 -0700)]
vk: Fix comment for anv_depth_stencil_view::stencil_qpitch
s/DEPTH/STENCIL/
Chad Versace [Fri, 26 Jun 2015 02:46:42 +0000 (19:46 -0700)]
vk/image: Add qpitch fields to anv_depth_stencil_view
For now, hard-code them to 0.
Chad Versace [Fri, 26 Jun 2015 02:42:09 +0000 (19:42 -0700)]
vk: Reindent and document struct anv_depth_stencil_view
Chad Versace [Fri, 26 Jun 2015 02:29:59 +0000 (19:29 -0700)]
vk/formats: Fix incorrect depth formats
anv_format::surface_format was incorrect for Vulkan depth formats.
For example, the format table mapped
VK_FORMAT_D24_UNORM -> .surface_format = D24_UNORM_X8_UINT
VK_FORMAT_D32_FLOAT -> .surface_format = D32_FLOAT
but should have mapped
VK_FORMAT_D24_UNORM -> .surface_format = R24_UNORM_X8_TYPELESS
VK_FORMAT_D32_FLOAT -> .surface_format = R32_FLOAT
The Crucible test func.depthstencil.basic passed despite the bug, but
only because it did not attempt to texture from the depth surface.
The core problem is that RENDER_SURFACE_STATE.SurfaceFormat and
3DSTATE_DEPTH_BUFFER.SurfaceFormat are distinct types. Considering them
as enum spaces, the two enum spaces have incompatible collisions.
Fix this by adding a new field 'depth_format' to struct anv_format.
Refer to brw_surface_formats.c:translate_tex_format() for precedent.
Chad Versace [Fri, 26 Jun 2015 02:03:43 +0000 (19:03 -0700)]
vk/image: Rename local variable in anv_image_create()
This function has many local variables for info structs. Having one
named simply 'info' is confusing. Rename it to 'format_info'.
Chad Versace [Fri, 26 Jun 2015 01:22:59 +0000 (18:22 -0700)]
vk/formats: Fix table entry for R8G8B8_SNORM
Now that anv_formats[] is formatted like a table, buggy entries are
easier to see.
Chad Versace [Fri, 26 Jun 2015 01:18:06 +0000 (18:18 -0700)]
vk/formats: Rename anv_format::format -> surface_format
I misinterpreted anv_format::format as a VkFormat. Instead, it is
a hardware surface format (RENDER_SURFACE_STATE.SurfaceFormat). Rename
the field to 'surface_format' to make it unambiguous.
Chad Versace [Fri, 26 Jun 2015 01:01:08 +0000 (18:01 -0700)]
vk/formats: Rename anv_format::channels -> num_channels
I misinterpreted anv_format::channels as a bitmask of channels.
Renaming it to 'num_channels' makes it unambiguous.
Chad Versace [Fri, 26 Jun 2015 00:58:17 +0000 (17:58 -0700)]
vk: Reindent struct anv_format
Chad Versace [Fri, 26 Jun 2015 00:56:20 +0000 (17:56 -0700)]
vk/formats: Don't abbreviate tokens in the format table
Abbreviating the VK_FORMAT_* tokens doesn't help much. To the contrary,
it means grep and ctags can't find them.
Jason Ekstrand [Fri, 26 Jun 2015 00:36:22 +0000 (17:36 -0700)]
vk/compiler: Add the initial hacks to get SPIR-V up and going
Jason Ekstrand [Fri, 26 Jun 2015 00:34:11 +0000 (17:34 -0700)]
HACK: Get rid of sanity_param_count for FS
Jason Ekstrand [Fri, 26 Jun 2015 00:33:18 +0000 (17:33 -0700)]
i965: Don't print the GLSL IR if it doesn't exist
Jason Ekstrand [Fri, 26 Jun 2015 00:32:25 +0000 (17:32 -0700)]
nir/spirv: Set the right location for shader input/outputs
We need to add FRAG_RESULT_DATA0 etc. to the input/output location.
Jason Ekstrand [Fri, 26 Jun 2015 00:32:10 +0000 (17:32 -0700)]
nir/spirv: Set the interface type on uniform blocks
Jason Ekstrand [Fri, 26 Jun 2015 00:31:56 +0000 (17:31 -0700)]
nir/spirv: Set the system value mode on builtins
Jason Ekstrand [Fri, 26 Jun 2015 00:31:07 +0000 (17:31 -0700)]
nir/spirv: Actually put variables on the right linked list
Jason Ekstrand [Thu, 25 Jun 2015 23:37:12 +0000 (16:37 -0700)]
glsl: Move vert_attrib varying_slot and frag_result enums to shader_enums.h
Chad Versace [Thu, 28 May 2015 14:40:22 +0000 (07:40 -0700)]
vk/image: Check extent does not exceed surface type limits
Chad Versace [Thu, 28 May 2015 14:46:31 +0000 (07:46 -0700)]
vk/image: Stop hardcoding SurfaceType of VkImageView
Instead, translate VkImageViewType to a gen SurfaceType.
Chad Versace [Thu, 28 May 2015 14:45:31 +0000 (07:45 -0700)]
vk/image: Add anv_image::surf_type
This the gen SurfaceType, such as SURFTYPE_2D.
Chad Versace [Thu, 28 May 2015 14:37:59 +0000 (07:37 -0700)]
vk/image: Add tables for gen SurfaceType
Tables for mapping VkImageType and VkImageViewType to gen SurfaceType.
Tables are unused.
Chad Versace [Thu, 28 May 2015 15:07:54 +0000 (08:07 -0700)]
vk/util: Add anv_loge() for logging error messages
Chad Versace [Thu, 25 Jun 2015 23:26:07 +0000 (16:26 -0700)]
vk: Add func anv_is_aligned()
Chad Versace [Thu, 28 May 2015 16:50:26 +0000 (09:50 -0700)]
vk: Add anv_minify()
Chad Versace [Thu, 28 May 2015 16:50:18 +0000 (09:50 -0700)]
vk: Define MAX(a, b) macro
Jason Ekstrand [Thu, 25 Jun 2015 04:39:07 +0000 (21:39 -0700)]
nir/spirv: Fix up some dererf ralloc parenting
Jason Ekstrand [Thu, 25 Jun 2015 04:38:49 +0000 (21:38 -0700)]
i965/nir: Handle returns as long as they're at the end of a function
Jason Ekstrand [Thu, 25 Jun 2015 04:22:05 +0000 (21:22 -0700)]
i965/nir: Split NIR shader handling into two functions
The brw_create_nir function takes a GLSL or ARB shader and turns it into a
NIR shader. The guts of the optimization and lowering code is now split
into a new brw_process_shader function.
Jason Ekstrand [Thu, 25 Jun 2015 03:38:52 +0000 (20:38 -0700)]
nir/spirv: Use vtn_ssa_value for texture coordinates
Jason Ekstrand [Thu, 25 Jun 2015 03:32:03 +0000 (20:32 -0700)]
nir/spirv: Add support for the Uniform storage class
This is kida sketchy. I'm not really sure this is the way it's supposed to
be used.
Jason Ekstrand [Thu, 25 Jun 2015 03:29:33 +0000 (20:29 -0700)]
nir/spirv: Add support for some more decorations including built-in
Jason Ekstrand [Thu, 25 Jun 2015 02:01:10 +0000 (19:01 -0700)]
nir/spirv: Make the header file C++ safe
Jason Ekstrand [Wed, 24 Jun 2015 22:58:45 +0000 (15:58 -0700)]
vk: Build xmlconfig stuff into libi965_compiler
Kristian Høgsberg Kristensen [Mon, 22 Jun 2015 06:47:10 +0000 (23:47 -0700)]
vk/headers: Handle MBO fields
These must be set to one.
Jason Ekstrand [Wed, 24 Jun 2015 01:05:25 +0000 (18:05 -0700)]
Merge remote-tracking branch 'mesa-public/master' into vulkan
Jason Ekstrand [Tue, 23 Jun 2015 22:39:42 +0000 (15:39 -0700)]
i965/fs: Get rid of an unused variable in emit_barrier()
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Jason Ekstrand [Tue, 23 Jun 2015 00:17:56 +0000 (17:17 -0700)]
i965: Remove the brw_context from the visitors
As of this commit, nothing actually needs the brw_context.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>