mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
wined3d: The initial value for D3DRS_POINTSIZE_MAX depends on the pointsize limit.
This commit is contained in:
parent
664b58dc6f
commit
de494ffe3c
@ -1073,6 +1073,7 @@ typedef struct render_state_data {
|
||||
|
||||
typedef struct render_state_arg {
|
||||
D3DPRESENT_PARAMETERS* device_pparams;
|
||||
float pointsize_max;
|
||||
} render_state_arg;
|
||||
|
||||
typedef struct render_state_context {
|
||||
@ -1123,14 +1124,12 @@ static inline DWORD to_dword(float fl) {
|
||||
return *((DWORD*) &fl);
|
||||
}
|
||||
|
||||
static void render_state_default_data_init(
|
||||
D3DPRESENT_PARAMETERS* device_pparams,
|
||||
render_state_data* data) {
|
||||
|
||||
static void render_state_default_data_init(const struct render_state_arg *rsarg, struct render_state_data *data)
|
||||
{
|
||||
DWORD zenable = rsarg->device_pparams->EnableAutoDepthStencil ? D3DZB_TRUE : D3DZB_FALSE;
|
||||
unsigned int idx = 0;
|
||||
|
||||
data->states[idx++] = device_pparams->EnableAutoDepthStencil?
|
||||
D3DZB_TRUE : D3DZB_FALSE; /* ZENABLE */
|
||||
data->states[idx++] = zenable; /* ZENABLE */
|
||||
data->states[idx++] = D3DFILL_SOLID; /* FILLMODE */
|
||||
data->states[idx++] = D3DSHADE_GOURAUD; /* SHADEMODE */
|
||||
data->states[idx++] = TRUE; /* ZWRITEENABLE */
|
||||
@ -1195,7 +1194,7 @@ static void render_state_default_data_init(
|
||||
data->states[idx++] = 0xFFFFFFFF; /* MULTISAMPLEMASK */
|
||||
data->states[idx++] = D3DPATCHEDGE_DISCRETE; /* PATCHEDGESTYLE */
|
||||
data->states[idx++] = 0xbaadcafe; /* DEBUGMONITORTOKEN */
|
||||
data->states[idx++] = to_dword(64.0f); /* POINTSIZE_MAX */
|
||||
data->states[idx++] = to_dword(rsarg->pointsize_max); /* POINTSIZE_MAX */
|
||||
data->states[idx++] = FALSE; /* INDEXEDVERTEXBLENDENABLE */
|
||||
data->states[idx++] = 0x0000000F; /* COLORWRITEENABLE */
|
||||
data->states[idx++] = to_dword(0.0f); /* TWEENFACTOR */
|
||||
@ -1372,7 +1371,7 @@ static HRESULT render_state_setup_handler(
|
||||
test->test_data_out = &ctx->test_data_buffer;
|
||||
test->poison_data = &ctx->poison_data_buffer;
|
||||
|
||||
render_state_default_data_init(rsarg->device_pparams, &ctx->default_data_buffer);
|
||||
render_state_default_data_init(rsarg, &ctx->default_data_buffer);
|
||||
render_state_test_data_init(&ctx->test_data_buffer);
|
||||
render_state_poison_data_init(&ctx->poison_data_buffer);
|
||||
|
||||
@ -1454,6 +1453,7 @@ static void test_state_management(
|
||||
tcount++;
|
||||
|
||||
render_state_arg.device_pparams = device_pparams;
|
||||
render_state_arg.pointsize_max = caps.MaxPointSize;
|
||||
render_states_queue_test(&tests[tcount], &render_state_arg);
|
||||
tcount++;
|
||||
|
||||
|
@ -1123,7 +1123,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
|
||||
tmpfloat.f = 1.0f;
|
||||
IWineD3DDevice_SetRenderState(device, WINED3DRS_PATCHSEGMENTS, tmpfloat.d);
|
||||
IWineD3DDevice_SetRenderState(device, WINED3DRS_DEBUGMONITORTOKEN, 0xbaadcafe);
|
||||
tmpfloat.f = 64.0f;
|
||||
tmpfloat.f = GL_LIMITS(pointsize);
|
||||
IWineD3DDevice_SetRenderState(device, WINED3DRS_POINTSIZE_MAX, tmpfloat.d);
|
||||
IWineD3DDevice_SetRenderState(device, WINED3DRS_INDEXEDVERTEXBLENDENABLE, FALSE);
|
||||
IWineD3DDevice_SetRenderState(device, WINED3DRS_COLORWRITEENABLE, 0x0000000F);
|
||||
|
Loading…
Reference in New Issue
Block a user