Commit 9a14d78d authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Handle GS inputs and outputs.

parent 0f062f51
......@@ -2678,6 +2678,9 @@ void find_vs_compile_args(const struct wined3d_state *state, const struct wined3
&& state->render_states[WINED3D_RS_CLIPPLANEENABLE];
args->point_size = state->gl_primitive_type == GL_POINTS;
args->per_vertex_point_size = shader->reg_maps.point_size;
args->next_shader_type = state->shader[WINED3D_SHADER_TYPE_HULL] ? WINED3D_SHADER_TYPE_HULL
: state->shader[WINED3D_SHADER_TYPE_GEOMETRY] ? WINED3D_SHADER_TYPE_GEOMETRY
: WINED3D_SHADER_TYPE_PIXEL;
if (shader->reg_maps.shader_version.major >= 4)
args->next_shader_input_count = state->shader[WINED3D_SHADER_TYPE_HULL]
? state->shader[WINED3D_SHADER_TYPE_HULL]->limits->packed_input
......@@ -2901,6 +2904,13 @@ static HRESULT geometry_shader_init(struct wined3d_shader *shader, struct wined3
return WINED3D_OK;
}
void find_gs_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader,
struct gs_compile_args *args)
{
args->ps_input_count = state->shader[WINED3D_SHADER_TYPE_PIXEL]
? state->shader[WINED3D_SHADER_TYPE_PIXEL]->limits->packed_input : 0;
}
void find_ps_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader,
BOOL position_transformed, struct ps_compile_args *args, const struct wined3d_context *context)
{
......
......@@ -1044,11 +1044,17 @@ struct vs_compile_args
BYTE point_size : 1;
BYTE per_vertex_point_size : 1;
BYTE flatshading : 1;
BYTE padding : 4;
BYTE next_shader_type : 3;
BYTE padding : 1;
WORD swizzle_map; /* MAX_ATTRIBS, 16 */
unsigned int next_shader_input_count;
};
struct gs_compile_args
{
unsigned int ps_input_count;
};
struct wined3d_context;
struct wined3d_state;
struct fragment_pipeline;
......@@ -3296,6 +3302,9 @@ void find_vs_compile_args(const struct wined3d_state *state, const struct wined3
WORD swizzle_map, struct vs_compile_args *args,
const struct wined3d_d3d_info *d3d_info) DECLSPEC_HIDDEN;
void find_gs_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader,
struct gs_compile_args *args) DECLSPEC_HIDDEN;
void string_buffer_clear(struct wined3d_string_buffer *buffer) DECLSPEC_HIDDEN;
BOOL string_buffer_init(struct wined3d_string_buffer *buffer) DECLSPEC_HIDDEN;
void string_buffer_free(struct wined3d_string_buffer *buffer) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment