mesa.git
8 years agoisl: Add initial support for storage images
Jason Ekstrand [Tue, 8 Dec 2015 05:00:19 +0000 (21:00 -0800)]
isl: Add initial support for storage images

8 years agoHACK/i965: Disable assign_var_locations on uniforms
Jason Ekstrand [Tue, 17 Nov 2015 06:26:42 +0000 (22:26 -0800)]
HACK/i965: Disable assign_var_locations on uniforms

This conflicts with the way we're doing uniforms in Vulkan.

8 years agoanv/pipeline: Only apply a pipeline layout if we have one
Jason Ekstrand [Tue, 17 Nov 2015 06:28:52 +0000 (22:28 -0800)]
anv/pipeline: Only apply a pipeline layout if we have one

8 years agoanv/image: Refactor anv_image_make_surface()
Chad Versace [Mon, 7 Dec 2015 17:22:49 +0000 (09:22 -0800)]
anv/image: Refactor anv_image_make_surface()

Reduce the number of function parameters. Deduce the
anv_image::*_surface from the parameters instead of requiring the caller
to do that.

8 years agoanv: Assert the succes of isl_surf_init()
Chad Versace [Mon, 7 Dec 2015 16:53:43 +0000 (08:53 -0800)]
anv: Assert the succes of isl_surf_init()

8 years agoanv: Use isl_tiling_flags in anv_image_create_info
Chad Versace [Mon, 7 Dec 2015 16:50:28 +0000 (08:50 -0800)]
anv: Use isl_tiling_flags in anv_image_create_info

Replace
    anv_image_create_info::force_tiling
    anv_image_create_info::tiling
with the bitmask
    anv_image_create_info::isl_tiling_flags

This allows us to drop the function
anv_image.c:choose_isl_tiling_flags().

8 years agoanv: Fix anv_gem_set_tiling to respect tiling param
Chad Versace [Mon, 7 Dec 2015 16:42:11 +0000 (08:42 -0800)]
anv: Fix anv_gem_set_tiling to respect tiling param

Function anv_gem_set_tiling() ignored its 'tiling' parameter. It
unconditionally set the bo's tiling to I915_TILING_X.

8 years agoanv: Remove unused anv_format_s8_uint
Chad Versace [Mon, 7 Dec 2015 16:40:14 +0000 (08:40 -0800)]
anv: Remove unused anv_format_s8_uint

This is no longer needed after migrating to isl.

8 years agovk: Don't override and hardcode autoconf CFLAGS
Kristian Høgsberg Kristensen [Sat, 5 Dec 2015 01:18:16 +0000 (17:18 -0800)]
vk: Don't override and hardcode autoconf CFLAGS

To disable optimizations pass CFLAGS="-O0 -g" on the configure command
line.

8 years agovk: Move isl files to libisl.la helper library
Kristian Høgsberg Kristensen [Sat, 5 Dec 2015 01:13:26 +0000 (17:13 -0800)]
vk: Move isl files to libisl.la helper library

These will be in their own library eventually - let's just do that now.

8 years agoanv/image: Fix choice of isl_surf_usage for depthstencil images
Chad Versace [Sat, 5 Dec 2015 00:29:25 +0000 (16:29 -0800)]
anv/image: Fix choice of isl_surf_usage for depthstencil images

Fixes assertion in vkCreateImage when VkFormat is combined depthstencil.

Fixed many vulkancts tests that use combined depthstencil. For example,
fixes dEQP-VK.pipeline.depth.format.d16_unorm_s8_uint.compare_ops.\
not_equal_less_or_equal_not_equal_greater.

8 years agoanv: Add func anv_get_isl_format()
Chad Versace [Sat, 5 Dec 2015 00:18:35 +0000 (16:18 -0800)]
anv: Add func anv_get_isl_format()

8 years agoanv/image: Delete old ifdef'd out code
Chad Versace [Sat, 5 Dec 2015 00:11:47 +0000 (16:11 -0800)]
anv/image: Delete old ifdef'd out code

8 years agovk: Add needed builddir subdirectories to the include path
Jason Ekstrand [Fri, 4 Dec 2015 23:46:30 +0000 (15:46 -0800)]
vk: Add needed builddir subdirectories to the include path

This fixes out-of-tree builds and closes #1

8 years agovk: gem handles are uint32_t
Kristian Høgsberg Kristensen [Fri, 4 Dec 2015 20:52:43 +0000 (12:52 -0800)]
vk: gem handles are uint32_t

No functional difference, but lets be consistent with the kernel API.

8 years agovk: Update the README for 0.210.1
Jason Ekstrand [Fri, 4 Dec 2015 19:08:37 +0000 (11:08 -0800)]
vk: Update the README for 0.210.1

8 years agovk: Turn on Bay Trail, Cherryview and Broxton support
Kristian Høgsberg [Tue, 1 Dec 2015 23:39:30 +0000 (15:39 -0800)]
vk: Turn on Bay Trail, Cherryview and Broxton support

8 years agovk: Map uncached, coherent memory as write-combine
Kristian Høgsberg Kristensen [Fri, 4 Dec 2015 07:58:05 +0000 (23:58 -0800)]
vk: Map uncached, coherent memory as write-combine

This gives us the required characteristics for the memory type.

8 years agovk: Expose two memory types for non-LLC GPUs
Kristian Høgsberg Kristensen [Fri, 4 Dec 2015 07:09:09 +0000 (23:09 -0800)]
vk: Expose two memory types for non-LLC GPUs

We're required to expose a host-visible, coherent memory type. On big
core GPUs that share, LLC, we can expose one such memory type that's
also cached.  However, on non-LLC GPUs we can't both be cached and
coherent. Thus, we expose both the required coherent type and the cached
but non-coherent combination.

8 years agovk: clflush all state for non-LLC GPUs
Kristian Høgsberg [Tue, 1 Dec 2015 23:37:12 +0000 (15:37 -0800)]
vk: clflush all state for non-LLC GPUs

8 years agovk: Set I915_CACHING_NONE for userptr BOs when !llc
Kristian Høgsberg [Thu, 3 Dec 2015 20:09:33 +0000 (12:09 -0800)]
vk: Set I915_CACHING_NONE for userptr BOs when !llc

Regular objects are created I915_CACHING_CACHED on LLC platforms and
I915_CACHING_NONE on non-LLC platforms. However, userptr objects are
always created as I915_CACHING_CACHED, which on non-LLC means
snooped. That can be useful but comes with a bit of overheard.  Since
we're eplicitly clflushing and don't want the overhead we need to turn
it off.

8 years agovk: Implement vkFlushMappedMemoryRanges()
Kristian Høgsberg [Tue, 1 Dec 2015 23:25:07 +0000 (15:25 -0800)]
vk: Implement vkFlushMappedMemoryRanges()

We'll do a runtime switch on device->info.has_llc for now.

8 years agonir/spirv: Update to SPIR-V version 1.0
Jason Ekstrand [Fri, 4 Dec 2015 02:07:58 +0000 (18:07 -0800)]
nir/spirv: Update to SPIR-V version 1.0

8 years agoanv/gen9: Fix SURFACE_STATE halign and valign
Chad Versace [Thu, 3 Dec 2015 21:07:06 +0000 (13:07 -0800)]
anv/gen9: Fix SURFACE_STATE halign and valign

Pre-Skylake, RENDER_SUFFACE_STATE.SurfaceVerticalAlignment is in units
of surface samples. A surface sample is equivalent to a pixel in all
surfaces except interleaved multisample surfaces.

In Skylake, it is in units of surface elements. A surface element is
equivalent to a surface sample except for compressed formats, in which
case the element is a compression block.

8 years agoanv: Embed isl_surf into anv_surface
Chad Versace [Thu, 3 Dec 2015 16:40:47 +0000 (08:40 -0800)]
anv: Embed isl_surf into anv_surface

This reduces struct anv_surface to just two members: an offset and the
embedded isl_surf.

8 years agoanv/image: Drop assertions on SURFTYPE extent limits
Chad Versace [Thu, 3 Dec 2015 02:27:35 +0000 (18:27 -0800)]
anv/image: Drop assertions on SURFTYPE extent limits

In anv_image_create(), stop asserting that VkImageCreateInfo::extent
does not exceed the hardware limits for the given SURFTYPE. The
assertions were incorrect because they did not take into account the
hardware gen. Anyways, these types of assertions belong in isl, not
anvil.

8 years agoanv/image: Use isl to calculate surface layout
Chad Versace [Thu, 3 Dec 2015 00:46:16 +0000 (16:46 -0800)]
anv/image: Use isl to calculate surface layout

Remove the surface layout calculations in anv_image_make_surface().  Let
isl_surf_init() do the heavy lifting.

Fixes 8 Crucible tests and regresses none. (hw=Broadwell and
crucible@33d91ec).

8 years agoisl: Implement isl_surf_init() for gen4-gen9
Chad Versace [Sat, 14 Nov 2015 00:01:35 +0000 (16:01 -0800)]
isl: Implement isl_surf_init() for gen4-gen9

This is a big code push. The patch is about 3000 lines.

Function isl_surf_init() calculates the physical layout of a surface.

The implementation is "complete" (but untested) for all 1D, 2D, 3D, and
cube surfaces for gen4 through gen9, except:
    * gen9 1D surfaces
    * gen9 Ys multisampled surfaces
    * auxiliary surfaces (such as hiz, mcs, ccs)

8 years agoisl: Rename legacy Y tiling to ISL_TILING_Y0
Chad Versace [Wed, 2 Dec 2015 17:14:48 +0000 (09:14 -0800)]
isl: Rename legacy Y tiling to ISL_TILING_Y0

Rename legacy Y tiling from ISL_TILING_Y to ISL_TILING_Y0 in order to
clearly distinguish it from Yf and Ys.  Using ISL_TILING_Y to denote
legacy Y tiling would lead to confusion with i965, because i965 uses
I195_TILE_Y to denote *any* Y tiling.

8 years agoanv/image: Vulkan's depthPitch is in bytes, not rows
Chad Versace [Thu, 3 Dec 2015 02:41:08 +0000 (18:41 -0800)]
anv/image: Vulkan's depthPitch is in bytes, not rows

Fix for VkGetImageSubresourceLayout.

8 years agoanv/device: Give a version of 0.210.1 in apiVersion
Jason Ekstrand [Thu, 3 Dec 2015 23:23:33 +0000 (15:23 -0800)]
anv/device: Give a version of 0.210.1 in apiVersion

8 years agovk: Add new WSI support and bump the API to 0.210.1
Jason Ekstrand [Thu, 3 Dec 2015 00:28:36 +0000 (16:28 -0800)]
vk: Add new WSI support and bump the API to 0.210.1

8 years agoanv/entrypoints: Run the headers through the preprocessor first
Jason Ekstrand [Thu, 3 Dec 2015 06:06:22 +0000 (22:06 -0800)]
anv/entrypoints: Run the headers through the preprocessor first

This allows us to filter based on preprocessor directives.  We could build
a partial preprocessor into the generator, but we would likely get it
wrong.  This allows us to filter out, for instance, windows-specific WSI
stuff.

8 years agovk/0.210.0: Advertise version 0.210.0
Jason Ekstrand [Thu, 3 Dec 2015 21:27:00 +0000 (13:27 -0800)]
vk/0.210.0: Advertise version 0.210.0

8 years agovk/0.210.0: Update queries to the new API
Jason Ekstrand [Thu, 3 Dec 2015 21:25:12 +0000 (13:25 -0800)]
vk/0.210.0: Update queries to the new API

8 years agovk/0.210.0: Fix how we handle access flags in barriers
Jason Ekstrand [Thu, 3 Dec 2015 19:05:52 +0000 (11:05 -0800)]
vk/0.210.0: Fix how we handle access flags in barriers

The initial implementation in the 0.210.0 API update was misguieded as to
what the access flags meant.  This should be more correct.

8 years agovk/0.210.0: Update the VkFormat enum
Jason Ekstrand [Thu, 3 Dec 2015 01:47:37 +0000 (17:47 -0800)]
vk/0.210.0: Update the VkFormat enum

8 years agovk/0.210.0: Rework vkQueueSubmit
Jason Ekstrand [Thu, 3 Dec 2015 01:18:41 +0000 (17:18 -0800)]
vk/0.210.0: Rework vkQueueSubmit

8 years agovk/0.210.0: Remove depth clip and add depth clamp
Jason Ekstrand [Thu, 3 Dec 2015 01:07:26 +0000 (17:07 -0800)]
vk/0.210.0: Remove depth clip and add depth clamp

8 years agovk/0.210.0: Rework device features and limits
Jason Ekstrand [Thu, 3 Dec 2015 00:58:54 +0000 (16:58 -0800)]
vk/0.210.0: Rework device features and limits

8 years agovk/0.210.0: Rework QueueFamilyProperties
Jason Ekstrand [Thu, 3 Dec 2015 00:20:40 +0000 (16:20 -0800)]
vk/0.210.0: Rework QueueFamilyProperties

8 years agovk/0.210.0: Rework result and structure type enums
Jason Ekstrand [Thu, 3 Dec 2015 00:14:58 +0000 (16:14 -0800)]
vk/0.210.0: Rework result and structure type enums

By and large, this is just moving enum values around.  However, it also
removed VK_UNSUPPORTED which we were returning a number of places.  Those
places now return VK_ERROR_INCOMPATABLE_DRIVER.

8 years agovk/0.210.0: Remove the VkShaderStage enum
Jason Ekstrand [Thu, 3 Dec 2015 00:08:13 +0000 (16:08 -0800)]
vk/0.210.0: Remove the VkShaderStage enum

This made for an unfortunately large amount of work since we were using it
fairly heavily internally.  However, gl_shader_stage does basically the
same things, so it's not too bad.

8 years agovk/0.210.0: Remove VkShader
Jason Ekstrand [Wed, 2 Dec 2015 22:35:07 +0000 (14:35 -0800)]
vk/0.210.0: Remove VkShader

8 years agovk/0.210.0: Rework memory property flags
Jason Ekstrand [Wed, 2 Dec 2015 18:39:15 +0000 (10:39 -0800)]
vk/0.210.0: Rework memory property flags

8 years agovk/0.210.0: Remove some unused enum values
Jason Ekstrand [Wed, 2 Dec 2015 18:30:56 +0000 (10:30 -0800)]
vk/0.210.0: Remove some unused enum values

8 years agovk/0.210.0: Update VkPipelineStageFlagBits
Jason Ekstrand [Wed, 2 Dec 2015 18:29:50 +0000 (10:29 -0800)]
vk/0.210.0: Update VkPipelineStageFlagBits

8 years agovk/0.210.0: Trivial function argument name change
Jason Ekstrand [Wed, 2 Dec 2015 18:27:29 +0000 (10:27 -0800)]
vk/0.210.0: Trivial function argument name change

8 years agovk/0.210.0: We now allocate command buffers; not create them
Jason Ekstrand [Wed, 2 Dec 2015 11:48:58 +0000 (03:48 -0800)]
vk/0.210.0: We now allocate command buffers; not create them

8 years agovk/0.210.0: Rename a parameter to GetImageSparseMemoryRequirements
Jason Ekstrand [Wed, 2 Dec 2015 11:34:43 +0000 (03:34 -0800)]
vk/0.210.0: Rename a parameter to GetImageSparseMemoryRequirements

8 years agovk/0.210.0: Delete three no longer existant entrypoints
Jason Ekstrand [Wed, 2 Dec 2015 11:33:20 +0000 (03:33 -0800)]
vk/0.210.0: Delete three no longer existant entrypoints

8 years agovk/0.210.0: Rework allocation to use the new pAllocator's
Jason Ekstrand [Wed, 2 Dec 2015 11:28:27 +0000 (03:28 -0800)]
vk/0.210.0: Rework allocation to use the new pAllocator's

8 years agovk/0.210.0: Use VkSampleCountFlagBits for sample counts
Jason Ekstrand [Tue, 1 Dec 2015 22:09:17 +0000 (14:09 -0800)]
vk/0.210.0: Use VkSampleCountFlagBits for sample counts

8 years agovk/0.210.0: Rework VkInstanceCreateInfo
Jason Ekstrand [Tue, 1 Dec 2015 21:58:25 +0000 (13:58 -0800)]
vk/0.210.0: Rework VkInstanceCreateInfo

8 years agovk/0.210.0: More function argument renaming
Jason Ekstrand [Tue, 1 Dec 2015 21:50:09 +0000 (13:50 -0800)]
vk/0.210.0: More function argument renaming

8 years agovk/0.210.0: Replace MemoryInput/OutputFlags with AccessFlags
Jason Ekstrand [Tue, 1 Dec 2015 21:39:28 +0000 (13:39 -0800)]
vk/0.210.0: Replace MemoryInput/OutputFlags with AccessFlags

8 years agovk/0.210.0: Rework render pass description structures
Jason Ekstrand [Tue, 1 Dec 2015 21:09:22 +0000 (13:09 -0800)]
vk/0.210.0: Rework render pass description structures

8 years agovk/0.210.0: More structure field renaming
Jason Ekstrand [Tue, 1 Dec 2015 20:52:56 +0000 (12:52 -0800)]
vk/0.210.0: More structure field renaming

8 years agovk/0.210.0: Get rid of VkImageAspect
Jason Ekstrand [Tue, 1 Dec 2015 20:19:11 +0000 (12:19 -0800)]
vk/0.210.0: Get rid of VkImageAspect

8 years agovk/0.210.0: Rework descriptor sets
Jason Ekstrand [Tue, 1 Dec 2015 20:05:21 +0000 (12:05 -0800)]
vk/0.210.0: Rework descriptor sets

8 years agovk/0.210.0: Rename parameters to memory binding/mapping functions
Jason Ekstrand [Tue, 1 Dec 2015 05:18:12 +0000 (21:18 -0800)]
vk/0.210.0: Rename parameters to memory binding/mapping functions

8 years agovk/0.210.0: Update to the new instance/device create structs
Jason Ekstrand [Tue, 1 Dec 2015 05:10:14 +0000 (21:10 -0800)]
vk/0.210.0: Update to the new instance/device create structs

8 years agovk/0.210.0: More trivial struct/enum changes
Jason Ekstrand [Tue, 1 Dec 2015 04:59:58 +0000 (20:59 -0800)]
vk/0.210.0: More trivial struct/enum changes

8 years agovk/0.210.0: Trivial flag enum updates
Jason Ekstrand [Tue, 1 Dec 2015 02:15:41 +0000 (18:15 -0800)]
vk/0.210.0: Trivial flag enum updates

8 years agovk/0.210.0: Rename ChannelFlags to ColorComponentFlags
Jason Ekstrand [Tue, 1 Dec 2015 02:12:55 +0000 (18:12 -0800)]
vk/0.210.0: Rename ChannelFlags to ColorComponentFlags

8 years agovk/0.210.0: s/raster/rasterization/
Jason Ekstrand [Tue, 1 Dec 2015 02:05:00 +0000 (18:05 -0800)]
vk/0.210.0: s/raster/rasterization/

8 years agovk/0.210.0: Don't allow chaining of description structs
Jason Ekstrand [Tue, 1 Dec 2015 01:54:51 +0000 (17:54 -0800)]
vk/0.210.0: Don't allow chaining of description structs

8 years agovk/0.210.0: More fun with flags fields
Jason Ekstrand [Tue, 1 Dec 2015 01:46:38 +0000 (17:46 -0800)]
vk/0.210.0: More fun with flags fields

8 years agovk/0.210.0: Make pCode a uint32_t pointer
Jason Ekstrand [Tue, 1 Dec 2015 01:30:38 +0000 (17:30 -0800)]
vk/0.210.0: Make pCode a uint32_t pointer

8 years agovk/0.210.0: Rename origin fields of VkViewport
Jason Ekstrand [Tue, 1 Dec 2015 01:26:32 +0000 (17:26 -0800)]
vk/0.210.0: Rename origin fields of VkViewport

8 years agovk/0.210.0: Move alphaToOne and alphaToCoverate to multisample state
Jason Ekstrand [Tue, 1 Dec 2015 01:20:49 +0000 (17:20 -0800)]
vk/0.210.0: Move alphaToOne and alphaToCoverate to multisample state

8 years agovk/0.210.0: Add flags fields to various pipeline create structs
Jason Ekstrand [Tue, 1 Dec 2015 01:13:19 +0000 (17:13 -0800)]
vk/0.210.0: Add flags fields to various pipeline create structs

8 years agovk/0.210.0: Change field names in vertex input structs
Jason Ekstrand [Tue, 1 Dec 2015 01:00:30 +0000 (17:00 -0800)]
vk/0.210.0: Change field names in vertex input structs

8 years agovk/0.210.0: Misc. no-op structure changes
Jason Ekstrand [Tue, 1 Dec 2015 00:42:12 +0000 (16:42 -0800)]
vk/0.210.0: Misc. no-op structure changes

The only non-trivial change is to sparse resources that we don't handle
anyway.

8 years agovk/0.210.0: Rename property pCount parameters
Jason Ekstrand [Tue, 1 Dec 2015 00:28:36 +0000 (16:28 -0800)]
vk/0.210.0: Rename property pCount parameters

8 years agovk/0.210.0: Rework sampler filtering and mode enums
Jason Ekstrand [Tue, 1 Dec 2015 00:21:38 +0000 (16:21 -0800)]
vk/0.210.0: Rework sampler filtering and mode enums

8 years agovk/0.210.0: Misc. function argument renames
Jason Ekstrand [Tue, 1 Dec 2015 00:10:02 +0000 (16:10 -0800)]
vk/0.210.0: Misc. function argument renames

8 years agovk/0.210.0: Rework copy/clear/blit API
Jason Ekstrand [Mon, 30 Nov 2015 22:52:38 +0000 (14:52 -0800)]
vk/0.210.0: Rework copy/clear/blit API

8 years agovk/0.210.0: Rework dynamic states
Jason Ekstrand [Mon, 30 Nov 2015 22:19:41 +0000 (14:19 -0800)]
vk/0.210.0: Rework dynamic states

8 years agovk/0.210.0: Rework color blending enums
Jason Ekstrand [Mon, 30 Nov 2015 21:49:28 +0000 (13:49 -0800)]
vk/0.210.0: Rework color blending enums

8 years agogen7/8/cmd_buffer: Inline vk_to_gen_swizzle
Jason Ekstrand [Mon, 30 Nov 2015 21:29:49 +0000 (13:29 -0800)]
gen7/8/cmd_buffer: Inline vk_to_gen_swizzle

It's currently unused on IVB so we get compiler warnings.

8 years agovk/0.210.0: Rework a few raster/input enums
Jason Ekstrand [Mon, 30 Nov 2015 21:28:09 +0000 (13:28 -0800)]
vk/0.210.0: Rework a few raster/input enums

8 years agovk/0.210.0: Rework texture view component mapping
Jason Ekstrand [Mon, 30 Nov 2015 21:06:12 +0000 (13:06 -0800)]
vk/0.210.0: Rework texture view component mapping

8 years agovk/0.210.0: Switch to the new VKAPI function decorations
Jason Ekstrand [Mon, 30 Nov 2015 20:21:19 +0000 (12:21 -0800)]
vk/0.210.0: Switch to the new VKAPI function decorations

While we're at it, we do a bunch of the VkResult -> void updates

8 years agovk/0.210.0: Rename CmdBuffer to CommandBuffer
Jason Ekstrand [Mon, 30 Nov 2015 19:48:08 +0000 (11:48 -0800)]
vk/0.210.0: Rename CmdBuffer to CommandBuffer

8 years agovk/0.210.0: A pile of minor enum updates
Jason Ekstrand [Mon, 30 Nov 2015 19:12:44 +0000 (11:12 -0800)]
vk/0.210.0: A pile of minor enum updates

8 years agovk/0.210.0: Switch to the new-style handle declarations
Jason Ekstrand [Mon, 30 Nov 2015 18:31:44 +0000 (10:31 -0800)]
vk/0.210.0: Switch to the new-style handle declarations

8 years agovk: Add connonical 0.170.2 and 0.210.0 headers
Jason Ekstrand [Mon, 30 Nov 2015 18:24:33 +0000 (10:24 -0800)]
vk: Add connonical 0.170.2 and 0.210.0 headers

This is in preparation for the API update

9 years agovk: Fix 3DSTATE_WM_DEPTH_STENCIL for gen8
Kristian Høgsberg Kristensen [Thu, 26 Nov 2015 18:11:52 +0000 (10:11 -0800)]
vk: Fix 3DSTATE_WM_DEPTH_STENCIL for gen8

This packet is a different size on gen8 and we hit an assertion when we
try to merge a gen9 size dword array from the pipeline with the gen8
sized array we create from dynamic state.

Use a static assert in the merge macro and fix this issue by using different
wm_depth_stencil arrays on gen8 and gen9.

9 years agovk: Add SKL support
Kristian Høgsberg Kristensen [Thu, 26 Nov 2015 06:27:01 +0000 (22:27 -0800)]
vk: Add SKL support

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
9 years agovk: Make entrypoint generator output gen9 entry points
Kristian Høgsberg Kristensen [Tue, 15 Sep 2015 19:37:21 +0000 (12:37 -0700)]
vk: Make entrypoint generator output gen9 entry points

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
9 years agovk: Add GEN9 pack header
Kristian Høgsberg Kristensen [Tue, 15 Sep 2015 19:26:24 +0000 (12:26 -0700)]
vk: Add GEN9 pack header

9 years agovk: Move all gen8 files to gen8 lib
Kristian Høgsberg Kristensen [Wed, 25 Nov 2015 22:13:53 +0000 (14:13 -0800)]
vk: Move all gen8 files to gen8 lib

9 years agoMerge remote-tracking branch 'mesa-public/master' into vulkan
Jason Ekstrand [Mon, 23 Nov 2015 22:03:47 +0000 (14:03 -0800)]
Merge remote-tracking branch 'mesa-public/master' into vulkan

This pulls in nir cloning and some much-needed upstream refactors.

9 years agoi965: Use NIR for lowering texture swizzle
Jason Ekstrand [Thu, 12 Nov 2015 02:41:37 +0000 (18:41 -0800)]
i965: Use NIR for lowering texture swizzle

Now that nir_lower_tex can do texture swizzle lowering, we can use that
instead of repeating more-or-less the same code in both backends.  This
both allows us to share code and means that things like the tg4
work-arounds are somewhat simpler because they don't have to take the
swizzle into account.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
9 years agonir/lower_tex: Add support for lowering texture swizzle
Jason Ekstrand [Thu, 12 Nov 2015 02:30:31 +0000 (18:30 -0800)]
nir/lower_tex: Add support for lowering texture swizzle

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
9 years agonir: Add a tex_instr_is_query helper
Jason Ekstrand [Thu, 12 Nov 2015 02:30:09 +0000 (18:30 -0800)]
nir: Add a tex_instr_is_query helper

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
9 years agonir: Add a ssa_def_rewrite_uses_after helper
Jason Ekstrand [Thu, 12 Nov 2015 16:40:17 +0000 (08:40 -0800)]
nir: Add a ssa_def_rewrite_uses_after helper

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
9 years agonir: Use instr/if_rewrite in nir_ssa_def_rewrite_uses
Jason Ekstrand [Thu, 12 Nov 2015 05:13:26 +0000 (21:13 -0800)]
nir: Use instr/if_rewrite in nir_ssa_def_rewrite_uses

nir_ssa_def_rewrite_uses is one of the older helpers in NIR and predated
both of those.  Now it can be substantially simplified.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
9 years agonir/validate: Validated dests after sources
Jason Ekstrand [Thu, 12 Nov 2015 18:38:12 +0000 (10:38 -0800)]
nir/validate: Validated dests after sources

Previously, if someone accidentally made an instruction that refers to its
own SSA destination, the validator wouldn't catch it.  The reason for this
is that it validated the destination too early and, by the time it got to
the source, the destination SSA value was already added to the set of seen
SSA values so it would assume that it came from some previous instruction.
By moving destination validation to be after source validation, the SSA
value is not in the list of seen values and the validator will catch
self-referential instructions.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>