Commit graph

75958 commits

Author SHA1 Message Date
Jordan Justen
47e5fb52f4 gen8/compute: Setup push constants and local ids
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2015-12-09 11:04:30 -08:00
Jordan Justen
f8d5fb4293 anv: Add anv_cmd_buffer_cs_push_constants
Similar to anv_cmd_buffer_push_constants, but handles the compute
pipeline, which requires different setup from the other stages.

This also handles initializing the compute shader local IDs.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2015-12-09 11:02:20 -08:00
Jordan Justen
974bdfa9ad i965: Move brw_cs_fill_local_id_payload to brw_compiler.h
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2015-12-08 18:09:31 -08:00
Jordan Justen
d28df86c87 anv/compute: Fix thread width max off by 1
See cooresponding code in:

commit 8d87070af2
Author: Jordan Justen <jordan.l.justen@intel.com>
Date:   Thu Aug 28 14:47:19 2014 -0700

    i965/cs: Implement brw_emit_gpgpu_walker

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2015-12-08 18:09:31 -08:00
Chad Versace
db66424218 anv: Remove unused anv_image_view_info_for_vk_image_view_type() 2015-12-08 14:25:28 -08:00
Jason Ekstrand
f4aee5d82f gen8/cmd_buffer: Flush push constants after descriptor sets
This is because, if storage images are used, flushing descriptor sets can
cause push constants to become dirty.
2015-12-07 21:45:43 -08:00
Jason Ekstrand
43ac954e25 anv: Add initial support for pushing image params
The helper to fill out the image params data-structure is stilly a dummy,
but this puts the infastructure in place.
2015-12-07 21:08:26 -08:00
Jason Ekstrand
1eb731d9fe anv/descriptor_set: Add support for storage images in layouts 2015-12-07 21:08:26 -08:00
Jason Ekstrand
ff05f634f6 anv/image: Add a separate storage image surface state
Thanks to hardware limitations, storage images may need a different surface
format and/or other bits in the surface state.
2015-12-07 21:08:22 -08:00
Jason Ekstrand
8f83222d37 isl: Add initial support for storage images 2015-12-07 21:08:08 -08:00
Jason Ekstrand
42b4417031 HACK/i965: Disable assign_var_locations on uniforms
This conflicts with the way we're doing uniforms in Vulkan.
2015-12-07 17:19:55 -08:00
Jason Ekstrand
cd75ff5d17 anv/pipeline: Only apply a pipeline layout if we have one 2015-12-07 16:56:02 -08:00
Chad Versace
9098e0f074 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.
2015-12-07 09:28:14 -08:00
Chad Versace
3d85a28e90 anv: Assert the succes of isl_surf_init() 2015-12-07 08:54:59 -08:00
Chad Versace
64e8af69b1 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().
2015-12-07 08:50:28 -08:00
Chad Versace
c97d8af9aa 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.
2015-12-07 08:42:11 -08:00
Chad Versace
01e2932d6a anv: Remove unused anv_format_s8_uint
This is no longer needed after migrating to isl.
2015-12-07 08:40:14 -08:00
Kristian Høgsberg Kristensen
0a5bee1fe6 vk: Don't override and hardcode autoconf CFLAGS
To disable optimizations pass CFLAGS="-O0 -g" on the configure command
line.
2015-12-04 21:24:15 -08:00
Kristian Høgsberg Kristensen
7337870036 vk: Move isl files to libisl.la helper library
These will be in their own library eventually - let's just do that now.
2015-12-04 21:24:15 -08:00
Chad Versace
2f270f0d15 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.
2015-12-04 16:37:05 -08:00
Chad Versace
a09b4c298c anv: Add func anv_get_isl_format() 2015-12-04 16:37:05 -08:00
Chad Versace
8b9ceda9f1 anv/image: Delete old ifdef'd out code 2015-12-04 16:37:05 -08:00
Jason Ekstrand
4dd5ef9e09 vk: Add needed builddir subdirectories to the include path
This fixes out-of-tree builds and closes #1
2015-12-04 15:48:27 -08:00
Kristian Høgsberg Kristensen
f1f78a371e vk: gem handles are uint32_t
No functional difference, but lets be consistent with the kernel API.
2015-12-04 12:53:27 -08:00
Jason Ekstrand
8f722c2fa3 vk: Update the README for 0.210.1 2015-12-04 11:08:45 -08:00
Kristian Høgsberg
dac57750db vk: Turn on Bay Trail, Cherryview and Broxton support 2015-12-04 09:51:47 -08:00
Kristian Høgsberg Kristensen
bbb6875f35 vk: Map uncached, coherent memory as write-combine
This gives us the required characteristics for the memory type.
2015-12-04 09:51:47 -08:00
Kristian Høgsberg Kristensen
c3c61d210f 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.
2015-12-04 09:51:47 -08:00
Kristian Høgsberg
773592051b vk: clflush all state for non-LLC GPUs 2015-12-04 09:51:47 -08:00
Kristian Høgsberg
b431cf59a3 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.
2015-12-04 09:51:47 -08:00
Kristian Høgsberg
e0b5f0308c vk: Implement vkFlushMappedMemoryRanges()
We'll do a runtime switch on device->info.has_llc for now.
2015-12-04 09:51:47 -08:00
Jason Ekstrand
cb2382882e nir/spirv: Update to SPIR-V version 1.0 2015-12-03 18:28:10 -08:00
Chad Versace
371fc2bc20 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.
2015-12-03 15:33:08 -08:00
Chad Versace
981ef2f02d anv: Embed isl_surf into anv_surface
This reduces struct anv_surface to just two members: an offset and the
embedded isl_surf.
2015-12-03 15:31:00 -08:00
Chad Versace
594e673fcc 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.
2015-12-03 15:29:52 -08:00
Chad Versace
b369389640 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).
2015-12-03 15:29:08 -08:00
Chad Versace
afdadec77f 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)
2015-12-03 15:26:11 -08:00
Chad Versace
bda43a0f59 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.
2015-12-03 15:26:11 -08:00
Chad Versace
57941b61ab anv/image: Vulkan's depthPitch is in bytes, not rows
Fix for VkGetImageSubresourceLayout.
2015-12-03 15:26:11 -08:00
Jason Ekstrand
bfeaf67391 anv/device: Give a version of 0.210.1 in apiVersion 2015-12-03 15:23:33 -08:00
Jason Ekstrand
d666487dc6 vk: Add new WSI support and bump the API to 0.210.1 2015-12-03 15:15:29 -08:00
Jason Ekstrand
fde60c1684 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.
2015-12-03 14:13:55 -08:00
Jason Ekstrand
4c19243562 vk/0.210.0: Advertise version 0.210.0 2015-12-03 13:44:02 -08:00
Jason Ekstrand
888744cabf vk/0.210.0: Update queries to the new API 2015-12-03 13:44:02 -08:00
Jason Ekstrand
924fbfc9a1 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.
2015-12-03 13:44:02 -08:00
Jason Ekstrand
fa2435de3c vk/0.210.0: Update the VkFormat enum 2015-12-03 13:44:02 -08:00
Jason Ekstrand
4e904a0310 vk/0.210.0: Rework vkQueueSubmit 2015-12-03 13:44:02 -08:00
Jason Ekstrand
5757ad2959 vk/0.210.0: Remove depth clip and add depth clamp 2015-12-03 13:43:59 -08:00
Jason Ekstrand
d689745303 vk/0.210.0: Rework device features and limits 2015-12-03 13:43:54 -08:00
Jason Ekstrand
74c4c4acb6 vk/0.210.0: Rework QueueFamilyProperties 2015-12-03 13:43:54 -08:00