Commit 0de14c37 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

wined3d: Remove unused variables.

parent 471fb146
......@@ -1226,9 +1226,6 @@ void pshader_hw_texreg2ar(SHADER_OPCODE_ARG* arg) {
void pshader_hw_texreg2gb(SHADER_OPCODE_ARG* arg) {
SHADER_BUFFER* buffer = arg->buffer;
IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device;
DWORD flags;
DWORD reg1 = arg->dst & WINED3DSP_REGNUM_MASK;
char dst_str[8];
......@@ -1238,23 +1235,18 @@ void pshader_hw_texreg2gb(SHADER_OPCODE_ARG* arg) {
pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src_str);
shader_addline(buffer, "MOV TMP.r, %s.g;\n", src_str);
shader_addline(buffer, "MOV TMP.g, %s.b;\n", src_str);
flags = reg1 < MAX_TEXTURES ? deviceImpl->stateBlock->textureState[reg1][WINED3DTSS_TEXTURETRANSFORMFLAGS] : 0;
shader_hw_sample(arg, reg1, dst_str, "TMP", FALSE, FALSE);
}
void pshader_hw_texreg2rgb(SHADER_OPCODE_ARG* arg) {
SHADER_BUFFER* buffer = arg->buffer;
IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device;
DWORD flags;
DWORD reg1 = arg->dst & WINED3DSP_REGNUM_MASK;
char dst_str[8];
char src_str[50];
sprintf(dst_str, "T%u", reg1);
pshader_gen_input_modifier_line(arg->shader, buffer, arg->src[0], 0, src_str);
flags = reg1 < MAX_TEXTURES ? deviceImpl->stateBlock->textureState[reg1][WINED3DTSS_TEXTURETRANSFORMFLAGS] : 0;
shader_hw_sample(arg, reg1, dst_str, src_str, FALSE, FALSE);
}
......
......@@ -7334,11 +7334,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetCreationParameters(IWineD3DDevice
static void WINAPI IWineD3DDeviceImpl_SetGammaRamp(IWineD3DDevice * iface, UINT iSwapChain, DWORD Flags, CONST WINED3DGAMMARAMP* pRamp) {
IWineD3DSwapChain *swapchain;
HRESULT hrc = WINED3D_OK;
TRACE("Relaying to swapchain\n");
if ((hrc = IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, &swapchain)) == WINED3D_OK) {
if (IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, &swapchain) == WINED3D_OK) {
IWineD3DSwapChain_SetGammaRamp(swapchain, Flags, (WINED3DGAMMARAMP *)pRamp);
IWineD3DSwapChain_Release(swapchain);
}
......@@ -7347,12 +7346,11 @@ static void WINAPI IWineD3DDeviceImpl_SetGammaRamp(IWineD3DDevice * iface, UINT
static void WINAPI IWineD3DDeviceImpl_GetGammaRamp(IWineD3DDevice *iface, UINT iSwapChain, WINED3DGAMMARAMP* pRamp) {
IWineD3DSwapChain *swapchain;
HRESULT hrc = WINED3D_OK;
TRACE("Relaying to swapchain\n");
if ((hrc = IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, &swapchain)) == WINED3D_OK) {
hrc =IWineD3DSwapChain_GetGammaRamp(swapchain, pRamp);
if (IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, &swapchain) == WINED3D_OK) {
IWineD3DSwapChain_GetGammaRamp(swapchain, pRamp);
IWineD3DSwapChain_Release(swapchain);
}
return;
......
......@@ -156,7 +156,6 @@ void primitiveDeclarationConvertToStridedData(
int i;
WINED3DVERTEXELEMENT *element;
DWORD stride;
int reg;
DWORD numPreloadStreams = This->stateBlock->streamIsUP ? 0 : vertexDeclaration->num_streams;
DWORD *streams = vertexDeclaration->streams;
......@@ -214,7 +213,6 @@ void primitiveDeclarationConvertToStridedData(
}
}
data += element->Offset;
reg = element->Reg;
TRACE("Offset %d Stream %d UsageIndex %d\n", element->Offset, element->Stream, element->UsageIndex);
......
......@@ -868,7 +868,6 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This)
int bpp;
GLenum format, internal, type;
CONVERT_TYPES convert;
BOOL srcIsUpsideDown;
GLint prevRead;
d3dfmt_get_conv(This, TRUE /* We need color keying */, TRUE /* We will use textures */, &format, &internal, &type, &convert, &bpp, This->srgb);
......@@ -895,7 +894,6 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This)
*/
TRACE("Locking offscreen render target\n");
glReadBuffer(device->offscreenBuffer);
srcIsUpsideDown = TRUE;
} else {
GLenum buffer = surface_get_gl_buffer((IWineD3DSurface *) This, (IWineD3DSwapChain *)swapchain);
TRACE("Locking %#x buffer\n", buffer);
......@@ -903,7 +901,6 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This)
checkGLcall("glReadBuffer");
IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain);
srcIsUpsideDown = FALSE;
}
if(!(This->Flags & SFLAG_ALLOCATED)) {
......
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