wined3d: Remove usesFog flag from IWineD3DVertexShaderImpl.
This commit is contained in:
parent
71fe9ae7da
commit
e28630bc32
|
@ -765,7 +765,7 @@ static void state_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo
|
||||||
}
|
}
|
||||||
|
|
||||||
if (use_vs(stateblock->wineD3DDevice)
|
if (use_vs(stateblock->wineD3DDevice)
|
||||||
&& ((IWineD3DVertexShaderImpl *)stateblock->vertexShader)->usesFog) {
|
&& ((IWineD3DVertexShaderImpl *)stateblock->vertexShader)->baseShader.reg_maps.fog) {
|
||||||
if( stateblock->renderState[WINED3DRS_FOGTABLEMODE] != WINED3DFOG_NONE ) {
|
if( stateblock->renderState[WINED3DRS_FOGTABLEMODE] != WINED3DFOG_NONE ) {
|
||||||
if(!is_ps3) FIXME("Implement table fog for foggy vertex shader\n");
|
if(!is_ps3) FIXME("Implement table fog for foggy vertex shader\n");
|
||||||
/* Disable fog */
|
/* Disable fog */
|
||||||
|
@ -3018,7 +3018,7 @@ static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, W
|
||||||
((IWineD3DVertexShaderImpl *)stateblock->vertexShader)->baseShader.function != NULL) {
|
((IWineD3DVertexShaderImpl *)stateblock->vertexShader)->baseShader.function != NULL) {
|
||||||
useVertexShaderFunction = TRUE;
|
useVertexShaderFunction = TRUE;
|
||||||
|
|
||||||
if(((IWineD3DVertexShaderImpl *)stateblock->vertexShader)->usesFog != context->last_was_foggy_shader) {
|
if(((IWineD3DVertexShaderImpl *)stateblock->vertexShader)->baseShader.reg_maps.fog != context->last_was_foggy_shader) {
|
||||||
updateFog = TRUE;
|
updateFog = TRUE;
|
||||||
}
|
}
|
||||||
} else if(context->last_was_foggy_shader) {
|
} else if(context->last_was_foggy_shader) {
|
||||||
|
|
|
@ -337,9 +337,7 @@ static VOID IWineD3DVertexShaderImpl_GenerateShader(
|
||||||
vshader_glsl_output_unpack(&buffer, This->semantics_out);
|
vshader_glsl_output_unpack(&buffer, This->semantics_out);
|
||||||
|
|
||||||
/* If this shader doesn't use fog copy the z coord to the fog coord so that we can use table fog */
|
/* If this shader doesn't use fog copy the z coord to the fog coord so that we can use table fog */
|
||||||
if (reg_maps->fog)
|
if (!reg_maps->fog)
|
||||||
This->usesFog = 1;
|
|
||||||
else
|
|
||||||
shader_addline(&buffer, "gl_FogFragCoord = gl_Position.z;\n");
|
shader_addline(&buffer, "gl_FogFragCoord = gl_Position.z;\n");
|
||||||
|
|
||||||
/* Write the final position.
|
/* Write the final position.
|
||||||
|
@ -386,9 +384,7 @@ static VOID IWineD3DVertexShaderImpl_GenerateShader(
|
||||||
shader_generate_main( (IWineD3DBaseShader*) This, &buffer, reg_maps, pFunction);
|
shader_generate_main( (IWineD3DBaseShader*) This, &buffer, reg_maps, pFunction);
|
||||||
|
|
||||||
/* If this shader doesn't use fog copy the z coord to the fog coord so that we can use table fog */
|
/* If this shader doesn't use fog copy the z coord to the fog coord so that we can use table fog */
|
||||||
if (reg_maps->fog)
|
if (!reg_maps->fog)
|
||||||
This->usesFog = 1;
|
|
||||||
else
|
|
||||||
shader_addline(&buffer, "MOV result.fogcoord, TMP_OUT.z;\n");
|
shader_addline(&buffer, "MOV result.fogcoord, TMP_OUT.z;\n");
|
||||||
|
|
||||||
/* Write the final position.
|
/* Write the final position.
|
||||||
|
|
|
@ -1892,7 +1892,6 @@ typedef struct IWineD3DVertexShaderImpl {
|
||||||
/* IWineD3DVertexShaderImpl */
|
/* IWineD3DVertexShaderImpl */
|
||||||
IUnknown *parent;
|
IUnknown *parent;
|
||||||
|
|
||||||
char usesFog;
|
|
||||||
DWORD usage;
|
DWORD usage;
|
||||||
|
|
||||||
/* Vertex shader input and output semantics */
|
/* Vertex shader input and output semantics */
|
||||||
|
|
Loading…
Reference in New Issue