radv: New shader args for NGG culling settings and viewport.
Add new shader arguments in RADV for: - NGG culling settings - Viewport transform These will be used by NGG culling shaders. Additionally, some tweaks are made to some config registers in order to make culling shaders more efficient. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10525>
This commit is contained in:
@@ -1790,6 +1790,10 @@ radv_pipeline_init_raster_state(struct radv_pipeline *pipeline,
|
||||
S_028810_ZCLIP_FAR_DISABLE(depth_clip_disable ? 1 : 0) |
|
||||
S_028810_DX_RASTERIZATION_KILL(raster_info->rasterizerDiscardEnable ? 1 : 0) |
|
||||
S_028810_DX_LINEAR_ATTR_CLIP_ENA(1);
|
||||
|
||||
pipeline->graphics.uses_conservative_overestimate =
|
||||
radv_get_conservative_raster_mode(pCreateInfo->pRasterizationState) ==
|
||||
VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -5441,6 +5445,9 @@ radv_pipeline_init(struct radv_pipeline *pipeline, struct radv_device *device,
|
||||
pipeline->streamout_shader = radv_pipeline_get_streamout_shader(pipeline);
|
||||
|
||||
pipeline->graphics.is_ngg = radv_pipeline_has_ngg(pipeline);
|
||||
pipeline->graphics.has_ngg_culling =
|
||||
pipeline->graphics.is_ngg &&
|
||||
pipeline->shaders[pipeline->graphics.last_vgt_api_stage]->info.has_ngg_culling;
|
||||
|
||||
radv_pipeline_generate_pm4(pipeline, pCreateInfo, extra, &blend);
|
||||
|
||||
|
Reference in New Issue
Block a user