summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/genX_pipeline_util.h
Commit message (Collapse)AuthorAgeFilesLines
* anv: replace , with ; in anv_batch_emit()Lionel Landwerlin2016-10-171-2/+2
| | | | | Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* anv/pipeline: Remove a meta hack from emit_ds_stateJason Ekstrand2016-10-141-4/+1
| | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
* anv: Get rid of graphics_pipeline_create_info_extraJason Ekstrand2016-10-141-24/+10
| | | | | | | | | Now that we no longer have meta, all pipelines get created via the normal Vulkan pipeline creation mechanics. There is no more need for this bit of extra magic data that we've been passing around. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* anv: use correct header guardsEmil Velikov2016-10-141-0/+5
| | | | | Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Chad Versace <chadversary@chromium.org>
* anv: Allow vp_info to be NULL in 3DSTATE_CLIP code.Kenneth Graunke2016-10-111-1/+1
| | | | | | | pViewportState may be NULL if rasterization is disabled. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* intel: Move Vulkan sample positions to common codeJason Ekstrand2016-09-141-5/+5
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* anv: Generalize emit_urb_setupJason Ekstrand2016-09-131-20/+39
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* anv/pipeline: Roll compute_urb_partition into emit_urb_setupJason Ekstrand2016-09-131-8/+138
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* anv: Rework pipeline cachingJason Ekstrand2016-08-301-1/+1
| | | | | | | | | | | | | | | | | | | The original pipeline cache the Kristian wrote was based on a now-false premise that the shaders can be stored in the pipeline cache. The Vulkan 1.0 spec explicitly states that the pipeline cache object is transiant and you are allowed to delete it after using it to create a pipeline with no ill effects. As nice as Kristian's design was, it doesn't jive with the expectation provided by the Vulkan spec. The new pipeline cache uses reference-counted anv_shader_bin objects that are backed by a large state pool. The cache itself is just a hash table mapping keys hashes to anv_shader_bin objects. This has the added advantage of removing one more hand-rolled hash table from mesa. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Cc: "12.0" <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97476 Acked-by: Kristian Høgsberg Kristensen <krh@bitplanet.net>
* anv: Add pipeline_has_stage guards a few placesJason Ekstrand2016-08-301-3/+7
| | | | | | | | | All of these worked before because they were depending on prog_data to be null. Soon, we won't be able to depend on a nice prog_data pointer and it's nice to be more explicit anyway. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Cc: "12.0" <mesa-stable@lists.freedesktop.org>
* genxml/gen9: Make 3DSTATE_SBE::AttributeActiveComponentFormat an arrayJason Ekstrand2016-08-191-35/+3
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* anv: pipeline: gen7: fix assert in debug modeLionel Landwerlin2016-08-121-0/+4
| | | | | | | | | | SampleMask is only 8bits long on gen7. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97278 Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* anv: Use macro to avoid code duplication for sample positionsAnuj Phogat2016-08-121-30/+5
| | | | | Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/pipeline: Add sample locations for gen7-7.5Anuj Phogat2016-08-091-0/+47
| | | | | | | | | | V1: Add multisample positions (Nanley) V2: Fix 8x sample positions to match OpenGL (Anuj) V3: Vulkan has standard sample locations. They need not be same as in OpenGL. (Anuj) Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/pipeline: Move emit_ms_state() to genX_pipeline_util.hAnuj Phogat2016-08-091-0/+40
| | | | | | | This will help sharing multisample state setting code. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/pipeline/gen7: Set multisample modesLionel Landwerlin2016-08-081-0/+5
| | | | | | | | | | | | | | | | | Fixes the following failures : dEQP-VK.api.copy_and_blit.resolve_image.whole_4_bit dEQP-VK.api.copy_and_blit.resolve_image.whole_8_bit dEQP-VK.api.copy_and_blit.resolve_image.partial_4_bit dEQP-VK.api.copy_and_blit.resolve_image.partial_8_bit dEQP-VK.api.copy_and_blit.resolve_image.with_regions_4_bit dEQP-VK.api.copy_and_blit.resolve_image.with_regions_8_bit Tested on IVB/HSW Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/pipeline: rename info to rs_info in emit_rs_stateLionel Landwerlin2016-08-081-8/+8
| | | | | | Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/pipeline/gen7: Set the depth format in 3DSTATE_SFJason Ekstrand2016-08-081-0/+21
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* anv/pipeline: Unify 3DSTATE_RASTER and 3DSTATE_SF setup between gen7 and gen8Jason Ekstrand2016-08-081-0/+61
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* anv: Perform rasterizer discard in the SOL stage instead of the clipper.Kenneth Graunke2016-07-301-2/+10
| | | | | | | | | See commit b0629e6894513a2c49a018bc3342a4e55435a236, where we discovered that the SOL stage's "Rendering Disable" feature is a lot faster at throwing away all geometry than the clipper's "reject all" mode. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/pipeline: Set up point coord enablesJason Ekstrand2016-07-221-0/+5
| | | | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Tested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: "12.0" <mesa-stable@lists.freedesktop.org>
* anv: Unify 3DSTATE_CLIP code across generations.Kenneth Graunke2016-07-201-0/+36
| | | | | | | | | | The bulk of this is the same. There are just a couple fields that only exist on one generation or another, and we can easily handle those with an #ifdef. Cc: "12.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/pipeline: Unify blend state setup between gen7 and gen8Jason Ekstrand2016-07-151-0/+134
| | | | | | | | | This fixes all 674 broken dEQP-VK.pipeline.blend Vulkan CTS tests on Haswell. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "12.0" <mesa-stable@lists.freedesktop.org>
* anv/pipeline: Silently pass tests if depth or stencil is missingJason Ekstrand2016-06-031-1/+29
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Cc: "12.0" <mesa-stable@lists.freedesktop.org>
* anv/pipeline: Unify gen7/8 emit_ds_stateJason Ekstrand2016-06-031-0/+59
| | | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "12.0" <mesa-stable@lists.freedesktop.org>
* anv: Move push constant allocation to the command bufferJason Ekstrand2016-05-271-12/+0
| | | | | | | | | | Instead of blasting it out as part of the pipeline, we put it in the command buffer and only blast it out when it's really needed. Since the PUSH_CONSTANT_ALLOC commands aren't pipelined, they immediately cause a stall which we would like to avoid. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* anv: Add a devinfo argument to the get_format functionsJason Ekstrand2016-05-171-1/+2
|
* anv/formats: Add an anv_get_format helperJason Ekstrand2016-05-171-2/+1
| | | | | | | | | This commit removes anv_format_for_vk_format and adds an anv_get_format helper. The anv_get_format helper returns the anv_format by-value. Unlike anv_format_for_vk_format the format returned by anv_get_format is 100% accurate and includes any tweaks needed for tiled vs. linear. anv_get_isl_format is now just a wrapper around anv_get_format that picks off just the isl_format.
* anv: s/anv_batch_emit_blk/anv_batch_emit/Jason Ekstrand2016-04-201-6/+6
| | | | Acked-by: Kristian Høgsberg <krh@bitplanet.net>
* anv/genX_pipeline: Use the new emit macroJason Ekstrand2016-04-201-26/+32
| | | | Acked-by: Kristian Høgsberg <krh@bitplanet.net>
* anv/pipeline: Set up flat enables correctlyJason Ekstrand2016-04-091-0/+1
|
* anv: Store prog data in pipeline cache streamKristian Høgsberg Kristensen2016-03-051-15/+21
| | | | | We have to keep it there for the cache to work, so let's not have an extra copy in struct anv_pipeline too.
* anv/pipeline: Calculate the correct max_source_attr for 3DSTATE_SBEJason Ekstrand2016-03-051-4/+6
|
* anv/pipeline: Pull 3DSTATE_SBE into a shared helperJason Ekstrand2016-03-011-0/+109
|
* anv/pipeline: Set URB offset to zero if size is zeroJordan Justen2016-02-281-2/+3
| | | | | | | | | | | | | After 3ecd357d816dc71b2c6ebd6ace38c76ebb25674e, it may be possible for the VS to get assigned all of the URB space. On Ivy Bridge, this will cause the offset for the other stages to be 16, which cannot be packed into the ConstantBufferOffset field of 3DSTATE_PUSH_CONSTANT_ALLOC_*. Instead we can set the offset to zero if the stage size is zero. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* anv: Emit 3DSTATE_PUSH_CONSTANT_ALLOC_* via a loop.Kenneth Graunke2016-02-241-9/+8
| | | | Now we're emitting HS and DS packets as well.
* anv: Emit 3DSTATE_URB_* via a loop.Kenneth Graunke2016-02-241-19/+7
| | | | | | | | | | Rather than keeping separate {vs,hs,ds,gs}_start fields, we now store an array indexed by the shader stage (MESA_SHADER_*). The 3DSTATE_URB_* commands are also sequentially numbered. This makes it easy to just emit them in a loop. This simplifies the code a little, and also will make it easier to add more credible HS and DS code later.
* anv: Switch over to the macros in genxmlJason Ekstrand2016-02-201-5/+5
|
* Move the intel vulkan driver to src/intel/vulkanJason Ekstrand2016-02-181-0/+327