Commit Graph

78286 Commits

Author SHA1 Message Date
Kristian Høgsberg Kristensen c2b2ebf1ed anv: Add missing gen75_cmd_buffer_set_subpass() prototype 2016-02-15 17:40:15 -08:00
Adam Jackson 80ec20351c anv: Bump to 1.0.3
Probably this should be picked up from <vulkan.h> directly, or we should
just assume that any 1.0.x is legal.
2016-02-15 17:38:26 -08:00
Kristian Høgsberg Kristensen b53edea76c anv/gen7: Make disabling the FS work
We disable the fragment shader for depth/stencil-only pipelines. This
commit makes that work for gen7.
2016-02-15 17:32:07 -08:00
Kristian Høgsberg Kristensen 85f67cf16e anv: Deduplicate render pass code
This lets us share the renderpass code and depth/stencil state code
between gen 7 and gen 8.
2016-02-15 17:32:07 -08:00
Kristian Høgsberg Kristensen ac4fd0ed21 anv/gen7: Fix pipeline selection in init_device_state()
We need the 3D pipeline for the initial setup, not GPGPU.
2016-02-15 17:32:07 -08:00
Kristian Høgsberg Kristensen ea694637ac anv/gen7: Set 3DSTATE_SF depth buffer format correctly
We need to pull this from the render pass information at state flush
time.
2016-02-15 17:32:07 -08:00
Kristian Høgsberg Kristensen 18dd59538b anv/gen7: Call flush_pipeline_select_3d() from CmdBeginRenderPass 2016-02-15 17:32:07 -08:00
Kristian Høgsberg Kristensen 832f73f512 anv: Share flush_pipeline_select_3d() between gen7 and gen8 2016-02-15 17:32:07 -08:00
Kristian Høgsberg Kristensen 53eaa0a6b8 anv: Fix warning 3DSTATE_VERTEX_ELEMENTS setup
This is a little more subtle. If elem_count is 0, nothing else happens
in this function, so we return early to avoid warning about
uninitialized 'p'.
2016-02-15 17:32:07 -08:00
Kristian Høgsberg Kristensen 5d72d7b12d anv: Fix misc simple warnings 2016-02-15 17:32:07 -08:00
Jason Ekstrand 08ecd8a8d1 anv/meta_resolve: Set origin_upper_left on gl_FragCoord
It's required by the spec and any shaders that don't set it will be broken.
I'm not really sure how multisampling was even working before...
2016-02-15 12:45:03 -08:00
Jason Ekstrand 88042b9f10 nir: Get rid of the C++ NIR_SRC/DEST_INIT macros
These were originally added to reduce compiler warnings but aren't really
needed.  Getting rid of them reduces the diff between the Vulkan branch and
master, so we might as well.
2016-02-12 21:35:02 -08:00
Kristian Høgsberg Kristensen c136672c59 anv: Disable snooping for allocator pools again
The race we were seeing on cherryview was caused by the multi-submit
problem with fences. We can now turn snooping off again an rely on
clflush and we intended.
2016-02-12 15:11:31 -08:00
Kristian Høgsberg Kristensen b0c30b77d4 anv: Submit fence bo only after all command buffers
We were submitting the fence bo after each command buffer in a multi
command buffer submit, causing us to occasionally complete the fence too
early.
2016-02-12 15:08:09 -08:00
Kristian Høgsberg Kristensen 39a120aefe anv: Implement VkPipelineCache
We hash the input SPIR-V, specialization constants, entrypoint and the
shader key using SHA1 to determine a unique identifier for the
combination. A VkPipelineCache is then a hash table mapping these
identifiers to the corresponding prog_data and kernel data.
2016-02-12 11:53:49 -08:00
Chad Versace 03bea8fda7 anv/meta_blit: Remove references to clearing
Long ago, the blit code used to handle clearing and blitting.

- Fix any comments that refer to clearing.
- Rename shader var 'attr' to 'tex_pos'. The name 'attr' is an artifact
  of the time when the shader was used for blitting as well as clearing.
2016-02-12 11:29:29 -08:00
Chad Versace 97b5a07378 anv/meta_blit: Coalesce glsl_vec4_type vars
Just a refactor. No behavior change.

Several expressions have the same value: they point to
glsl_vec4_type(). Coalesce them into a single variable.
2016-02-12 11:29:29 -08:00
Jason Ekstrand 699f21216f anv/device: clflush simple batches if !LLC 2016-02-12 11:00:42 -08:00
Jason Ekstrand 42155abdd7 anv: Add a clfush_range helper function 2016-02-12 11:00:08 -08:00
Jason Ekstrand 3c8dc1afd1 nir/spirv/glsl: Clean up the row-skipping swizzle logic a bit 2016-02-12 10:40:39 -08:00
Chad Versace 37f4dfb19d anv/meta: Move blit code to anv_meta_blit.c
The clear code lived in anv_meta_clear.c. The resolve code in
anv_meta_resolve.c. Only the blit code lived in anv_meta.c, alongside
the shareed meta code.

This is just a copy-paste patch. No change in behavior.
2016-02-12 09:56:24 -08:00
Chad Versace cf7fd53850 anv/meta: Hardcode smooth texcoord interpolation in blit shaders
Trivial cleanup. No change in behavior.

Function argument 'attr_flat', in anv_meta.c:build_nir_vertex_shader(),
was always false.
2016-02-12 09:15:58 -08:00
Jason Ekstrand ea93041ccc anv/device: Use a normal BO in submit_simple_batch 2016-02-11 21:39:15 -08:00
Jason Ekstrand 3a2b23a447 anv: Add a vk_icdGetInstanceProcAddr entrypoint
Aparently there are some issues in symbol resolution if an application
packages its own loader and you have a system-installed one.  I don't
really understand the details, but it's not onorous to add.
2016-02-11 21:20:12 -08:00
Jason Ekstrand 25b09d1b5d anv/event: Use a 64-bit value
The immediate write from PIPE_CONTROL is 64-bits at least on BDW.  This
used to work on 64-bit archs because the compiler would align the following
anv_state struct up for us.  However, in 32-bit builds, they overlap and it
causes problems.
2016-02-11 19:00:56 -08:00
Jason Ekstrand 3086c5a5e1 gen8/pipeline: Properly set bits in PS_EXTRA for W, depth, and samaple mask 2016-02-11 15:22:18 -08:00
Jason Ekstrand 4016619931 nir/spirv: Allow the clip distance capability. 2016-02-11 15:14:46 -08:00
Jason Ekstrand da4a6bbbea gen8/pipeline: Pull gs_vertex_count from prog_data 2016-02-11 15:13:54 -08:00
Jason Ekstrand ff8895ba56 Merge remote-tracking branch 'mesa-public/master' into vulkan 2016-02-11 15:09:30 -08:00
Jason Ekstrand 9f8c01b03c i965/gs: Pass VerticesIn though prog_data
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-02-11 15:07:20 -08:00
Jason Ekstrand 56eb9c44ad i965/fs: Pass usage of depth, W, and sample mask through prog_data
We really need to stop pulling information directly out of shaders for
state setup.  For one thing, if we want any sort of an on-disk shader
cache, having all of this metadata in one place is going to be crucial.
Also, passing it all through prog_data cleans up the compiler <-> state
setup API substantially.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-02-11 15:07:20 -08:00
Jason Ekstrand ae3543950c i965/fs: Refactor setup_payload_gen6 to assume FS
It's extremely FS specific so the fact that we have a stage check in the
middle of it is rather bogus.  While were here, we rename
setup_payload_gen4 and setup_payload_gen6 to make it obvious that they are
both FS specific.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-02-11 15:07:20 -08:00
Samuel Pitoiset d759f0ddf1 nv50,nvc0: remove unused parameter in nvXX_state_validate()
This 'words' parameter is there since 2011 but it has never been used.
While we are at it, get rid of the extern declaration.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-02-11 23:14:16 +01:00
Timothy Arceri b600247035 glsl: don't validate interface blocks twice
We already check for opaque types so don't recheck for atomics
and images.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2016-02-12 09:12:23 +11:00
Timothy Arceri 98d3cc9fbc glsl: remove duplicate embedded struct validation
Commit c98deb18d5 in 2010 disallowed embedded struct definitions
in ES. Then in 2013 d9bb8b7b56 disallowed it for everything but
GLSL 1.10.

Commit c98deb18d5 seemed the cleanest way to do the check so its
been extended to cover GL and the other version has been removed.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2016-02-12 09:06:49 +11:00
Jose Fonseca 0d4898ae80 include,gallium: Remove pre-MSVC 2013 compatibility.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2016-02-11 21:36:00 +00:00
Jose Fonseca a97a955b92 scons: Eliminate MSVC2008 compatibility.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2016-02-11 21:36:00 +00:00
Jose Fonseca 1cadfe08c4 configure: Eliminate MSVC2008 compatibility.
We no longer need to build any part of Mesa with Windows SDK 7.0.7600 or
MSVC 2008.  MSVC 2013 will be the oldest we support.

In practice this means people are now free to declare variables in the
middle of blocks, on the whole Mesa tree.

Care should still be taken with variable length arrays and void pointer
arithmetic.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Hella-acked-by: Ian Romanick <ian.d.romanick@intel.com>
2016-02-11 21:36:00 +00:00
Chris Forbes a2c8b5ece5 i965: ir: dump floats as %-g rather than %f, so we can see denormals
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com>
2016-02-11 12:10:29 -08:00
Jordan Justen 9f36070c2f i965/gen7: Require kernel cmd_parser 5 for ARB_compute_shader
The indirect dispatch registers were whitelisted in command parser
version 5. (Version 5 is available as of Linux 4.4)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-02-11 10:49:13 -08:00
Marek Olšák a8aa73f768 st/mesa: release GLSL IR in LinkShader after it's not needed
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-02-11 17:31:40 +01:00
Marek Olšák 906ecab450 mesa: call build_program_resource_list inside Driver.LinkShader
to allow LinkShader to free the GLSL IR.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-02-11 16:56:28 +01:00
Marek Olšák 0f235c960c st/mesa: use correct pipe functions to create tess shaders
Broken by one of my cleanups. Spotted by luck.

Radeonsi doesn't care, because all shader create callbacks go to the same
function.

Reviewed-by: Brian Paul <brianp@vmware.com>
2016-02-11 16:56:28 +01:00
Marek Olšák 100796c15c gallium/radeon: drop support for LLVM 3.5
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>

v2: adjust the comment in the amdgpu winsys
2016-02-11 16:48:30 +01:00
Marek Olšák 3dc1cb0cc7 radeonsi: obtain commonly used LLVM types only once
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-02-11 16:48:30 +01:00
Marek Olšák 1643dca513 radeonsi: cleanup shader codegen
si_shader_ctx -> ctx
type * ptr -> type *ptr
si_shader_context *shader -> si_shader_context *ctx

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-02-11 16:48:30 +01:00
Marek Olšák 1c8a1a8fed radeonsi: fix a crash when binding a sampler buffer
Buffers don't contain r600_texture.

Broken by 7aedbbacae6d3ec3d06735fff2eb66:
"radeonsi: put image, fmask, and sampler descriptors into one array"

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94091
2016-02-11 16:48:30 +01:00
Kristian Høgsberg Kristensen 2009e304f7 anv/pack: Handle case where a struct field covers multiple dwords
We also didn't add start to field.end to get the absolute field end
position.
2016-02-10 22:36:38 -08:00
Emil Velikov 0f3cea95ab docs: add news item and link release notes for 11.1.2
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-02-11 01:47:16 +00:00
Emil Velikov 0802afd92d docs: add sha256 checksums for 11.1.2
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit e49dd21bcbabdb330620d48f5915828cfd5eb983)
2016-02-11 01:45:27 +00:00