2016-03-08 16:49:06 -08:00
|
|
|
/*
|
|
|
|
|
* Copyright © 2016 Intel Corporation
|
|
|
|
|
*
|
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
|
|
|
* to deal in the Software without restriction, including without limitation
|
|
|
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
|
|
|
*
|
|
|
|
|
* The above copyright notice and this permission notice (including the next
|
|
|
|
|
* paragraph) shall be included in all copies or substantial portions of the
|
|
|
|
|
* Software.
|
|
|
|
|
*
|
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
|
|
|
* IN THE SOFTWARE.
|
|
|
|
|
*/
|
|
|
|
|
|
2016-10-11 18:26:24 +01:00
|
|
|
/*
|
|
|
|
|
* NOTE: The header can be included multiple times, from the same file.
|
|
|
|
|
*/
|
|
|
|
|
|
2016-03-08 16:49:06 -08:00
|
|
|
/*
|
|
|
|
|
* Gen-specific function declarations. This header must *not* be included
|
2016-10-11 18:26:25 +01:00
|
|
|
* directly. Instead, it is included multiple times by anv_private.h.
|
2020-08-11 00:30:10 +03:00
|
|
|
*
|
2016-03-08 16:49:06 -08:00
|
|
|
* In this header file, the usual genx() macro is available.
|
|
|
|
|
*/
|
|
|
|
|
|
2016-10-11 18:26:25 +01:00
|
|
|
#ifndef ANV_PRIVATE_H
|
|
|
|
|
#error This file is included by means other than anv_private.h
|
|
|
|
|
#endif
|
|
|
|
|
|
2021-04-19 15:50:14 -07:00
|
|
|
extern const uint32_t genX(vk_to_intel_cullmode)[];
|
2020-08-11 00:30:10 +03:00
|
|
|
|
2021-04-19 15:50:14 -07:00
|
|
|
extern const uint32_t genX(vk_to_intel_front_face)[];
|
2020-08-11 00:30:10 +03:00
|
|
|
|
2021-04-19 15:50:14 -07:00
|
|
|
extern const uint32_t genX(vk_to_intel_primitive_type)[];
|
2020-08-11 00:30:10 +03:00
|
|
|
|
2021-04-19 15:50:14 -07:00
|
|
|
extern const uint32_t genX(vk_to_intel_compare_op)[];
|
2020-08-11 00:30:10 +03:00
|
|
|
|
2021-04-19 15:50:14 -07:00
|
|
|
extern const uint32_t genX(vk_to_intel_stencil_op)[];
|
2020-08-11 00:30:10 +03:00
|
|
|
|
2021-05-03 11:11:24 +03:00
|
|
|
extern const uint32_t genX(vk_to_intel_logic_op)[];
|
|
|
|
|
|
2021-02-27 15:09:56 -08:00
|
|
|
void genX(init_physical_device_state)(struct anv_physical_device *device);
|
|
|
|
|
|
2016-03-08 16:49:06 -08:00
|
|
|
VkResult genX(init_device_state)(struct anv_device *device);
|
|
|
|
|
|
|
|
|
|
void genX(cmd_buffer_emit_state_base_address)(struct anv_cmd_buffer *cmd_buffer);
|
|
|
|
|
|
2016-05-20 11:49:12 -07:00
|
|
|
void genX(cmd_buffer_apply_pipe_flushes)(struct anv_cmd_buffer *cmd_buffer);
|
|
|
|
|
|
2021-03-29 15:40:04 -07:00
|
|
|
void genX(cmd_buffer_emit_gfx7_depth_flush)(struct anv_cmd_buffer *cmd_buffer);
|
2016-11-19 14:05:06 -08:00
|
|
|
|
2021-03-29 15:40:04 -07:00
|
|
|
void genX(cmd_buffer_set_binding_for_gfx8_vb_flush)(struct anv_cmd_buffer *cmd_buffer,
|
2019-11-25 21:55:51 -06:00
|
|
|
int vb_index,
|
|
|
|
|
struct anv_address vb_address,
|
|
|
|
|
uint32_t vb_size);
|
2021-03-29 15:40:04 -07:00
|
|
|
void genX(cmd_buffer_update_dirty_vbs_for_gfx8_vb_flush)(struct anv_cmd_buffer *cmd_buffer,
|
2019-11-25 21:55:51 -06:00
|
|
|
uint32_t access_type,
|
|
|
|
|
uint64_t vb_used);
|
|
|
|
|
|
2019-07-17 18:41:38 -07:00
|
|
|
void genX(cmd_buffer_emit_hashing_mode)(struct anv_cmd_buffer *cmd_buffer,
|
|
|
|
|
unsigned width, unsigned height,
|
|
|
|
|
unsigned scale);
|
|
|
|
|
|
2016-03-08 16:49:06 -08:00
|
|
|
void genX(flush_pipeline_select_3d)(struct anv_cmd_buffer *cmd_buffer);
|
2016-03-10 17:16:58 -08:00
|
|
|
void genX(flush_pipeline_select_gpgpu)(struct anv_cmd_buffer *cmd_buffer);
|
2016-03-08 16:49:06 -08:00
|
|
|
|
2021-03-09 16:58:59 +02:00
|
|
|
void genX(emit_l3_config)(struct anv_batch *batch,
|
|
|
|
|
const struct anv_device *device,
|
|
|
|
|
const struct intel_l3_config *cfg);
|
|
|
|
|
|
2016-03-08 17:10:05 -08:00
|
|
|
void genX(cmd_buffer_config_l3)(struct anv_cmd_buffer *cmd_buffer,
|
2021-03-03 13:49:18 -08:00
|
|
|
const struct intel_l3_config *cfg);
|
2016-03-08 17:10:05 -08:00
|
|
|
|
2016-03-08 16:49:06 -08:00
|
|
|
void genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer);
|
2016-03-08 16:54:07 -08:00
|
|
|
void genX(cmd_buffer_flush_dynamic_state)(struct anv_cmd_buffer *cmd_buffer);
|
2016-03-08 16:49:06 -08:00
|
|
|
|
|
|
|
|
void genX(cmd_buffer_flush_compute_state)(struct anv_cmd_buffer *cmd_buffer);
|
|
|
|
|
|
2016-12-06 17:52:14 -08:00
|
|
|
void genX(cmd_buffer_enable_pma_fix)(struct anv_cmd_buffer *cmd_buffer,
|
|
|
|
|
bool enable);
|
|
|
|
|
|
2017-11-27 08:35:12 -08:00
|
|
|
void genX(cmd_buffer_mark_image_written)(struct anv_cmd_buffer *cmd_buffer,
|
|
|
|
|
const struct anv_image *image,
|
|
|
|
|
VkImageAspectFlagBits aspect,
|
|
|
|
|
enum isl_aux_usage aux_usage,
|
|
|
|
|
uint32_t level,
|
|
|
|
|
uint32_t base_layer,
|
|
|
|
|
uint32_t layer_count);
|
|
|
|
|
|
2018-10-05 17:54:07 +03:00
|
|
|
void genX(cmd_emit_conditional_render_predicate)(struct anv_cmd_buffer *cmd_buffer);
|
|
|
|
|
|
2016-08-22 19:08:33 -07:00
|
|
|
void
|
|
|
|
|
genX(emit_urb_setup)(struct anv_device *device, struct anv_batch *batch,
|
2021-03-03 13:49:18 -08:00
|
|
|
const struct intel_l3_config *l3_config,
|
2016-08-22 19:08:33 -07:00
|
|
|
VkShaderStageFlags active_stages,
|
2020-01-17 14:14:03 -06:00
|
|
|
const unsigned entry_size[4],
|
2021-03-03 13:49:18 -08:00
|
|
|
enum intel_urb_deref_block_size *deref_block_size);
|
2016-08-22 19:08:33 -07:00
|
|
|
|
2019-03-14 18:20:12 -05:00
|
|
|
void genX(emit_multisample)(struct anv_batch *batch, uint32_t samples,
|
|
|
|
|
const VkSampleLocationEXT *locations);
|
2019-03-14 18:02:49 -05:00
|
|
|
|
2019-03-14 18:20:12 -05:00
|
|
|
void genX(emit_sample_pattern)(struct anv_batch *batch, uint32_t samples,
|
|
|
|
|
const VkSampleLocationEXT *locations);
|
2019-03-14 18:02:49 -05:00
|
|
|
|
2020-10-19 10:12:43 +03:00
|
|
|
void genX(emit_shading_rate)(struct anv_batch *batch,
|
|
|
|
|
const struct anv_graphics_pipeline *pipeline,
|
|
|
|
|
struct anv_state cps_states,
|
|
|
|
|
struct anv_dynamic_state *dynamic_state);
|
|
|
|
|
|
2017-05-11 09:37:33 -07:00
|
|
|
void genX(cmd_buffer_so_memcpy)(struct anv_cmd_buffer *cmd_buffer,
|
2018-09-10 16:43:34 -05:00
|
|
|
struct anv_address dst, struct anv_address src,
|
2017-05-11 09:37:33 -07:00
|
|
|
uint32_t size);
|
2016-09-26 12:10:11 -07:00
|
|
|
|
2016-08-22 21:37:28 -07:00
|
|
|
void genX(blorp_exec)(struct blorp_batch *batch,
|
|
|
|
|
const struct blorp_params *params);
|
2020-06-30 15:59:22 -07:00
|
|
|
|
|
|
|
|
void genX(cmd_emit_timestamp)(struct anv_batch *batch,
|
|
|
|
|
struct anv_bo *bo,
|
|
|
|
|
uint32_t offset);
|