tu_cs_emit_write_reg(cs, REG_A6XX_VPC_UNKNOWN_9210, 0);
tu_cs_emit_write_reg(cs, REG_A6XX_VPC_UNKNOWN_9211, 0);
tu_cs_emit_write_reg(cs, REG_A6XX_VPC_UNKNOWN_9602, 0);
- tu_cs_emit_write_reg(cs, REG_A6XX_PC_POLYGON_MODE, POLYMODE6_TRIANGLES);
tu_cs_emit_write_reg(cs, REG_A6XX_PC_UNKNOWN_9E72, 0);
- tu_cs_emit_write_reg(cs, REG_A6XX_VPC_POLYGON_MODE, POLYMODE6_TRIANGLES);
tu_cs_emit_write_reg(cs, REG_A6XX_SP_TP_UNKNOWN_B309, 0x000000a2);
tu_cs_emit_write_reg(cs, REG_A6XX_HLSQ_CONTROL_5_REG, 0xfc);
.drawIndirectFirstInstance = true,
.depthClamp = true,
.depthBiasClamp = false,
- .fillModeNonSolid = false,
+ .fillModeNonSolid = true,
.depthBounds = true,
.wideLines = false,
.largePoints = false,
const VkPipelineRasterizationStateCreateInfo *rast_info =
builder->create_info->pRasterizationState;
- assert(rast_info->polygonMode == VK_POLYGON_MODE_FILL);
+ enum a6xx_polygon_mode mode = tu6_polygon_mode(rast_info->polygonMode);
struct tu_cs cs;
- tu_cs_begin_sub_stream(&pipeline->cs, 7, &cs);
+ tu_cs_begin_sub_stream(&pipeline->cs, 11, &cs);
tu_cs_emit_regs(&cs,
A6XX_GRAS_CL_CNTL(
.unk5 = rast_info->depthClampEnable,
.zero_gb_scale_z = 1,
.vp_clip_code_ignore = 1));
+
+ tu_cs_emit_regs(&cs,
+ A6XX_VPC_POLYGON_MODE(.mode = mode));
+
+ tu_cs_emit_regs(&cs,
+ A6XX_PC_POLYGON_MODE(.mode = mode));
+
/* move to hw ctx init? */
tu_cs_emit_regs(&cs, A6XX_GRAS_UNKNOWN_8001());
tu_cs_emit_regs(&cs,
}
}
+static inline enum a6xx_polygon_mode
+tu6_polygon_mode(VkPolygonMode mode)
+{
+ switch (mode) {
+ case VK_POLYGON_MODE_POINT:
+ return POLYMODE6_POINTS;
+ case VK_POLYGON_MODE_LINE:
+ return POLYMODE6_LINES;
+ case VK_POLYGON_MODE_FILL:
+ return POLYMODE6_TRIANGLES;
+ default:
+ unreachable("bad polygon mode");
+ }
+}
+
#endif /* TU_UTIL_H */