mirror of https://github.com/xemu-project/xemu.git
nv2a/vk: Omit pipeline fragment shader when no color binding
This commit is contained in:
parent
dd3bb50f11
commit
fc803fe375
|
@ -746,6 +746,13 @@ static void create_pipeline(PGRAPHState *pg)
|
||||||
int num_active_shader_stages = 0;
|
int num_active_shader_stages = 0;
|
||||||
VkPipelineShaderStageCreateInfo shader_stages[3];
|
VkPipelineShaderStageCreateInfo shader_stages[3];
|
||||||
|
|
||||||
|
shader_stages[num_active_shader_stages++] =
|
||||||
|
(VkPipelineShaderStageCreateInfo){
|
||||||
|
.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
|
||||||
|
.stage = VK_SHADER_STAGE_VERTEX_BIT,
|
||||||
|
.module = r->shader_binding->vertex->module,
|
||||||
|
.pName = "main",
|
||||||
|
};
|
||||||
if (r->shader_binding->geometry) {
|
if (r->shader_binding->geometry) {
|
||||||
shader_stages[num_active_shader_stages++] =
|
shader_stages[num_active_shader_stages++] =
|
||||||
(VkPipelineShaderStageCreateInfo){
|
(VkPipelineShaderStageCreateInfo){
|
||||||
|
@ -755,20 +762,15 @@ static void create_pipeline(PGRAPHState *pg)
|
||||||
.pName = "main",
|
.pName = "main",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
shader_stages[num_active_shader_stages++] =
|
if (r->color_binding) {
|
||||||
(VkPipelineShaderStageCreateInfo){
|
shader_stages[num_active_shader_stages++] =
|
||||||
.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
|
(VkPipelineShaderStageCreateInfo){
|
||||||
.stage = VK_SHADER_STAGE_VERTEX_BIT,
|
.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
|
||||||
.module = r->shader_binding->vertex->module,
|
.stage = VK_SHADER_STAGE_FRAGMENT_BIT,
|
||||||
.pName = "main",
|
.module = r->shader_binding->fragment->module,
|
||||||
};
|
.pName = "main",
|
||||||
shader_stages[num_active_shader_stages++] =
|
};
|
||||||
(VkPipelineShaderStageCreateInfo){
|
}
|
||||||
.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
|
|
||||||
.stage = VK_SHADER_STAGE_FRAGMENT_BIT,
|
|
||||||
.module = r->shader_binding->fragment->module,
|
|
||||||
.pName = "main",
|
|
||||||
};
|
|
||||||
|
|
||||||
VkPipelineVertexInputStateCreateInfo vertex_input = {
|
VkPipelineVertexInputStateCreateInfo vertex_input = {
|
||||||
.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO,
|
.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO,
|
||||||
|
@ -792,7 +794,6 @@ static void create_pipeline(PGRAPHState *pg)
|
||||||
.scissorCount = 1,
|
.scissorCount = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void *rasterizer_next_struct = NULL;
|
void *rasterizer_next_struct = NULL;
|
||||||
|
|
||||||
VkPipelineRasterizationProvokingVertexStateCreateInfoEXT provoking_state;
|
VkPipelineRasterizationProvokingVertexStateCreateInfoEXT provoking_state;
|
||||||
|
|
Loading…
Reference in New Issue