mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-29 11:40:31 +01:00
zink: only warn about fillModeNonSolid when used
The Vulkan feature fillModeNonSolid is used to implement OpenGL API glPolygonMode(), which does not exist in OpenGL ES and the hardware support is missing in many mobile GPUs. The use of this Vulkan feature is only triggered when glPolygonMode() is really called, and among current gallium drivers at least lima and panfrost do not properly handle polygon modes either. Only warn about this feature being missing when it's really needed, instead of warning at screen initialization time. This will prevent the warning from being raised when running OpenGL ES on Zink. Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38897>
This commit is contained in:
parent
c625bb9f6c
commit
f8634fe5e6
2 changed files with 8 additions and 3 deletions
|
|
@ -2832,7 +2832,6 @@ check_base_requirements(struct zink_screen *screen)
|
|||
screen->info.have_EXT_scalar_block_layout = true;
|
||||
}
|
||||
if (!screen->info.feats.features.logicOp ||
|
||||
!screen->info.feats.features.fillModeNonSolid ||
|
||||
!screen->info.feats.features.shaderClipDistance ||
|
||||
!(screen->info.feats12.scalarBlockLayout ||
|
||||
screen->info.have_EXT_scalar_block_layout) ||
|
||||
|
|
@ -2846,7 +2845,6 @@ check_base_requirements(struct zink_screen *screen)
|
|||
if (!screen->info.X) \
|
||||
fprintf(stderr, "%s ", #X)
|
||||
CHECK_OR_PRINT(feats.features.logicOp);
|
||||
CHECK_OR_PRINT(feats.features.fillModeNonSolid);
|
||||
CHECK_OR_PRINT(feats.features.shaderClipDistance);
|
||||
if (!screen->info.feats12.scalarBlockLayout && !screen->info.have_EXT_scalar_block_layout)
|
||||
fprintf(stderr, "scalarBlockLayout OR EXT_scalar_block_layout ");
|
||||
|
|
|
|||
|
|
@ -558,7 +558,14 @@ zink_create_rasterizer_state(struct pipe_context *pctx,
|
|||
state->hw_state.polygon_mode = VK_POLYGON_MODE_FILL;
|
||||
state->cull_mode = VK_CULL_MODE_NONE;
|
||||
} else {
|
||||
state->hw_state.polygon_mode = rs_state->fill_front; // same values
|
||||
if (rs_state->fill_front != PIPE_POLYGON_MODE_FILL &&
|
||||
!screen->info.feats.features.fillModeNonSolid) {
|
||||
static bool warned = false;
|
||||
warn_missing_feature(warned, "fillModeNonSolid");
|
||||
state->hw_state.polygon_mode = VK_POLYGON_MODE_FILL;
|
||||
} else {
|
||||
state->hw_state.polygon_mode = rs_state->fill_front; // same values
|
||||
}
|
||||
state->cull_mode = rs_state->cull_face; // same bits
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue