mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 17:50:12 +01:00
radv: determine as_ls/as_es in radv_link_shaders_info()
This is a link shader info step somehow. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18278>
This commit is contained in:
parent
4d756d8ae3
commit
72a8319471
2 changed files with 12 additions and 13 deletions
|
|
@ -2802,17 +2802,6 @@ radv_fill_shader_info(struct radv_pipeline *pipeline,
|
||||||
{
|
{
|
||||||
struct radv_device *device = pipeline->device;
|
struct radv_device *device = pipeline->device;
|
||||||
|
|
||||||
if (stages[MESA_SHADER_TESS_CTRL].nir) {
|
|
||||||
stages[MESA_SHADER_VERTEX].info.vs.as_ls = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stages[MESA_SHADER_GEOMETRY].nir) {
|
|
||||||
if (stages[MESA_SHADER_TESS_CTRL].nir)
|
|
||||||
stages[MESA_SHADER_TESS_EVAL].info.tes.as_es = true;
|
|
||||||
else
|
|
||||||
stages[MESA_SHADER_VERTEX].info.vs.as_es = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < MESA_VULKAN_SHADER_STAGES; i++) {
|
for (int i = 0; i < MESA_VULKAN_SHADER_STAGES; i++) {
|
||||||
if (!stages[i].nir)
|
if (!stages[i].nir)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -1268,9 +1268,17 @@ radv_link_shaders_info(struct radv_device *device,
|
||||||
|
|
||||||
if (producer->stage == MESA_SHADER_VERTEX || producer->stage == MESA_SHADER_TESS_EVAL) {
|
if (producer->stage == MESA_SHADER_VERTEX || producer->stage == MESA_SHADER_TESS_EVAL) {
|
||||||
if (consumer->stage == MESA_SHADER_GEOMETRY) {
|
if (consumer->stage == MESA_SHADER_GEOMETRY) {
|
||||||
|
uint32_t num_outputs_written;
|
||||||
|
|
||||||
|
if (producer->stage == MESA_SHADER_TESS_EVAL) {
|
||||||
|
num_outputs_written = producer->info.tes.num_linked_outputs;
|
||||||
|
producer->info.tes.as_es = true;
|
||||||
|
} else {
|
||||||
|
num_outputs_written = producer->info.vs.num_linked_outputs;
|
||||||
|
producer->info.vs.as_es = true;
|
||||||
|
}
|
||||||
|
|
||||||
/* Compute the ESGS item size for VS or TES as ES. */
|
/* Compute the ESGS item size for VS or TES as ES. */
|
||||||
uint32_t num_outputs_written = producer->stage == MESA_SHADER_TESS_EVAL
|
|
||||||
? producer->info.tes.num_linked_outputs : producer->info.vs.num_linked_outputs;
|
|
||||||
producer->info.esgs_itemsize = num_outputs_written * 16;
|
producer->info.esgs_itemsize = num_outputs_written * 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1294,6 +1302,8 @@ radv_link_shaders_info(struct radv_device *device,
|
||||||
struct radv_pipeline_stage *vs_stage = producer;
|
struct radv_pipeline_stage *vs_stage = producer;
|
||||||
struct radv_pipeline_stage *tcs_stage = consumer;
|
struct radv_pipeline_stage *tcs_stage = consumer;
|
||||||
|
|
||||||
|
vs_stage->info.vs.as_ls = true;
|
||||||
|
|
||||||
vs_stage->info.workgroup_size =
|
vs_stage->info.workgroup_size =
|
||||||
ac_compute_lshs_workgroup_size(device->physical_device->rad_info.gfx_level,
|
ac_compute_lshs_workgroup_size(device->physical_device->rad_info.gfx_level,
|
||||||
MESA_SHADER_VERTEX, tcs_stage->info.num_tess_patches,
|
MESA_SHADER_VERTEX, tcs_stage->info.num_tess_patches,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue