mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 17:20:10 +01:00
pvr, pco: switch to clc nop shader
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37439>
This commit is contained in:
parent
98814d343d
commit
fd130c5d8b
3 changed files with 6 additions and 34 deletions
|
|
@ -42,6 +42,7 @@
|
|||
#include "git_sha1.h"
|
||||
#include "hwdef/rogue_hw_utils.h"
|
||||
#include "pco/pco.h"
|
||||
#include "pco/pco_data.h"
|
||||
#include "pco_uscgen_programs.h"
|
||||
#include "pvr_bo.h"
|
||||
#include "pvr_border.h"
|
||||
|
|
@ -1821,29 +1822,24 @@ static VkResult pvr_device_init_nop_program(struct pvr_device *device)
|
|||
const uint32_t cache_line_size =
|
||||
rogue_get_slc_cache_line_size(&device->pdevice->dev_info);
|
||||
struct pvr_pds_kickusc_program program = { 0 };
|
||||
pco_shader *nop;
|
||||
const pco_precomp_data *precomp_data;
|
||||
uint32_t staging_buffer_size;
|
||||
uint32_t *staging_buffer;
|
||||
unsigned usc_temp_count;
|
||||
VkResult result;
|
||||
|
||||
nop = pvr_usc_nop(device->pdevice->pco_ctx, MESA_SHADER_FRAGMENT);
|
||||
usc_temp_count = pco_shader_data(nop)->common.temps;
|
||||
assert(!usc_temp_count);
|
||||
|
||||
precomp_data = (pco_precomp_data *)pco_usclib_common[FS_NOP_COMMON];
|
||||
result = pvr_gpu_upload_usc(device,
|
||||
pco_shader_binary_data(nop),
|
||||
pco_shader_binary_size(nop),
|
||||
precomp_data->binary,
|
||||
precomp_data->size_dwords * sizeof(uint32_t),
|
||||
cache_line_size,
|
||||
&device->nop_program.usc);
|
||||
ralloc_free(nop);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
||||
/* Setup a PDS program that kicks the static USC program. */
|
||||
pvr_pds_setup_doutu(&program.usc_task_control,
|
||||
device->nop_program.usc->dev_addr.addr,
|
||||
usc_temp_count,
|
||||
precomp_data->temps,
|
||||
ROGUE_PDSINST_DOUTU_SAMPLE_RATE_INSTANCE,
|
||||
false);
|
||||
|
||||
|
|
|
|||
|
|
@ -48,27 +48,6 @@ static pco_shader *build_shader(pco_ctx *ctx, nir_shader *nir, pco_data *data)
|
|||
return shader;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a nop (empty) shader.
|
||||
*
|
||||
* \param ctx PCO context.
|
||||
* \param stage Shader stage.
|
||||
+ * \return The nop shader.
|
||||
*/
|
||||
pco_shader *pvr_usc_nop(pco_ctx *ctx, mesa_shader_stage stage)
|
||||
{
|
||||
nir_builder b =
|
||||
nir_builder_init_simple_shader(stage,
|
||||
pco_nir_options(),
|
||||
"nop (%s)",
|
||||
_mesa_shader_stage_to_string(stage));
|
||||
|
||||
/* Just return. */
|
||||
nir_jump(&b, nir_jump_return);
|
||||
|
||||
return build_shader(ctx, b.shader, &(pco_data){ 0 });
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate an end-of-tile shader.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -18,9 +18,6 @@
|
|||
#include "pvr_private.h"
|
||||
#include "usc/pvr_uscgen.h"
|
||||
|
||||
/* NOP shader generation. */
|
||||
pco_shader *pvr_usc_nop(pco_ctx *ctx, mesa_shader_stage stage);
|
||||
|
||||
/* EOT shader generation. */
|
||||
struct pvr_eot_props {
|
||||
unsigned emit_count;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue