summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* vk: Move 3DSTATE_SBE setup to just before 3DSTATE_PSKristian Høgsberg Kristensen2015-08-241-7/+7
| | | | | | | This is a more logical place for it, between geometry front end state and pixel backend state. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Move generic pipeline init to anv_pipeline.cKristian Høgsberg Kristensen2015-08-243-65/+134
| | | | | | This logic will be shared between multiple gens. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Move gen8 specific state into gen8 sub-structsKristian Høgsberg Kristensen2015-08-245-33/+38
| | | | | | | | | | | | | 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 <[email protected]>
* vk: Always use a placeholder vertex shader in metaKristian Høgsberg Kristensen2015-08-242-12/+40
| | | | | | | | | 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 <[email protected]>
* vk: Trim out irrelevant 0-initialized surface state fieldsKristian Høgsberg Kristensen2015-08-241-15/+0
| | | | | | | Many of of these fields aren't used for buffer surfaces, so leave them out for brevity. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Update generated headersKristian Høgsberg Kristensen2015-08-242-0/+4
| | | | | | | This adds VALIGN_2 and VALIGN_4 defines for IVB and HSW RENDER_SURFACE_STATE. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Move anv_color_attachment_view_init() to gen8_state.cKristian Høgsberg Kristensen2015-08-243-95/+117
| | | | | | | | | I'd prefer to move anv_CreateAttachmentView() as well, but it's a little too much generic code to just duplicate for each gen. For now, we'll add a anv_color_attachment_view_init() to dispatch to the gen specific implementation, which we then call from anv_CreateAttachmentView(). Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Move anv_CreateImageView to gen8_state.cKristian Høgsberg Kristensen2015-08-243-135/+197
| | | | | | | We'll probably want to move some code back into a shared init function, but this gets one GEN8 surface state initialization out of anv_image.c. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Make anv_cmd_buffer_begin_subpass() switch on genKristian Høgsberg Kristensen2015-08-241-1/+7
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Add generic wrapper for filling out buffer surface stateKristian Høgsberg Kristensen2015-08-243-2/+21
| | | | | | | We need this for generating surface state on the fly for dynamic buffer views. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Add helper for adding surface state relocKristian Høgsberg Kristensen2015-08-241-12/+13
| | | | | | | We're going to have to do this differently for earlier gens, so lets do it in place only. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Make batch chain code gen-agnosticKristian Høgsberg Kristensen2015-08-241-0/+14
| | | | | | | | Since the extra dword in MI_BATCH_BUFFER_START added in gen8 is at the end of the struct, we can emit the gen8 packet on all gens as long as we set the instruction length correctly. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Move vkCmdPipelineBarrier to gen8_cmd_buffer.cKristian Høgsberg Kristensen2015-08-242-138/+138
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Use helper function for emitting MI_BATCH_BUFFER_STARTKristian Høgsberg Kristensen2015-08-241-16/+12
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Use anv_batch_emit() for chaining back to primary batchKristian Høgsberg Kristensen2015-08-241-22/+14
| | | | | | | We used to use a manual GEN8_MI_BATCH_BUFFER_START_pack() call, but this refactors the code to use anv_batch_emit(); Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Downgrade state packet to gen7 where they're commonKristian Høgsberg Kristensen2015-08-243-14/+16
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Reorder gen8 specific code into three new filesKristian Høgsberg Kristensen2015-08-247-1057/+1144
| | | | | | | | | | | | | | | 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 <[email protected]>
* vk: Move gen8_CmdBindIndexBuffer() to anv_gen8.cKristian Høgsberg Kristensen2015-08-242-29/+28
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Move gen8_cmd_buffer_emit_state_base_address() to anv_gen8.cKristian Høgsberg Kristensen2015-08-243-76/+90
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Move gen8 specific parts of queries to anv_gen8.cKristian Høgsberg Kristensen2015-08-243-202/+202
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Move dynamic depth stenctil to anv_gen8.cKristian Høgsberg Kristensen2015-08-242-36/+44
|
* vk: Move pipeline creation to anv_gen8.cKristian Høgsberg Kristensen2015-08-244-670/+710
|
* vk: Move anv_CreateSampler to anv_gen8.cKristian Høgsberg Kristensen2015-08-242-95/+100
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Move anv_CreateBufferView to anv_gen8.cKristian Høgsberg Kristensen2015-08-244-76/+109
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Add new anv_gen8.c and move CreateDynamicRasterState thereKristian Høgsberg Kristensen2015-08-243-36/+75
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Implement multi-gen dispatch mechanismKristian Høgsberg Kristensen2015-08-242-9/+45
|
* vk/meta: Implement depth clearsChad Versace2015-08-201-22/+49
| | | | | Fixes Crucible test func.depthstencil.basic-depth.clear-1.0.op-greater.
* vk: Cache each render pass's number of clear opsChad Versace2015-08-203-15/+26
| | | | | | | | | | | | | During vkCreateRenderPass, count the number of clear ops and store them in new members of anv_render_pass: uint32_t num_color_clear_attachments bool has_depth_clear_attachment bool has_stencil_clear_attachment Cacheing these 8 bytes (including padding) reduces the number of times that anv_cmd_buffer_clear_attachments needs to loop over the pass's attachments.
* vk: Use temp var in vkCreateRenderPass's attachment loopChad Versace2015-08-201-7/+8
| | | | | Store the attachment in a temporary variable and s/pass->attachments[i]/att/ .
* vk: Improve memory locality of anv_render_passChad Versace2015-08-201-8/+7
| | | | | Allocate the pass's array of attachments, anv_render_pass::attachments, in the same allocation as the pass itself.
* vk: Unharcode an argument to sizeofChad Versace2015-08-201-1/+1
| | | | s/struct anv_subpass/pass->subpasses[0])/
* vk/meta: Add Z coord to clear verticesChad Versace2015-08-201-6/+6
| | | | | For now, the Z coordinate is always 0.0. Will later be used for depth clears.
* vk/meta: Restore all saved state in anv_cmd_buffer_restore()Chad Versace2015-08-201-4/+6
| | | | | anv_cmd_buffer_restore() did not restore the old VkDynamicColorBlendState.
* vk/meta: Use consistent names and types in anv_saved_stateChad Versace2015-08-201-4/+5
| | | | | | In struct anv_saved_state, each member's type was a pointer to an Anvil struct and each member's name was prefixed with "old" except cb_state, which was a Vulkan handle whose name lacked "old".
* Add mesa.icd to the .gitignoreNeil Roberts2015-08-191-0/+1
| | | | | | | | Since 4d7e0fa8c731776 this file is generated by the configure script. Reviewed-by: Tapani Palli <[email protected]> Reviewed-by: Ben Widawsky <[email protected]> (cherry picked from commit 885762e18291eb4dc0b449297c3a78f7c036bcde)
* vk/meta: Fix dest format of vkCmdCopyImageChad Versace2015-08-181-1/+2
| | | | | | The source image's format was incorrectly used for both the source view and destination view. For vkCmdCopyImage to correctly translate formats, the destination view's format must be that of the destination image's.
* vk: Assert that swap chain format is a color formatChad Versace2015-08-181-0/+2
|
* vk/image: Don't set anv_surface_view::offset twiceChad Versace2015-08-181-1/+0
| | | | | It was set twice a few lines apart, and the second setting always overrode the first.
* vk/meta: Use anv_format_is_color()Chad Versace2015-08-181-1/+1
| | | | | That is, replace !anv_format_is_depth_or_stencil() with anv_format_is_color(). That conveys the meaning better.
* vk: Add anv_format_is_color()Chad Versace2015-08-181-0/+6
|
* vk: Add anv_format reference to anv_render_pass_attachmentChad Versace2015-08-175-19/+15
| | | | | | | Change type of anv_render_pass_attachment::format from VkFormat to const struct anv_format*. This elimiates the repetitive lookups into the VkFormat -> anv_format table when looping over attachments during anv_cmd_buffer_clear_attachments().
* vk/image: Simplify stencil case for anv_image_create()Chad Versace2015-08-171-14/+12
| | | | | | Stop creating a temporary VkImageCreateInfo with overriden format=VK_FORMAT_S8_UINT. Instead, just pass the format override directly to anv_image_make_surface().
* vk/formats: Add global pointer to anv_format for S8_UINTChad Versace2015-08-172-0/+10
| | | | | | | Stencil formats are often a special case. To reduce the number of lookups into the VkFormat-to-anv_format translation table when working with stencil, expose the table's entry for VK_FORMAT_S8_UINT as global variable anv_format_s8_uint.
* vk: Add anv_format reference t anv_surface_viewChad Versace2015-08-175-19/+10
| | | | | | Change type of anv_surface_view::format from VkFormat to const struct anv_format*. This reduces the number of lookups in the VkFormat -> anv_format table.
* vk: Pass anv_format to anv_fill_buffer_surface_state()Chad Versace2015-08-173-8/+8
| | | | | | | This moves the translation of VkFormat to anv_format from anv_fill_buffer_surface_state() to its caller. A prep commit to reduce more VkFormat -> anv_format translations.
* vk: Add anv_format reference to anv_imageChad Versace2015-08-173-29/+22
| | | | | | Change type of anv_image::format from VkFormat to const struct anv_format*. This reduces the number of lookups in the VkFormat -> anv_format table.
* vk: Store the original VkFormat in anv_formatChad Versace2015-08-172-1/+2
| | | | | | Store the original VkFormat as anv_format::vk_format. This will be used to reduce format indirection, such as lookups into the VkFormat -> anv_format translation table.
* vk: Update .gitignore for the autogenerated spirv changesJason Ekstrand2015-08-171-1/+1
|
* vk: Drop aub dumper and PCI ID override featureKristian Høgsberg Kristensen2015-08-174-377/+19
| | | | | | These are now available in intel_aubdump from intel-gpu-tools. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Use anv_image_create() for creating dmabuf VkImageKristian Høgsberg Kristensen2015-08-174-14/+30
| | | | | | | We need to make sure we use the VkImage infrastructure for creating dmabuf images. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>