Commit Graph

14 Commits

Author SHA1 Message Date
Jason Ekstrand
ab6ed2e1ac anv/gen8_pipeline: Emit a real 3DSTATE_SBE_SWIZ packet 2015-10-26 16:25:02 -07:00
Jason Ekstrand
4c59ee808f anv/gen8_pipeline: Various 3DSTATE_GS fixes 2015-10-23 16:49:26 -07:00
Jason Ekstrand
82c579e314 anv/gen8: Set the correct maximum number of GS threads
This equation was pulled from mesa gen8_gs_state.c
2015-10-21 21:51:18 -07:00
Jason Ekstrand
a71e614d33 anv: Completely rework shader compilation
Now that we have a decent interface in upstream mesa, we can get rid of all
our hacks.  As of this commit, we no longer use any fake GL state objects
and all of shader compilation is moved into anv_pipeline.c.  This should
make way for actually implementing a shader cache one of these days.

As a nice side-benifit, this commit also gains us an extra 300 passing CTS
tests because we're actually filling out the texture swizzle information
for vertex shaders.
2015-10-20 13:02:03 -07:00
Jason Ekstrand
cc389b1482 vk/0.170.2: Rename cs to stage in ComputePipelineCreateInfo 2015-10-06 10:11:50 -07:00
Chad Versace
dd04be491d vk/0.170.2: Update Vk VkPipelineDepthStencilStateCreateInfo
Rename member depthBoundsEnable -> depthBoundsTestEnable.
2015-10-04 09:41:46 -07:00
Chad Versace
84cfc08c10 vk/pipeline: Fix crash when the pipeline has no attributes
If there are no attributes, don't emit 3DSTATE_VERTEX_ELEMENTS.
That packet does not allow 0 attributes.
2015-08-28 08:07:15 -07:00
Chad Versace
31af126229 vk: Program stencil ops in 3DSTATE_WM_DEPTH_STENCIL
The driver ignored the Vulkan stencil, always programming the hardware
stencil op to 0 (STENCILOP_KEEP).
2015-08-28 08:00:56 -07:00
Jason Ekstrand
4bb9915755 vk/gen8: Don't duplicate generic pipeline setup
gen8_graphics_pipeline_create had a bunch of stuff in it that's already set
up by anv_pipeline_init.  The duplication was causing double-initialization
of a state stream and made valgrind very angry.
2015-08-25 18:41:25 -07:00
Kristian Høgsberg Kristensen
891995e55b vk: Move 3DSTATE_SBE setup to just before 3DSTATE_PS
This is a more logical place for it, between geometry front end state
and pixel backend state.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-08-24 13:45:41 -07:00
Kristian Høgsberg Kristensen
9c752b5b38 vk: Move generic pipeline init to anv_pipeline.c
This logic will be shared between multiple gens.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-08-24 13:45:41 -07:00
Kristian Høgsberg Kristensen
3800573fb5 vk: Move gen8 specific state into gen8 sub-structs
This commit moves all occurances of gen8 specific state into a gen8
substruct. This clearly identifies the state as gen8 specific and
prepares for adding gen7 state structs. In the process we also rename
the field names to exactly match the command or state packet name,
without the 3DSTATE prefix, eg:

  3DSTATE_VF -> gen8.vf
  3DSTATE_WM_DEPTH_STENCIL -> gen8.wm_depth_stencil

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-08-24 13:45:41 -07:00
Kristian Høgsberg Kristensen
615da3795a vk: Always use a placeholder vertex shader in meta
The clear pipeline didn't have a vertex shader and relied on the clear
shader being hardcoded by the compiler to accept one attribute. This
necessitated a few special cases in the 3DSTATE_VS setup. Instead,
always provide a vertex shader, even if we disable VS dispatch.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-08-24 13:45:41 -07:00
Kristian Høgsberg Kristensen
64045eebfb vk: Reorder gen8 specific code into three new files
We'll organize gen specific code in three files per gen: pipeline,
cmd_buffer and state, eg:

    gen8_cmd_buffer.c
    gen8_pipeline.c
    gen8_state.c

where gen8_cmd_buffer.c holds all vkCmd* entry points, gne8_pipeline.c
all gen specific code related to pipeline building and remaining state
code (sampler, surface state, dynamic state) in gen8_state.c.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-08-24 13:45:40 -07:00