&ctx->gfx_pipeline_state,
dinfo->mode);
+ enum pipe_prim_type reduced_prim = u_reduced_prim(dinfo->mode);
+
bool depth_bias = false;
- switch (u_reduced_prim(dinfo->mode)) {
+ switch (reduced_prim) {
case PIPE_PRIM_POINTS:
depth_bias = rast_state->offset_point;
break;
vkCmdSetScissor(batch->cmdbuf, 0, 1, &fb_scissor);
}
+ if (reduced_prim == PIPE_PRIM_LINES) {
+ if (screen->feats.wideLines || ctx->line_width == 1.0f)
+ vkCmdSetLineWidth(batch->cmdbuf, ctx->line_width);
+ else
+ debug_printf("BUG: wide lines not supported, needs fallback!");
+ }
+
vkCmdSetStencilReference(batch->cmdbuf, VK_STENCIL_FACE_FRONT_BIT, ctx->stencil_ref.ref_value[0]);
vkCmdSetStencilReference(batch->cmdbuf, VK_STENCIL_FACE_BACK_BIT, ctx->stencil_ref.ref_value[1]);
rast_state.depthBiasConstantFactor = 0.0;
rast_state.depthBiasClamp = 0.0;
rast_state.depthBiasSlopeFactor = 0.0;
- if (screen->feats.wideLines)
- rast_state.lineWidth = state->line_width;
- else {
- debug_printf("BUG: wide lines not supported, needs fallback!");
- rast_state.lineWidth = 1.0f;
- }
+ rast_state.lineWidth = 1.0f;
VkPipelineDepthStencilStateCreateInfo depth_stencil_state = {};
depth_stencil_state.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO;
depth_stencil_state.depthWriteEnable = state->depth_stencil_alpha_state->depth_write;
VkDynamicState dynamicStateEnables[] = {
- VK_DYNAMIC_STATE_DEPTH_BIAS,
- VK_DYNAMIC_STATE_SCISSOR,
- VK_DYNAMIC_STATE_STENCIL_REFERENCE,
VK_DYNAMIC_STATE_VIEWPORT,
+ VK_DYNAMIC_STATE_SCISSOR,
+ VK_DYNAMIC_STATE_LINE_WIDTH,
+ VK_DYNAMIC_STATE_DEPTH_BIAS,
VK_DYNAMIC_STATE_BLEND_CONSTANTS,
+ VK_DYNAMIC_STATE_STENCIL_REFERENCE,
};
VkPipelineDynamicStateCreateInfo pipelineDynamicStateCreateInfo = {};