Commit Graph

73289 Commits

Author SHA1 Message Date
Jason Ekstrand 1bee19e023 vk: Add the WSI header files 2015-09-08 10:33:46 -07:00
Jason Ekstrand 2f3de6260d Merge branch 'nir-spirv' into vulkan 2015-09-05 14:12:59 -07:00
Jason Ekstrand 4d73ca3c58 nir/spirv.h: Remove some cruft missed while merging
There were merge conflicts in spirv.h that got missed because they were in
a comment and so it still compiled.  This gets rid of them and we should be
on-par with upstream spirv->nir.
2015-09-05 14:11:40 -07:00
Jason Ekstrand 612b13aeae nir/spirv: Add support for most of the rest of texturing
Assuming this all works, about the only thing left should be some
corner-cases for tg4
2015-09-05 14:10:05 -07:00
Jason Ekstrand fe786ff67d Merge branch 'nir-spirv' into vulkan 2015-09-05 13:17:53 -07:00
Jason Ekstrand 35fcd37fcf nir/spirv: Handle decorations after assigning variable locations 2015-09-05 13:17:21 -07:00
Jason Ekstrand 87d02f515b Merge branch 'nir-spirv' into vulkan 2015-09-05 09:48:33 -07:00
Jason Ekstrand 9be43ef99c nir/spirv: Handle the MatrixStride member decoration 2015-09-05 09:47:45 -07:00
Jason Ekstrand 01924a03d4 vk: Actually link in wayland libraries
Turns out this was why I had accidentally broken the universe.  Oops...
2015-09-04 20:02:38 -07:00
Jason Ekstrand 2c4ae00db6 vk: Conditionally compile Wayland support
Pulling in libwayland causes undefined symbols in applications that are
linked against vulkan alone.  Ideally, we would like to dlopen a platform
support library or something like that.  For now, this works and should get
crucible running again.
2015-09-04 19:18:52 -07:00
Jason Ekstrand b3c037f329 vk: Fix size return value handling in a couple plces 2015-09-04 19:05:51 -07:00
Jason Ekstrand 9a95d08ed6 Merge branch 'nir-spirv' into vulkan 2015-09-04 18:54:15 -07:00
Jason Ekstrand 6d5dafd779 nir/spirv/glsl450: Use the correct write mask 2015-09-04 18:50:14 -07:00
Jason Ekstrand 7174d155e9 nir: Add a lower_fdiv option and use it in i965 2015-09-04 18:50:14 -07:00
Jason Ekstrand f32d16a9f0 nir/spirv: Use the actual GLSL 450 extension header from Khronos 2015-09-04 18:50:14 -07:00
Jason Ekstrand 9e2c13350e nir/spirv: Add support for SpvDecorationColMajor 2015-09-04 18:50:14 -07:00
Jason Ekstrand f3bdb93a8e nir/types: Allow single-column matrices
This can sometimes be a convenient way to build vectors.
2015-09-04 18:50:14 -07:00
Jason Ekstrand 48e87c0163 vk/wsi: Add Wayland WSI support 2015-09-04 17:55:42 -07:00
Jason Ekstrand 348cb29a20 vk/wsi: Move to a clallback system for the entire WSI implementation
We do this for two reasons: First, because it allows us to simplify WSI and
compiling in/out support for a particular platform is as simple as calling
or not calling the platform-specific init function.  Second, the
implementation gives us a place for a given chunk of the WSI to stash
stuff in the instance.
2015-09-04 17:55:42 -07:00
Jason Ekstrand 06d8fd5881 vk/instance: Expose anv_instance_alloc/free 2015-09-04 17:55:42 -07:00
Jason Ekstrand c0b97577e8 vk/WSI: Use a callback mechanism instead of explicit switching 2015-09-04 17:55:42 -07:00
Jason Ekstrand ca3cfbf6f1 vk: Add an initial implementation of the actual Khronos WSI extension
Unfortunately, this is a very large commit and removes the old LunarG WSI
extension.  This is because there are a couple of entrypoints that have the
same name between the two extensions so implementing them both is
impractiacl.

Support is still incomplete, but this is enough to get vkcube up and going
again.
2015-09-04 17:55:42 -07:00
Jason Ekstrand 3d9fbb6575 vk: Add initial support for VK_WSI_swapchain 2015-09-04 17:55:42 -07:00
Jason Ekstrand beb466ff5b vk: Move anv_x11.c to anv_wsi_x11.c 2015-09-04 17:55:42 -07:00
Jason Ekstrand 9a7600c9b5 vk/device: Use an array for device extensions 2015-09-04 17:55:42 -07:00
Kristian Høgsberg Kristensen 8af3624651 vk: Further reduce diff to master
Now that we don't compile GLSL, we can roll back a few more hacks and
unexport some things from the backend compiler.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-09-04 16:17:01 -07:00
Kristian Høgsberg Kristensen 7c1d20dc48 vk: Drop GLSL code from anv_compiler.cpp
Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-09-03 14:02:11 -07:00
Kristian Høgsberg Kristensen 316c8ac53b vk: Assert that the SPIR-V module has the magic number
Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-09-03 12:27:28 -07:00
Kristian Høgsberg Kristensen 6e35a1f166 vk: Remove various hacks/scaffolding code
Since we switched away from calling brwCreateContext() there's a bit of
hacky support we can now delete.  This reduces our diff to upstream master.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-09-03 12:17:13 -07:00
Kristian Høgsberg Kristensen 1d787781ff vk: Fall back to previous gens in entry point resolver
We used to always just do a one-level fallback from genX_* to anv_*
entry points. That worked for gen7 and gen8 where all entry points were
either different or could be made anv_* entry points (eg
anv_CreateDynamicViewportState). We're about to add gen9 and now need to
be able to fall back to gen8 entry points for most things.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-09-03 11:53:09 -07:00
Kristian Høgsberg Kristensen c4dbff58d8 vk: Drop redundant gen7_CreateGraphicsPipelines
This is handled by anv_CreateGraphicsPipelines().

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-09-03 11:53:09 -07:00
Kristian Høgsberg Kristensen b5e90f3f48 vk: Use vk* entrypoints in meta, not driver_layer pointers
We'll change the dispatch mechanism again in a later commit. Stop using
the driver_layer function pointers and just use the public entry points.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-09-03 11:53:09 -07:00
Kristian Høgsberg Kristensen 82396a5514 vk: Drop check for I915_PARAM_HAS_EXEC_CONSTANTS
We don't use this kernel feature.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-09-03 11:53:08 -07:00
Kristian Høgsberg Kristensen c4b30e7885 vk: Add new vk_errorf that takes a format string
This allows us to annotate error cases in debug builds.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-09-03 11:53:08 -07:00
Kristian Høgsberg Kristensen 2e346c882d vk: Make vk_error a little more helpful
Print out file and line number and translate the error code to the
symbolic name.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-09-03 11:53:08 -07:00
Chad Versace 0cb26523d3 vk/image: Add PRM reference for QPitch equation
Suggested-by: Nanley Chery <nanley.g.chery@intel.com>
2015-09-03 11:04:38 -07:00
Chad Versace 28503191f1 vk/meta: Partially fix vkCmdCopyBufferToImage for S8_UINT
Create R8_UINT VkAttachmentView and VkImageView for the stencil data.

This fixes a crash, but the pixels in the destination image are still
incorrect. They are not properly tiled.

Fixes crashes in Crucible tests func.miptree.s8-uint.aspect-stencil.* as
of crucible-7471449. Test results improve 'lost' -> 'fail'.
2015-09-02 11:08:36 -07:00
Jason Ekstrand be0a4da6a5 vk/meta: Use SPIR-V for shaders
We are also now using glslc for compiling the Vulkan driver like we do in
curcible.
2015-09-01 15:16:06 -07:00
Jason Ekstrand 362ab2d788 vk/compiler: Handle interpolation qualifiers for SPIR-V shaders 2015-09-01 15:15:04 -07:00
Jason Ekstrand 126ade0023 vk/extensions: count needs to be <= number of extensions 2015-09-01 12:28:50 -07:00
Jason Ekstrand 0c2d476935 vk/compiler: Properly reference/delete programs when using SPIR-V 2015-09-01 12:28:50 -07:00
Jason Ekstrand 16ebe883a4 vk/meta: Add a helper for making an image from a buffer 2015-08-31 21:54:38 -07:00
Jason Ekstrand 86c3476668 nir/spirv: Use VERTEX_ID_ZERO_BASE for VertexId
In Vulkan, VertexId and InstanceId will be zero-based and new intrinsics,
VertexIndex and InstanceIndex, will be added for non-zer-based.  See also,
Khronos bug #14255
2015-08-31 17:16:49 -07:00
Jason Ekstrand 6350c97412 Merge remote-tracking branch 'fdo-personal/nir-spirv' into vulkan
From now on, the majority of SPIR-V improvements should happen on the spirv
branch which will also be public.  It will be frequently merged into the
vulkan driver.
2015-08-31 17:14:47 -07:00
Jason Ekstrand 22fdb2f855 nir/spirv: Update to the latest revision 2015-08-31 17:05:23 -07:00
Jason Ekstrand ce70cae756 nir/builder: Use nir_after_instr to advance the cursor
This *should* ensure that the cursor gets properly advanced in all cases.
We had a problem before where, if the cursor was created using
nir_after_cf_node on a non-block cf_node, that would call nir_before_block
on the block following the cf node.  Instructions would then get inserted
in backwards order at the top of the block which is not at all what you
would expect from nir_after_cf_node.  By just resetting to after_instr, we
avoid all these problems.
2015-08-31 17:05:23 -07:00
Jason Ekstrand 24b0c53231 nir/intrinsics: Move to a two-dimensional binding model for UBO's 2015-08-31 17:05:23 -07:00
Jason Ekstrand f4608bc530 nir/nir_variable: Add a descriptor set field
We need this for SPIR-V
2015-08-31 17:05:23 -07:00
Jason Ekstrand 85cf2385c5 mesa: Move gl_vert_attrib from mtypes.h to shader_enums.h
It is a shader enum after all...
2015-08-31 17:05:23 -07:00
Jason Ekstrand de4f379a70 nir/cursor: Add a helper for getting the current block 2015-08-31 17:05:23 -07:00