summaryrefslogtreecommitdiffstats
path: root/src/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* vk: Program stencil ops in 3DSTATE_WM_DEPTH_STENCILChad Versace2015-08-282-16/+16
| | | | | The driver ignored the Vulkan stencil, always programming the hardware stencil op to 0 (STENCILOP_KEEP).
* vk/image: Don't abort when creating stencil image viewsChad Versace2015-08-281-1/+0
| | | | | When creating a stencil image view, log a FINISHME but don't abort. We're sooooo close to having this working.
* vk/meta: Save/restore VkDynamicDepthStencilStateChad Versace2015-08-281-0/+7
|
* vk/meta: Don't skip clearing when clearing only depth attachmentChad Versace2015-08-281-1/+2
| | | | | | anv_cmd_buffer_clear_attachments() skipped the clear renderpass if no color attachments needed to be cleared, even if a depth attachment needed to be cleared.
* vk: Add func anv_cmd_buffer_get_depth_stencil_view()Chad Versace2015-08-284-20/+26
| | | | | This function removes some duplicated code from genN_cmd_buffer_emit_depth_stencil().
* vk: Declare some local variables as constChad Versace2015-08-282-4/+4
| | | | | In anv_cmd_buffer_emit_depth_stencil(), declare 'subpass' and 'fb' as const.
* vk: Don't duplicate anv_depth_stencil_view's surface dataChad Versace2015-08-284-44/+28
| | | | | | | | | | | | | | | | | In anv_depth_stencil_view, replace the members bo depth_offset depth_stride depth_format depth_qpitch stencil_offset stencil_stride stencil_qpitch with the single member const struct anv_image *image The removed members duplicated data in anv_image::depth_surface and anv_image::stencil_surface.
* vk/gen7: Add func gen7_cmd_buffer_emit_depth_stencil()Chad Versace2015-08-281-7/+13
| | | | | | This patch moves all the GEN7_3DSTATE_DEPTH_BUFFER code from gen7_cmd_buffer_begin_subpass() into a new function gen7_cmd_buffer_emit_depth_stencil().
* vk: Fix format of anv_depth_stencil_viewChad Versace2015-08-284-36/+67
| | | | | | The format of the view itself and of the view's image may differ. Moreover, if the view's format has no depth aspect but the image's format does, we must not program the depth buffer. Ditto for stencil.
* vk/gen7: Fix gen of emitted packet in gen7_batch_lri()Chad Versace2015-08-281-1/+1
| | | | Emit GEN7_MI_LOAD_REGISTER_IMM, not the GEN8 version.
* vk: Remove dummy anv_depth_stencil_viewChad Versace2015-08-282-55/+99
|
* vk/image: Let anv_image have one anv_surface per aspectChad Versace2015-08-285-61/+94
| | | | | Split anv_image::primary_surface into two: anv_image::color_surface and depth_surface.
* vk/gen8: Add support for push constantsJason Ekstrand2015-08-273-0/+70
|
* vk/private.h: Handle a NULL bo but valid offset in __gen_combine_addressJason Ekstrand2015-08-271-1/+1
|
* vk/cmd_buffer: Set the CONSTANTS_REL_GENERAL flag on execbufJason Ekstrand2015-08-271-1/+2
| | | | | This tells the kernel that the push constant buffers are relative to the dynamic state base address.
* vk/compiler: Add a helper for setting up prog_data->paramJason Ekstrand2015-08-271-62/+51
| | | | This new helper sets it up the way we'll want for handling push constants.
* vk: Add initial API support for setting push constantsJason Ekstrand2015-08-263-2/+34
| | | | | This doesn't add support for actually uploading them, it just ensures that we have and update the shadow copy.
* vk/meta: Destroy vertex shaders when setting up clearingJason Ekstrand2015-08-251-0/+2
|
* vk/gen8: Don't duplicate generic pipeline setupJason Ekstrand2015-08-252-33/+2
| | | | | | 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.
* Merge remote-tracking branch 'mesa-public/master' into vulkanJason Ekstrand2015-08-251-1/+1
|
* vk: Use true/false for RenderCacheReadWriteModeKristian Høgsberg Kristensen2015-08-251-1/+1
| | | | | | | This field in surface state is a bool, WriteOnlyCache is an enum from GEN8. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk/gen7: Enable L3 caching for GEN7 MOCSKristian Høgsberg Kristensen2015-08-251-1/+1
| | | | | | Do what GL does here. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk/gen7: Use TILEWALK_XMAJOR for linear surfacesKristian Høgsberg Kristensen2015-08-251-2/+12
| | | | | | | You wouldn't think the TileWalk mode matters when TiledSurface is false. However, it has to be TILEWALK_XMAJOR. Make it so. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Add gen7 supportKristian Høgsberg Kristensen2015-08-2411-33/+1798
| | | | | | | With all the previous commits in place, we can now drop in support for multiple platforms. First up is gen7 (Ivybridge). Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* 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
|