wined3d: Store max point size in d3d_info.
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:
parent
9320424105
commit
95a051b333
|
@ -3657,6 +3657,8 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
|
|||
adapter->vertex_pipe = select_vertex_implementation(gl_info, adapter->shader_backend);
|
||||
adapter->fragment_pipe = select_fragment_implementation(gl_info, adapter->shader_backend);
|
||||
|
||||
d3d_info->limits.pointsize_max = gl_info->limits.pointsize_max;
|
||||
|
||||
adapter->shader_backend->shader_get_caps(gl_info, &shader_caps);
|
||||
d3d_info->vs_clipping = shader_caps.wined3d_caps & WINED3D_SHADER_CAP_VS_CLIPPING;
|
||||
d3d_info->limits.vs_version = shader_caps.vs_version;
|
||||
|
|
|
@ -1928,8 +1928,7 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
|||
|
||||
state_cleanup(&cs->state);
|
||||
memset(&cs->state, 0, sizeof(cs->state));
|
||||
state_init(&cs->state, &cs->fb, &adapter->gl_info, &adapter->d3d_info,
|
||||
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT);
|
||||
state_init(&cs->state, &cs->fb, &adapter->d3d_info, WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT);
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
|
@ -2795,7 +2794,7 @@ static DWORD WINAPI wined3d_cs_run(void *ctx)
|
|||
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info;
|
||||
struct wined3d_cs *cs;
|
||||
|
||||
if (!(cs = heap_alloc_zero(sizeof(*cs))))
|
||||
|
@ -2804,8 +2803,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
|||
cs->ops = &wined3d_cs_st_ops;
|
||||
cs->device = device;
|
||||
|
||||
state_init(&cs->state, &cs->fb, gl_info, &device->adapter->d3d_info,
|
||||
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT);
|
||||
state_init(&cs->state, &cs->fb, d3d_info, WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT);
|
||||
|
||||
cs->data_size = WINED3D_INITIAL_CS_SIZE;
|
||||
if (!(cs->data = heap_alloc(cs->data_size)))
|
||||
|
|
|
@ -4922,8 +4922,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
|||
wined3d_device_delete_opengl_contexts(device);
|
||||
|
||||
memset(&device->state, 0, sizeof(device->state));
|
||||
state_init(&device->state, &device->fb, &device->adapter->gl_info,
|
||||
&device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT);
|
||||
state_init(&device->state, &device->fb, &device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT);
|
||||
device->update_state = &device->state;
|
||||
|
||||
device_init_swapchain_state(device, swapchain);
|
||||
|
@ -5163,8 +5162,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
|||
return hr;
|
||||
}
|
||||
|
||||
state_init(&device->state, &device->fb, &adapter->gl_info,
|
||||
&adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT);
|
||||
state_init(&device->state, &device->fb, &adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT);
|
||||
device->update_state = &device->state;
|
||||
|
||||
device->max_frame_latency = 3;
|
||||
|
|
|
@ -2186,7 +2186,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte
|
|||
}
|
||||
|
||||
caps->MaxAnisotropy = gl_info->limits.anisotropy;
|
||||
caps->MaxPointSize = gl_info->limits.pointsize_max;
|
||||
caps->MaxPointSize = d3d_info->limits.pointsize_max;
|
||||
|
||||
caps->MaxPrimitiveCount = 0x555555; /* Taken from an AMD Radeon HD 5700 (Evergreen) GPU. */
|
||||
caps->MaxVertexIndex = 0xffffff; /* Taken from an AMD Radeon HD 5700 (Evergreen) GPU. */
|
||||
|
|
|
@ -1113,21 +1113,22 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock)
|
|||
TRACE("Applied stateblock %p.\n", stateblock);
|
||||
}
|
||||
|
||||
static void state_init_default(struct wined3d_state *state, const struct wined3d_gl_info *gl_info)
|
||||
static void state_init_default(struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info)
|
||||
{
|
||||
union
|
||||
{
|
||||
struct wined3d_line_pattern lp;
|
||||
DWORD d;
|
||||
} lp;
|
||||
union {
|
||||
union
|
||||
{
|
||||
float f;
|
||||
DWORD d;
|
||||
} tmpfloat;
|
||||
unsigned int i;
|
||||
struct wined3d_matrix identity;
|
||||
|
||||
TRACE("state %p, gl_info %p.\n", state, gl_info);
|
||||
TRACE("state %p, d3d_info %p.\n", state, d3d_info);
|
||||
|
||||
get_identity_matrix(&identity);
|
||||
state->gl_primitive_type = ~0u;
|
||||
|
@ -1222,7 +1223,7 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
|
|||
tmpfloat.f = 1.0f;
|
||||
state->render_states[WINED3D_RS_PATCHSEGMENTS] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_DEBUGMONITORTOKEN] = 0xbaadcafe;
|
||||
tmpfloat.f = gl_info->limits.pointsize_max;
|
||||
tmpfloat.f = d3d_info->limits.pointsize_max;
|
||||
state->render_states[WINED3D_RS_POINTSIZE_MAX] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_INDEXEDVERTEXBLENDENABLE] = FALSE;
|
||||
state->render_states[WINED3D_RS_COLORWRITEENABLE] = 0x0000000f;
|
||||
|
@ -1316,8 +1317,7 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
|
|||
}
|
||||
|
||||
void state_init(struct wined3d_state *state, struct wined3d_fb_state *fb,
|
||||
const struct wined3d_gl_info *gl_info, const struct wined3d_d3d_info *d3d_info,
|
||||
DWORD flags)
|
||||
const struct wined3d_d3d_info *d3d_info, DWORD flags)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
@ -1330,7 +1330,7 @@ void state_init(struct wined3d_state *state, struct wined3d_fb_state *fb,
|
|||
}
|
||||
|
||||
if (flags & WINED3D_STATE_INIT_DEFAULT)
|
||||
state_init_default(state, gl_info);
|
||||
state_init_default(state, d3d_info);
|
||||
}
|
||||
|
||||
static HRESULT stateblock_init(struct wined3d_stateblock *stateblock,
|
||||
|
@ -1340,7 +1340,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock,
|
|||
|
||||
stateblock->ref = 1;
|
||||
stateblock->device = device;
|
||||
state_init(&stateblock->state, NULL, &device->adapter->gl_info, d3d_info, 0);
|
||||
state_init(&stateblock->state, NULL, d3d_info, 0);
|
||||
|
||||
if (type == WINED3D_SBT_RECORDED)
|
||||
return WINED3D_OK;
|
||||
|
|
|
@ -163,6 +163,8 @@ struct wined3d_d3d_limits
|
|||
unsigned int ffp_blend_stages;
|
||||
unsigned int ffp_vertex_blend_matrices;
|
||||
unsigned int active_light_count;
|
||||
|
||||
float pointsize_max;
|
||||
};
|
||||
|
||||
typedef void (WINE_GLAPI *wined3d_ffp_attrib_func)(const void *data);
|
||||
|
@ -3537,8 +3539,7 @@ void wined3d_state_enable_light(struct wined3d_state *state, const struct wined3
|
|||
struct wined3d_light_info *wined3d_state_get_light(const struct wined3d_state *state,
|
||||
unsigned int idx) DECLSPEC_HIDDEN;
|
||||
void state_init(struct wined3d_state *state, struct wined3d_fb_state *fb,
|
||||
const struct wined3d_gl_info *gl_info, const struct wined3d_d3d_info *d3d_info,
|
||||
DWORD flags) DECLSPEC_HIDDEN;
|
||||
const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
|
||||
enum wined3d_cs_queue_id
|
||||
|
|
Loading…
Reference in New Issue