mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
anv: move simple shaders code to its own object
We would like to call those function from anv_utrace.c Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24744>
This commit is contained in:
parent
7a35113455
commit
08e0c063cf
6 changed files with 34 additions and 12 deletions
|
|
@ -261,3 +261,18 @@ genX(cmd_buffer_begin_companion_rcs_syncpoint)(struct anv_cmd_buffer *cmd_buffer
|
|||
void
|
||||
genX(cmd_buffer_end_companion_rcs_syncpoint)(struct anv_cmd_buffer *cmd_buffer,
|
||||
struct anv_state syncpoint);
|
||||
|
||||
void
|
||||
genX(emit_simple_shader_init)(struct anv_simple_shader *state);
|
||||
|
||||
void
|
||||
genX(emit_simple_shader_dispatch)(struct anv_simple_shader *state,
|
||||
uint32_t num_threads,
|
||||
struct anv_state push_state);
|
||||
|
||||
struct anv_state
|
||||
genX(simple_shader_alloc_push)(struct anv_simple_shader *state, uint32_t size);
|
||||
|
||||
struct anv_address
|
||||
genX(simple_shader_push_state_address)(struct anv_simple_shader *state,
|
||||
struct anv_state push_state);
|
||||
|
|
|
|||
|
|
@ -5194,6 +5194,10 @@ struct anv_utrace_submit {
|
|||
struct anv_batch batch;
|
||||
struct anv_bo *batch_bo;
|
||||
|
||||
/* Stream for temporary allocations */
|
||||
struct anv_state_stream dynamic_state_stream;
|
||||
struct anv_state_stream general_state_stream;
|
||||
|
||||
/* Syncobj to be signaled when the batch completes */
|
||||
struct vk_sync *sync;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@
|
|||
|
||||
#include "anv_private.h"
|
||||
#include "anv_internal_kernels.h"
|
||||
#include "genX_simple_shader.h"
|
||||
|
||||
/* This is a maximum number of items a fragment shader can generate due to the
|
||||
* viewport size.
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@
|
|||
#include "ds/intel_tracepoints.h"
|
||||
|
||||
#include "anv_internal_kernels.h"
|
||||
#include "genX_simple_shader.h"
|
||||
|
||||
/* We reserve :
|
||||
* - GPR 14 for perf queries
|
||||
|
|
|
|||
|
|
@ -21,18 +21,17 @@
|
|||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef GENX_SIMPLE_SHADER_H
|
||||
#define GENX_SIMPLE_SHADER_H
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "util/macros.h"
|
||||
|
||||
#include "common/intel_genX_state.h"
|
||||
|
||||
#include "anv_private.h"
|
||||
|
||||
#include "genxml/gen_macros.h"
|
||||
#include "genxml/genX_pack.h"
|
||||
#include "common/intel_genX_state.h"
|
||||
|
||||
static void
|
||||
genX(emit_simpler_shader_init_fragment)(struct anv_simple_shader *state)
|
||||
{
|
||||
|
|
@ -363,7 +362,8 @@ genX(emit_simpler_shader_init_compute)(struct anv_simple_shader *state)
|
|||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
/** Initialize a simple shader emission */
|
||||
void
|
||||
genX(emit_simple_shader_init)(struct anv_simple_shader *state)
|
||||
{
|
||||
assert(state->kernel->stage == MESA_SHADER_FRAGMENT ||
|
||||
|
|
@ -375,7 +375,8 @@ genX(emit_simple_shader_init)(struct anv_simple_shader *state)
|
|||
genX(emit_simpler_shader_init_compute)(state);
|
||||
}
|
||||
|
||||
static struct anv_state
|
||||
/** Allocate push constant data for a simple shader */
|
||||
struct anv_state
|
||||
genX(simple_shader_alloc_push)(struct anv_simple_shader *state, uint32_t size)
|
||||
{
|
||||
if (state->kernel->stage == MESA_SHADER_FRAGMENT) {
|
||||
|
|
@ -390,7 +391,10 @@ genX(simple_shader_alloc_push)(struct anv_simple_shader *state, uint32_t size)
|
|||
}
|
||||
}
|
||||
|
||||
static struct anv_address
|
||||
/** Get the address of allocated push constant data by
|
||||
* genX(simple_shader_alloc_push)
|
||||
*/
|
||||
struct anv_address
|
||||
genX(simple_shader_push_state_address)(struct anv_simple_shader *state,
|
||||
struct anv_state push_state)
|
||||
{
|
||||
|
|
@ -408,7 +412,8 @@ genX(simple_shader_push_state_address)(struct anv_simple_shader *state,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
/** Emit a simple shader dispatch */
|
||||
void
|
||||
genX(emit_simple_shader_dispatch)(struct anv_simple_shader *state,
|
||||
uint32_t num_threads,
|
||||
struct anv_state push_state)
|
||||
|
|
@ -648,4 +653,3 @@ genX(emit_simple_shader_dispatch)(struct anv_simple_shader *state,
|
|||
}
|
||||
}
|
||||
|
||||
#endif /* GENX_SIMPLE_SHADER_H */
|
||||
|
|
@ -105,6 +105,7 @@ anv_per_hw_ver_files = files(
|
|||
'genX_init_state.c',
|
||||
'genX_pipeline.c',
|
||||
'genX_query.c',
|
||||
'genX_simple_shader.c',
|
||||
'genX_video.c',
|
||||
)
|
||||
if with_intel_vk_rt
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue