v3dv: SetRasterizerDiscardEnable is dynamic now
Note that when it is dynamic, it goes to the codepath of having enabled raster_enabled at the pipeline, even if at the end it will be disabled. The fragment shader compilation, and the stage keys, depends on rasterization being enabled or not. As mentioned, if the state is dynamic, it assumes that the rasterization is enabled. That would work, as then the rasterization could be discarded at the CFG_BITS package, by the command buffer at draw time. We just have a (discarded) shader slightly more complex that it would have been with rasterization enabled. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28980>
This commit is contained in:
committed by
Marge Bot
parent
6b59e1d8e4
commit
8a2d7e3830
@@ -2010,7 +2010,7 @@ v3dX(cmd_buffer_emit_configuration_bits)(struct v3dv_cmd_buffer *cmd_buffer)
|
||||
cmd_buffer->state.z_updates_enable;
|
||||
#endif
|
||||
|
||||
if (pipeline->rasterization_enabled) {
|
||||
if (!dyn->rs.rasterizer_discard_enable) {
|
||||
assert(BITSET_TEST(dyn->set, MESA_VK_DYNAMIC_RS_CULL_MODE));
|
||||
assert(BITSET_TEST(dyn->set, MESA_VK_DYNAMIC_RS_FRONT_FACE));
|
||||
config.enable_forward_facing_primitive = !(dyn->rs.cull_mode & VK_CULL_MODE_FRONT_BIT);
|
||||
@@ -2037,6 +2037,7 @@ v3dX(cmd_buffer_emit_configuration_bits)(struct v3dv_cmd_buffer *cmd_buffer)
|
||||
BITSET_CLEAR(dyn->dirty, MESA_VK_DYNAMIC_DS_DEPTH_BOUNDS_TEST_ENABLE);
|
||||
BITSET_CLEAR(dyn->dirty, MESA_VK_DYNAMIC_DS_STENCIL_TEST_ENABLE);
|
||||
BITSET_CLEAR(dyn->dirty, MESA_VK_DYNAMIC_RS_DEPTH_BIAS_ENABLE);
|
||||
BITSET_CLEAR(dyn->dirty, MESA_VK_DYNAMIC_RS_RASTERIZER_DISCARD_ENABLE);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user