Commit graph

74 commits

Author SHA1 Message Date
Jason Ekstrand
790565b06e anv/pipeline: Handle output lowering in anv_pipeline instead of spirv_to_nir
While we're at it, we delete any unused variables.  This allows us to prune
variables that are not used in the current stage from the shader.
2016-01-11 11:06:06 -08:00
Jason Ekstrand
b8ec48ee76 anv/pipeline: Only delete functions for SPIR-V shaders
We can assume that direct NIR shaders only have one entrypoint
2016-01-11 11:06:06 -08:00
Jason Ekstrand
9f4ba499d1 nir/spirv: Take an entrypoint stage as well as a name 2016-01-11 11:06:06 -08:00
Jason Ekstrand
ec899f6b42 anv/pipeline: Lower indirect temporaries and inputs 2016-01-05 13:42:52 -08:00
Kristian Høgsberg Kristensen
30521fb19e vk: Implement a basic pipeline cache
This is not really a cache yet, but it allows us to share one state
stream for all pipelines, which means we can bump the block size without
wasting a lot of memory.
2016-01-05 12:03:21 -08:00
Kristian Høgsberg Kristensen
b2ad2a20b6 vk: Handle allocation failure in anv_pipeline_init()
Fixes dEQP-VK.api.object_management.alloc_callback_fail.* failures.
2016-01-04 10:06:50 -08:00
Jason Ekstrand
0fe4580e64 nir/spirv: Add support for multiple entrypoints per shader
This is done by passing the entrypoint name into spirv_to_nir.  It will
then process the shader as if that were the only entrypoint we care about.
Instead of returning a nir_shader, it now returns a nir_function.
2015-12-30 17:45:43 -08:00
Jason Ekstrand
e993e45eb1 nir/spirv: Get the shader stage from the SPIR-V
Previously, we depended on it being passed in.
2015-12-30 17:45:43 -08:00
Jason Ekstrand
e10b0e2b49 anv/pipeline: Use vs_prog_data.inputs_read when computing vb_used 2015-12-29 13:03:01 -08:00
Jason Ekstrand
7aaed91581 nir/spirv: Move to its own directory 2015-12-28 11:49:39 -08:00
Jason Ekstrand
d5fa51bdee Merge remote-tracking branch 'mesa-public/master' into vulkan
This pulls in the removal of nir_function_overload
2015-12-28 10:56:31 -08:00
Jason Ekstrand
ea77b384e8 Merge remote-tracking branch 'mesa-public/master' into vulkan
This pulls in tessellation and the store_var changes that go with it.
2015-12-27 23:23:05 -08:00
Jason Ekstrand
ac975b73cf anv/pipeline: Run lower_returns and inline_functions after spirv_to_nir 2015-12-23 13:49:56 -08:00
Jordan Justen
5e82a91324 anv/gen8: Add support for gl_NumWorkGroups
Co-authored-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2015-12-18 01:45:11 -08:00
Jason Ekstrand
1c51d91bfe anv/pipeline: Allow the user to pass a null MultisampleCreateInfo
According to section 5.2 of the Vulkan spec, this is allowed for color-only
rendering pipelines.
2015-12-15 16:26:10 -08:00
Jordan Justen
7edcc59a7b anv: Rename gs_vec4 to gs_kernel
The code generated may be vec4 or simd8 depending on how we start the
compiler.

To run the GS in SIMD8, set the INTEL_SCALAR_GS environment variable.
This was added in:

    commit 36fd653817
    Author: Kenneth Graunke <kenneth@whitecape.org>
    Date:   Wed Mar 11 23:14:31 2015 -0700

        i965: Add scalar geometry shader support.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2015-12-14 18:23:14 -08:00
Jason Ekstrand
d5c9955d3e Merge remote-tracking branch 'mesa-public/master' into vulkan
This pulls in nir_intrinsic_load/store changes and the switch of all
uniforms in i965 to bytes.  This accounts for the Vulkan changes.
2015-12-10 18:29:36 -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
cd75ff5d17 anv/pipeline: Only apply a pipeline layout if we have one 2015-12-07 16:56:02 -08:00
Kristian Høgsberg
773592051b vk: clflush all state for non-LLC GPUs 2015-12-04 09:51:47 -08:00
Jason Ekstrand
fed3586f34 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.
2015-12-03 13:43:54 -08:00
Jason Ekstrand
a5f19f64c3 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.
2015-12-03 13:43:54 -08:00
Jason Ekstrand
e10dc002e9 vk/0.210.0: Remove VkShader 2015-12-03 13:43:54 -08:00
Jason Ekstrand
a9fc0ce0e3 vk/0.210.0: Delete three no longer existant entrypoints 2015-12-03 13:43:53 -08:00
Jason Ekstrand
fcfb404a58 vk/0.210.0: Rework allocation to use the new pAllocator's 2015-12-03 13:43:53 -08:00
Jason Ekstrand
c30a021820 vk/0.210.0: More function argument renaming 2015-12-03 13:43:53 -08:00
Jason Ekstrand
7f2284063d vk/0.210.0: s/raster/rasterization/ 2015-12-03 13:43:52 -08:00
Jason Ekstrand
9fa6e328eb vk/0.210.0: Move alphaToOne and alphaToCoverate to multisample state 2015-12-03 13:43:52 -08:00
Jason Ekstrand
e673d64209 vk/0.210.0: Change field names in vertex input structs 2015-12-03 13:43:51 -08:00
Jason Ekstrand
4ab9391fbb vk/0.210.0: Rework dynamic states 2015-11-30 14:19:41 -08:00
Jason Ekstrand
9b1cb8fdbc vk/0.210.0: Rework a few raster/input enums 2015-11-30 13:28:17 -08:00
Jason Ekstrand
6a8a542610 vk/0.210.0: A pile of minor enum updates 2015-11-30 11:12:44 -08:00
Jason Ekstrand
3db43e8f3e vk/0.210.0: Switch to the new-style handle declarations 2015-11-30 10:58:02 -08:00
Kristian Høgsberg Kristensen
cd4721c062 vk: Add SKL support
Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-11-25 22:34:10 -08:00
Jason Ekstrand
179fc4aae8 Merge remote-tracking branch 'mesa-public/master' into vulkan
This pulls in nir cloning and some much-needed upstream refactors.
2015-11-23 14:03:47 -08:00
Jason Ekstrand
fa8db0dfcc anv: Put all of the descriptor set stuff together in one file
The stuff to take descriptor sets and turn them into binding tables and
sampler tables is still in anv_cmd_buffer.c.  We may want to consider
putting it in anv_descriptor_set.c eventually.
2015-11-18 14:58:43 -08:00
Jason Ekstrand
f0390bcad6 anv: Add initial Haswell support 2015-11-17 12:14:24 -08:00
Jason Ekstrand
de54b4b18f anv: Only include the pack headers where needed
Previously, we were including gen7_pack.h, gen75_pack.h, and gen8_pack.h
in anv_private.h.  As we add more gens, this is going to become untenable.
This commit moves things around so that we only use the pack headers when
and if we need them.
2015-11-16 12:29:09 -08:00
Jason Ekstrand
91bc4e7cec anv/pipeline: Don't free blend states that don't exist
Compute pipelines don't need a blend state so we shouldn't be
unconditionally freeing it.
2015-11-13 21:49:41 -08:00
Jason Ekstrand
104525c33b anv/pipeline: Set the right SSBO binding table start index for FS 2015-11-06 15:57:51 -08:00
Jason Ekstrand
1b5c7e7ecd anv/pipeline: Expose is_scalar_shader_stage 2015-11-06 15:12:33 -08:00
Jason Ekstrand
612e35b2c6 anv: Do range-checking in the shader for dynamic buffers 2015-11-06 13:32:52 -08:00
Jason Ekstrand
45b1bbe801 anv: Add a descriptor_index to anv_descriptor_set_binding_layout 2015-11-06 12:16:54 -08:00
Jason Ekstrand
3883728730 anv: Add better push constant support
What we had before was kind of a hack where we made certain untrue
assumptions about the incoming data.  This new support, while it still
doesn't support indirects properly (that will come), at least pulls the
offsets and strides from SPIR-V like it's supposed to.
2015-10-29 22:26:36 -07:00
Jason Ekstrand
37b6afb3d9 Add a todo comment about intput_slots_valid in the FS shader key 2015-10-26 16:25:02 -07:00
Jason Ekstrand
8aba8cf513 anv/pipeline: Use separate-shader 2015-10-23 10:53:00 -07:00
Jason Ekstrand
760c4b894d anv/pipeline: Pull separate_shader from NIR for vue map setup 2015-10-23 10:48:52 -07:00
Jason Ekstrand
d0e8c78407 anv/pipeline: set the gs_vertex_count in compile_gs
This was missed in the initial enabling commit.
2015-10-21 21:50:47 -07:00
Jason Ekstrand
8af2a09956 anv/pipeline: Make the has_push_constants computation more accurate
The computation used to only look for uniforms that weren't samplers.  Now
it also filters out arrays of samplers.
2015-10-21 21:50:16 -07:00
Jason Ekstrand
d538fe849d anv/pipeline: Add back basic geometry shader support
Now that we've done the refactoring upstream, it's much easier to to get
hooked up.  We haven't tested things well enough to know that we're setting
up the GPU state correctly for them yet but at least we can compile them now.
2015-10-21 18:45:48 -07:00