aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_private.h
Commit message (Collapse)AuthorAgeFilesLines
* radv: store the dynamic state mask into radv_dynamic_stateSamuel Pitoiset2017-10-261-1/+6
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Add single pipeline cache key.Bas Nieuwenhuizen2017-10-261-2/+11
| | | | | | | To decouple the key used for info gathering and the cache from whatever we pass to the compiler. Reviewed-by: Timothy Arceri <[email protected]>
* radv: only emit dfsm packets if dfsm is allowed.Dave Airlie2017-10-241-0/+1
| | | | | | | | | radeonsi only emits these when dfsm is enabled, so for now just hinge them on a flag we never set. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: factor out radv_alloc_memoryAndres Rodriguez2017-10-211-0/+11
| | | | | | | | | This allows us to pass extra parameters to the memory allocation operation that are not defined in the vulkan spec. This is useful for internal usage. Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Implement VK_EXT_global_priorityAndres Rodriguez2017-10-211-0/+1
| | | | | | | | | This extension allows the caller to change a queue's system wide priority. This is useful for applications with specific latency constraints. Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: rename RADV_CMD_DIRTY_RENDER_TARGETS to RADV_CMD_DIRTY_FRAMEBUFFERSamuel Pitoiset2017-10-201-1/+1
| | | | | | | To be consistent with the emit function name. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: calculate and emit GFX9 GS registers to pipeline state.Bas Nieuwenhuizen2017-10-201-0/+8
| | | | Reviewed-by: Dave Airlie <[email protected]>
* radv: Use control shader presence for detecting tess.Bas Nieuwenhuizen2017-10-201-1/+1
| | | | Reviewed-by: Dave Airlie <[email protected]>
* radv: drop unused r600_htile_info.Dave Airlie2017-10-201-9/+0
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Remove remaining hard coded references to VS.Bas Nieuwenhuizen2017-10-191-0/+2
| | | | Reviewed-by: Dave Airlie <[email protected]>
* radv: reuse the multiple shader store & load functions for gs copy variantTimothy Arceri2017-10-181-11/+1
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: remove some now unused shader compile codeTimothy Arceri2017-10-181-8/+0
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add radv_hash_shaders() helperBas Nieuwenhuizen2017-10-181-0/+7
| | | | | | | | This will be used to create a hash of the combined shaders in the pipeline. Signed-off-by: Timothy Arceri <[email protected]> Acked-by: Dave Airlie <[email protected]>
* radv: Add multiple shader cache store & load functions.Bas Nieuwenhuizen2017-10-181-0/+14
| | | | | Signed-off-by: Timothy Arceri <[email protected]> Acked-by: Dave Airlie <[email protected]>
* radv/image: bump all the offset to uint64_t.Dave Airlie2017-10-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | So one of the CTS tests tries to allocate a 16384x1 2048 array texture. This overflows a bunch of calculations when we want it tiled as the heights goes to 128. addrlib returns us the correct size (16GB or so), but we mangle it in the htile calcs due to the 32-bit offset fields, then userspace gives us the reduced number and we try to allocate it on a heap and things blow up. We really need to give the app back the correct size for the image so we can blow up properly in memory allocation later. This should fix hangs in dEQP-VK.pipeline.render_to_image.core.1d_array.huge.width_layers.r8g8b8a8_unorm_d32_sfloat_s8_uint since Fixes: ad3d98da9f (radv: enable tc compatible htile for d32s8 also.) Now there's an open question if we should be enabling tc-compat htile at all for shallow textures like the above. This might cause some other wierd side effects in CTS even without the tc compat so: Cc: "17.2" <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: port to using updated anv entrypoint/extension generator.Dave Airlie2017-10-171-6/+5
| | | | | | | | | | This ports radv to using the anv entrypoint/extension generator code. No differences on enabled extensions list in vulkaninfo. Acked-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: take unsafe_math and sisched into account when hashing shaders.Dave Airlie2017-10-121-1/+4
| | | | | | | | | We want to generate different variants for sisched and unsafe_math shader variants, so add them to the hash key. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add has_clear_state and enable it on CIK+ onlySamuel Pitoiset2017-10-121-1/+1
| | | | | | | | This will allow us to emit the CLEAR_STATE packet instead of a bunch of useless packets when doing CS initialization. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: create on-disk shader cacheTimothy Arceri2017-10-121-0/+6
| | | | | | | This is the drivers on-disk cache intended to be used as a fallback as opposed to the pipeline cache provided by apps. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: remove duplicate debug_flags fieldTimothy Arceri2017-10-121-1/+0
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: configure VGT_VERTEX_REUSE at pipeline creationSamuel Pitoiset2017-10-091-0/+1
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: remove unused fields in radv_raster_stateSamuel Pitoiset2017-10-091-3/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add radv_htile_enabled() helperSamuel Pitoiset2017-10-061-0/+6
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Implement TC compatible HTILE.Bas Nieuwenhuizen2017-10-041-0/+1
| | | | | | | The situations where we enable it are quite limitied, but it works, even for madmax, so lets just enable it. Reviewed-by: Dave Airlie <[email protected]>
* radv: make radv_dynamic_state_copy() staticSamuel Pitoiset2017-10-021-4/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: remove unused radv_meta_state::btoi::render_pass handleSamuel Pitoiset2017-10-021-1/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add radv_vi_dcc_enabled() helperSamuel Pitoiset2017-10-021-0/+5
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: do not need to double zero-init the meta state structuresSamuel Pitoiset2017-10-021-2/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: use pipeline handles instead of objects for meta clear operationsSamuel Pitoiset2017-10-021-4/+4
| | | | | | | To be consistent with other meta operations. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: save/restore all viewports/scissors for meta operationsSamuel Pitoiset2017-09-251-8/+12
| | | | | | | | | | | | | | | | | | | | This is needed since we don't update the number of viewports/scissors when they are set dynamically (according to the spec). In the following scenario: * vkCmdSetViewport() * vkCmdClearColorImage() (or any other meta operations) The viewports/scissors weren't saved correctly because no pipeline was bound before, and thus the number of viewports/scissors were 0. This fixes a regression with: dEQP-VK.draw.negative_viewport_height.front_ccw_cull_back Fixes: 60878dd00c ("radv: do not update the number of viewports in vkCmdSetViewport()") Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* Revert "Revert "radv: fallback to an in-memory cache when no pipline cache ↵Bas Nieuwenhuizen2017-09-251-1/+2
| | | | | | | | | | | | | is provided"" I tested this 10 times with ./deqp-vk --deqp-case=dEQP-VK.texture.filtering.3d.formats.r4g4b4a4* and one full run of CTS, seems the issue is gone. Also reduces CTS runtime by 30% or so. Reviewed-by: Timothy Arceri <[email protected]>
* radv: make radv_pipeline_init() staticSamuel Pitoiset2017-09-251-7/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: make use of ATI_VENDOR_ID everywhereSamuel Pitoiset2017-09-251-0/+2
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Add code to check if two formats can share DCC metadata.Bas Nieuwenhuizen2017-09-161-0/+2
| | | | | | Ported from radeonsi. Reviewed-by: Dave Airlie <[email protected]>
* radv: dump the list of enabled options when a hang occuredSamuel Pitoiset2017-09-141-0/+7
| | | | | | | | Useful to know which debug/perftest options were enabled when a hang report is generated. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: remove useless 'cmd_buffer' param from radv_buffer_view_init()Samuel Pitoiset2017-09-131-2/+1
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: work out a base ia_multi_vgt_param.Dave Airlie2017-09-111-0/+1
| | | | | | | This just reduces the calculations a bit further. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: calculate non-draw related ia_multi_vgt_param bits in pipelineDave Airlie2017-09-111-0/+6
| | | | | | | | This moves a bunch of non-draw dependent calcs into the pipeline code, to reduce CPU overheads in the draw path. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: move calculating primgroup_size to pipeline.Dave Airlie2017-09-111-0/+1
| | | | | | | This moves this out of the draw paths. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: move shaders related code to radv_shader.cSamuel Pitoiset2017-09-081-42/+1
| | | | | | | | Reduce size of radv_pipeline.c and improve code isolation. More code can probably moved but it's a start. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add radv_vertex_elements_info data structureSamuel Pitoiset2017-09-081-5/+10
| | | | | | | In my opinion, this improves code readability. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: do not use a bitfield when dirtying the vertex buffersSamuel Pitoiset2017-09-071-1/+1
| | | | | | | | Useless to track which one has been updated because we re-upload all the vertex buffers in one shot. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: reduce radv_image struct size.Dave Airlie2017-09-071-3/+2
| | | | | | 1480->1472. Signed-off-by: Dave Airlie <[email protected]>
* radv: reduce radv_shader_variant struct size.Dave Airlie2017-09-071-1/+1
| | | | | | 544->536 Signed-off-by: Dave Airlie <[email protected]>
* radv: reduce radv_cmd_state struct size.Dave Airlie2017-09-071-2/+2
| | | | | | 1632->1624. Signed-off-by: Dave Airlie <[email protected]>
* radv: Put semaphore waits in preamble cs.Bas Nieuwenhuizen2017-09-041-2/+1
| | | | | | The separate flush cs gets in the way of batchchain. Reviewed-by: Dave Airlie <[email protected]>
* radv: report VM faults if detectedSamuel Pitoiset2017-09-011-0/+3
| | | | | | | It's fairly simple for now, but this might be quite useful. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: move RADV_TRACE_FILE functions to radv_debug.cSamuel Pitoiset2017-09-011-1/+0
| | | | | | | | | At the moment, debugging radv is not really easy because the driver doesn't report enough information when it hangs. This new file will be the main location for all debug tools. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: rename record_fail to record_result and use VkResultSamuel Pitoiset2017-08-281-1/+1
| | | | | | | | This will allow to propagate VK_ERROR_OUT_OF_HOST_MEMORY to vkEndCommandBuffer() when necessary. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Implement multiview draws.Bas Nieuwenhuizen2017-08-241-0/+1
| | | | | | | v2: - Use for_each_bit. - split emitting the draw packets out to separate functions. Reviewed-by: Dave Airlie <[email protected]>