Commit 35f33ef4 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Add extension information to the states.

This patch adds a new field to the state templates. If this extension field is != 0, then the line is only applied to the final state table if the extension is supported. Once a line is applied to the final table, all further templates for this state from the same pipeline part are ignored. This allows removing some extension checks from the state handlers, which cleans them up and saves a few CPU cycles when applying the states.
parent 3fb196fb
...@@ -3469,7 +3469,7 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, ...@@ -3469,7 +3469,7 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
frag_pipeline = select_fragment_implementation(Adapter, DeviceType); frag_pipeline = select_fragment_implementation(Adapter, DeviceType);
object->frag_pipe = frag_pipeline; object->frag_pipe = frag_pipeline;
compile_state_table(object->StateTable, object->multistate_funcs, compile_state_table(object->StateTable, object->multistate_funcs, &GLINFO_LOCATION,
ffp_vertexstate_template, frag_pipeline, misc_state_template); ffp_vertexstate_template, frag_pipeline, misc_state_template);
/* Prefer the vtable with functions optimized for single dirtifyable objects if the shader /* Prefer the vtable with functions optimized for single dirtifyable objects if the shader
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -538,6 +538,7 @@ struct StateEntryTemplate ...@@ -538,6 +538,7 @@ struct StateEntryTemplate
{ {
DWORD state; DWORD state;
struct StateEntry content; struct StateEntry content;
GL_SupportedExt extension;
}; };
struct fragment_caps { struct fragment_caps {
...@@ -566,6 +567,7 @@ extern const struct fragment_pipeline nvrc_fragment_pipeline; ...@@ -566,6 +567,7 @@ extern const struct fragment_pipeline nvrc_fragment_pipeline;
/* "Base" state table */ /* "Base" state table */
void compile_state_table(struct StateEntry *StateTable, void compile_state_table(struct StateEntry *StateTable,
APPLYSTATEFUNC **dev_multistate_funcs, APPLYSTATEFUNC **dev_multistate_funcs,
WineD3D_GL_Info *gl_info,
const struct StateEntryTemplate *vertex, const struct StateEntryTemplate *vertex,
const struct fragment_pipeline *fragment, const struct fragment_pipeline *fragment,
const struct StateEntryTemplate *misc); const struct StateEntryTemplate *misc);
......
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