wined3d: Generate geometry shader outputs when NULL pixel shader is used.

In preparation for stream output.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2017-03-23 12:15:47 +01:00 committed by Alexandre Julliard
parent 3d459c6152
commit 1a1b3fd3bc
3 changed files with 4 additions and 4 deletions

View File

@ -7063,7 +7063,7 @@ static GLuint shader_glsl_generate_geometry_shader(const struct wined3d_context
shader_generate_glsl_declarations(context, buffer, shader, reg_maps, &priv_ctx); shader_generate_glsl_declarations(context, buffer, shader, reg_maps, &priv_ctx);
if (!gl_info->supported[ARB_CLIP_CONTROL]) if (!gl_info->supported[ARB_CLIP_CONTROL])
shader_addline(buffer, "uniform vec4 pos_fixup;\n"); shader_addline(buffer, "uniform vec4 pos_fixup;\n");
shader_glsl_generate_sm4_rasterizer_input_setup(priv, shader, args->ps_input_count, gl_info); shader_glsl_generate_sm4_rasterizer_input_setup(priv, shader, args->output_count, gl_info);
shader_addline(buffer, "void main()\n{\n"); shader_addline(buffer, "void main()\n{\n");
if (FAILED(shader_generate_main(shader, buffer, reg_maps, &priv_ctx))) if (FAILED(shader_generate_main(shader, buffer, reg_maps, &priv_ctx)))
return 0; return 0;

View File

@ -3407,8 +3407,8 @@ static HRESULT geometry_shader_init(struct wined3d_shader *shader, struct wined3
void find_gs_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader, void find_gs_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader,
struct gs_compile_args *args) struct gs_compile_args *args)
{ {
args->ps_input_count = state->shader[WINED3D_SHADER_TYPE_PIXEL] args->output_count = state->shader[WINED3D_SHADER_TYPE_PIXEL]
? state->shader[WINED3D_SHADER_TYPE_PIXEL]->limits->packed_input : 0; ? state->shader[WINED3D_SHADER_TYPE_PIXEL]->limits->packed_input : shader->limits->packed_output;
} }
void find_ps_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader, void find_ps_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader,

View File

@ -1312,7 +1312,7 @@ struct vs_compile_args
struct gs_compile_args struct gs_compile_args
{ {
unsigned int ps_input_count; unsigned int output_count;
}; };
struct wined3d_context; struct wined3d_context;