wined3d: Remove the state table from the shader backend.
This commit is contained in:
parent
2d7cdc3ec2
commit
3a2743f25d
@ -2109,5 +2109,4 @@ const shader_backend_t arb_program_shader_backend = {
|
||||
shader_arb_generate_vshader,
|
||||
shader_arb_get_caps,
|
||||
shader_arb_fragment_enable,
|
||||
FFPStateTable
|
||||
};
|
||||
|
@ -853,9 +853,6 @@ static void set_bumpmat(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
|
||||
}
|
||||
#undef GLINFO_LOCATION
|
||||
|
||||
/* our state table. Borrows lots of stuff from the base implementation */
|
||||
struct StateEntry ATIFSStateTable[STATE_HIGHEST + 1];
|
||||
|
||||
const struct StateEntryTemplate atifs_fragmentstate_template[] = {
|
||||
{STATE_RENDER(WINED3DRS_TEXTUREFACTOR), { STATE_RENDER(WINED3DRS_TEXTUREFACTOR), state_texfactor_atifs }},
|
||||
{STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP), { STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP), set_tex_op_atifs }},
|
||||
@ -1126,5 +1123,4 @@ const shader_backend_t atifs_shader_backend = {
|
||||
shader_atifs_generate_vshader,
|
||||
shader_atifs_get_caps,
|
||||
shader_atifs_fragment_enable,
|
||||
ATIFSStateTable
|
||||
};
|
||||
|
@ -1214,7 +1214,6 @@ const shader_backend_t none_shader_backend = {
|
||||
shader_none_generate_vshader,
|
||||
shader_none_get_caps,
|
||||
shader_none_fragment_enable,
|
||||
FFPStateTable
|
||||
};
|
||||
|
||||
/* *******************************************
|
||||
|
@ -3464,8 +3464,7 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
|
||||
frag_pipeline = select_fragment_implementation(Adapter, DeviceType);
|
||||
|
||||
compile_state_table(object->StateTable, object->multistate_funcs,
|
||||
ffp_vertexstate_template, frag_pipeline, misc_state_template,
|
||||
object->shader_backend->StateTable_remove);
|
||||
ffp_vertexstate_template, frag_pipeline, misc_state_template);
|
||||
|
||||
/* Prefer the vtable with functions optimized for single dirtifyable objects if the shader
|
||||
* model can deal with that. It is essentially the same, just with adjusted
|
||||
|
@ -3708,5 +3708,4 @@ const shader_backend_t glsl_shader_backend = {
|
||||
shader_glsl_generate_vshader,
|
||||
shader_glsl_get_caps,
|
||||
shader_glsl_fragment_enable,
|
||||
FFPStateTable
|
||||
};
|
||||
|
@ -2494,7 +2494,7 @@ static void pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
|
||||
update_fog = TRUE;
|
||||
}
|
||||
|
||||
if(!isStateDirty(context, FFPStateTable[STATE_VSHADER].representative)) {
|
||||
if(!isStateDirty(context, device->StateTable[STATE_VSHADER].representative)) {
|
||||
device->shader_backend->shader_select((IWineD3DDevice *)stateblock->wineD3DDevice, use_pshader, use_vshader);
|
||||
|
||||
if (!isStateDirty(context, STATE_VERTEXSHADERCONSTANT) && (use_vshader || use_pshader)) {
|
||||
@ -5271,8 +5271,7 @@ void compile_state_table(struct StateEntry *StateTable,
|
||||
APPLYSTATEFUNC **dev_multistate_funcs,
|
||||
const struct StateEntryTemplate *vertex,
|
||||
const struct StateEntryTemplate *fragment,
|
||||
const struct StateEntryTemplate *misc,
|
||||
const struct StateEntry *temptable /* TODO: Remove this */) {
|
||||
const struct StateEntryTemplate *misc) {
|
||||
unsigned int i, type, handlers;
|
||||
APPLYSTATEFUNC multistate_funcs[STATE_HIGHEST + 1][3];
|
||||
const struct StateEntryTemplate *cur;
|
||||
@ -5336,6 +5335,6 @@ void compile_state_table(struct StateEntry *StateTable,
|
||||
/* TODO Remove this after the state move is done */
|
||||
for(i = 0; i < STATE_HIGHEST + 1; i++) {
|
||||
if(set[i]) continue;
|
||||
StateTable[i] = temptable[i];
|
||||
StateTable[i] = FFPStateTable[i];
|
||||
}
|
||||
}
|
||||
|
@ -301,7 +301,6 @@ typedef struct {
|
||||
void (*shader_generate_vshader)(IWineD3DVertexShader *iface, SHADER_BUFFER *buffer);
|
||||
void (*shader_get_caps)(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_info, struct shader_caps *caps);
|
||||
void (*shader_fragment_enable)(IWineD3DDevice *iface, BOOL enable);
|
||||
const struct StateEntry *StateTable_remove; /* TODO: This has to go away */
|
||||
} shader_backend_t;
|
||||
|
||||
extern const shader_backend_t atifs_shader_backend;
|
||||
@ -598,13 +597,11 @@ extern const struct StateEntryTemplate ffp_fragmentstate_template[];
|
||||
extern const struct StateEntryTemplate atifs_fragmentstate_template[];
|
||||
|
||||
/* "Base" state table */
|
||||
extern const struct StateEntry FFPStateTable[];
|
||||
void compile_state_table(struct StateEntry *StateTable,
|
||||
APPLYSTATEFUNC **dev_multistate_funcs,
|
||||
const struct StateEntryTemplate *vertex,
|
||||
const struct StateEntryTemplate *fragment,
|
||||
const struct StateEntryTemplate *misc,
|
||||
const struct StateEntry *temptable /* TODO: Remove this */);
|
||||
const struct StateEntryTemplate *misc);
|
||||
|
||||
/* The new context manager that should deal with onscreen and offscreen rendering */
|
||||
struct WineD3DContext {
|
||||
|
Loading…
x
Reference in New Issue
Block a user