freedreno/a6xx: Move assert
The flags_regid is only present if gs is present (in which case, gs is the last_shader). If there is no gs, flags_regid is initialized to zero, not INVALID_REG (r63.x). But you have to scroll up several pages of a long fxn to see that. Move the assert to make things more clear. Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
This commit is contained in:
@@ -882,9 +882,6 @@ emit_vpc(fd_crb &crb, const struct program_builder *b)
|
||||
}
|
||||
}
|
||||
|
||||
/* if vertex_flags somehow gets optimized out, your gonna have a bad time: */
|
||||
assert(flags_regid != INVALID_REG);
|
||||
|
||||
switch (last_shader->type) {
|
||||
case MESA_SHADER_VERTEX:
|
||||
crb.add(A6XX_SP_VS_OUTPUT_CNTL(.out = linkage.cnt));
|
||||
@@ -925,6 +922,9 @@ emit_vpc(fd_crb &crb, const struct program_builder *b)
|
||||
));
|
||||
break;
|
||||
case MESA_SHADER_GEOMETRY:
|
||||
/* if vertex_flags somehow gets optimized out, your gonna have a bad time: */
|
||||
assert(flags_regid != INVALID_REG);
|
||||
|
||||
crb.add(A6XX_SP_GS_OUTPUT_CNTL(.out = linkage.cnt, .flags_regid = flags_regid));
|
||||
crb.add(VPC_GS_SIV_CNTL(CHIP,
|
||||
.layerloc = layer_loc,
|
||||
|
||||
Reference in New Issue
Block a user