Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
705f96fa
Commit
705f96fa
authored
Jan 25, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 26, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of some unnecessary casts to specific shader types.
parent
f27b032d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
55 deletions
+55
-55
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+28
-27
glsl_shader.c
dlls/wined3d/glsl_shader.c
+27
-28
No files found.
dlls/wined3d/arb_program_shader.c
View file @
705f96fa
...
...
@@ -1761,8 +1761,8 @@ static void pshader_hw_texkill(const struct wined3d_shader_instruction *ins)
static
void
pshader_hw_tex
(
const
struct
wined3d_shader_instruction
*
ins
)
{
IWineD3D
PixelShaderImpl
*
This
=
(
IWineD3DPixel
ShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
;
IWineD3D
BaseShaderImpl
*
shader
=
(
IWineD3DBase
ShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
;
const
struct
wined3d_shader_dst_param
*
dst
=
&
ins
->
dst
[
0
];
DWORD
shader_version
=
WINED3D_SHADER_VERSION
(
ins
->
ctx
->
reg_maps
->
shader_version
.
major
,
ins
->
ctx
->
reg_maps
->
shader_version
.
minor
);
...
...
@@ -1856,8 +1856,8 @@ static void pshader_hw_texcoord(const struct wined3d_shader_instruction *ins)
static
void
pshader_hw_texreg2ar
(
const
struct
wined3d_shader_instruction
*
ins
)
{
struct
wined3d_shader_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
IWineD3D
PixelShaderImpl
*
This
=
(
IWineD3DPixel
ShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
;
IWineD3D
BaseShaderImpl
*
shader
=
(
IWineD3DBase
ShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
;
DWORD
flags
;
DWORD
reg1
=
ins
->
dst
[
0
].
reg
.
idx
;
...
...
@@ -1904,7 +1904,8 @@ static void pshader_hw_texreg2rgb(const struct wined3d_shader_instruction *ins)
static
void
pshader_hw_texbem
(
const
struct
wined3d_shader_instruction
*
ins
)
{
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DBaseShaderImpl
*
shader
=
(
IWineD3DBaseShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
;
const
struct
wined3d_shader_dst_param
*
dst
=
&
ins
->
dst
[
0
];
struct
wined3d_shader_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
char
reg_coord
[
40
],
dst_reg
[
50
],
src_reg
[
50
];
...
...
@@ -1936,8 +1937,8 @@ static void pshader_hw_texbem(const struct wined3d_shader_instruction *ins)
/* with projective textures, texbem only divides the static texture coord, not the displacement,
* so we can't let the GL handle this.
*/
if
(
((
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
)
->
stateBlock
->
textureState
[
reg_dest_code
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
&
WINED3DTTFF_PROJECTED
)
{
if
(
device
->
stateBlock
->
textureState
[
reg_dest_code
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
&
WINED3DTTFF_PROJECTED
)
{
shader_addline
(
buffer
,
"RCP TB.w, %s.w;
\n
"
,
reg_coord
);
shader_addline
(
buffer
,
"MUL TB.xy, %s, TB.w;
\n
"
,
reg_coord
);
shader_addline
(
buffer
,
"ADD TA.xy, TA, TB;
\n
"
);
...
...
@@ -1975,8 +1976,8 @@ static void pshader_hw_texm3x2pad(const struct wined3d_shader_instruction *ins)
static
void
pshader_hw_texm3x2tex
(
const
struct
wined3d_shader_instruction
*
ins
)
{
IWineD3D
PixelShaderImpl
*
This
=
(
IWineD3DPixel
ShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
;
IWineD3D
BaseShaderImpl
*
shader
=
(
IWineD3DBase
ShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
;
DWORD
flags
;
DWORD
reg
=
ins
->
dst
[
0
].
reg
.
idx
;
struct
wined3d_shader_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
...
...
@@ -1997,10 +1998,10 @@ static void pshader_hw_texm3x2tex(const struct wined3d_shader_instruction *ins)
static
void
pshader_hw_texm3x3pad
(
const
struct
wined3d_shader_instruction
*
ins
)
{
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DBaseShaderImpl
*
shader
=
(
IWineD3DBaseShaderImpl
*
)
ins
->
ctx
->
shader
;
SHADER_PARSE_STATE
*
current_state
=
&
shader
->
baseShader
.
parse_state
;
DWORD
reg
=
ins
->
dst
[
0
].
reg
.
idx
;
struct
wined3d_shader_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
SHADER_PARSE_STATE
*
current_state
=
&
This
->
baseShader
.
parse_state
;
char
src0_name
[
50
],
dst_name
[
50
];
struct
wined3d_shader_register
tmp_reg
=
ins
->
dst
[
0
].
reg
;
BOOL
is_color
;
...
...
@@ -2020,12 +2021,12 @@ static void pshader_hw_texm3x3pad(const struct wined3d_shader_instruction *ins)
static
void
pshader_hw_texm3x3tex
(
const
struct
wined3d_shader_instruction
*
ins
)
{
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
;
IWineD3DBaseShaderImpl
*
shader
=
(
IWineD3DBaseShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
;
SHADER_PARSE_STATE
*
current_state
=
&
shader
->
baseShader
.
parse_state
;
DWORD
flags
;
DWORD
reg
=
ins
->
dst
[
0
].
reg
.
idx
;
struct
wined3d_shader_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
SHADER_PARSE_STATE
*
current_state
=
&
This
->
baseShader
.
parse_state
;
char
dst_str
[
50
];
char
src0_name
[
50
],
dst_name
[
50
];
BOOL
is_color
;
...
...
@@ -2043,12 +2044,12 @@ static void pshader_hw_texm3x3tex(const struct wined3d_shader_instruction *ins)
static
void
pshader_hw_texm3x3vspec
(
const
struct
wined3d_shader_instruction
*
ins
)
{
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
;
IWineD3DBaseShaderImpl
*
shader
=
(
IWineD3DBaseShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
;
SHADER_PARSE_STATE
*
current_state
=
&
shader
->
baseShader
.
parse_state
;
DWORD
flags
;
DWORD
reg
=
ins
->
dst
[
0
].
reg
.
idx
;
struct
wined3d_shader_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
SHADER_PARSE_STATE
*
current_state
=
&
This
->
baseShader
.
parse_state
;
char
dst_str
[
50
];
char
src0_name
[
50
];
char
dst_reg
[
50
];
...
...
@@ -2085,11 +2086,11 @@ static void pshader_hw_texm3x3vspec(const struct wined3d_shader_instruction *ins
static
void
pshader_hw_texm3x3spec
(
const
struct
wined3d_shader_instruction
*
ins
)
{
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
;
IWineD3DBaseShaderImpl
*
shader
=
(
IWineD3DBaseShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
;
SHADER_PARSE_STATE
*
current_state
=
&
shader
->
baseShader
.
parse_state
;
DWORD
flags
;
DWORD
reg
=
ins
->
dst
[
0
].
reg
.
idx
;
SHADER_PARSE_STATE
*
current_state
=
&
This
->
baseShader
.
parse_state
;
struct
wined3d_shader_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
char
dst_str
[
50
];
char
src0_name
[
50
];
...
...
@@ -4448,8 +4449,7 @@ static void shader_arb_destroy(IWineD3DBaseShader *iface) {
if
(
shader_is_pshader_version
(
baseShader
->
baseShader
.
reg_maps
.
shader_version
.
type
))
{
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
iface
;
struct
arb_pshader_private
*
shader_data
=
This
->
baseShader
.
backend_data
;
struct
arb_pshader_private
*
shader_data
=
baseShader
->
baseShader
.
backend_data
;
UINT
i
;
if
(
!
shader_data
)
return
;
/* This can happen if a shader was never compiled */
...
...
@@ -4471,10 +4471,11 @@ static void shader_arb_destroy(IWineD3DBaseShader *iface) {
HeapFree
(
GetProcessHeap
(),
0
,
shader_data
->
gl_shaders
);
HeapFree
(
GetProcessHeap
(),
0
,
shader_data
);
This
->
baseShader
.
backend_data
=
NULL
;
}
else
{
IWineD3DVertexShaderImpl
*
This
=
(
IWineD3DVertexShaderImpl
*
)
iface
;
struct
arb_vshader_private
*
shader_data
=
This
->
baseShader
.
backend_data
;
baseShader
->
baseShader
.
backend_data
=
NULL
;
}
else
{
struct
arb_vshader_private
*
shader_data
=
baseShader
->
baseShader
.
backend_data
;
UINT
i
;
if
(
!
shader_data
)
return
;
/* This can happen if a shader was never compiled */
...
...
@@ -4496,7 +4497,7 @@ static void shader_arb_destroy(IWineD3DBaseShader *iface) {
HeapFree
(
GetProcessHeap
(),
0
,
shader_data
->
gl_shaders
);
HeapFree
(
GetProcessHeap
(),
0
,
shader_data
);
This
->
baseShader
.
backend_data
=
NULL
;
baseShader
->
baseShader
.
backend_data
=
NULL
;
}
}
...
...
dlls/wined3d/glsl_shader.c
View file @
705f96fa
...
...
@@ -2743,8 +2743,8 @@ static void shader_glsl_ret(const struct wined3d_shader_instruction *ins)
********************************************/
static
void
shader_glsl_tex
(
const
struct
wined3d_shader_instruction
*
ins
)
{
IWineD3D
PixelShaderImpl
*
This
=
(
IWineD3DPixel
ShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
;
IWineD3D
BaseShaderImpl
*
shader
=
(
IWineD3DBase
ShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
;
DWORD
shader_version
=
WINED3D_SHADER_VERSION
(
ins
->
ctx
->
reg_maps
->
shader_version
.
major
,
ins
->
ctx
->
reg_maps
->
shader_version
.
minor
);
const
struct
wined3d_gl_info
*
gl_info
=
ins
->
ctx
->
gl_info
;
...
...
@@ -3064,7 +3064,7 @@ static void shader_glsl_texm3x2pad(const struct wined3d_shader_instruction *ins)
* Calculate the 1st or 2nd row of a 3-row matrix multiplication. */
static
void
shader_glsl_texm3x3pad
(
const
struct
wined3d_shader_instruction
*
ins
)
{
IWineD3D
PixelShaderImpl
*
shader
=
(
IWineD3DPixel
ShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3D
BaseShaderImpl
*
shader
=
(
IWineD3DBase
ShaderImpl
*
)
ins
->
ctx
->
shader
;
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
reg
=
ins
->
dst
[
0
].
reg
.
idx
;
struct
wined3d_shader_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
...
...
@@ -3100,11 +3100,11 @@ static void shader_glsl_texm3x2tex(const struct wined3d_shader_instruction *ins)
static
void
shader_glsl_texm3x3tex
(
const
struct
wined3d_shader_instruction
*
ins
)
{
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
IWineD3DBaseShaderImpl
*
shader
=
(
IWineD3DBaseShaderImpl
*
)
ins
->
ctx
->
shader
;
SHADER_PARSE_STATE
*
current_state
=
&
shader
->
baseShader
.
parse_state
;
const
struct
wined3d_gl_info
*
gl_info
=
ins
->
ctx
->
gl_info
;
glsl_src_param_t
src0_param
;
DWORD
reg
=
ins
->
dst
[
0
].
reg
.
idx
;
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
ctx
->
shader
;
SHADER_PARSE_STATE
*
current_state
=
&
This
->
baseShader
.
parse_state
;
WINED3DSAMPLER_TEXTURE_TYPE
sampler_type
=
ins
->
ctx
->
reg_maps
->
sampler_type
[
reg
];
glsl_sample_function_t
sample_function
;
...
...
@@ -3125,11 +3125,11 @@ static void shader_glsl_texm3x3tex(const struct wined3d_shader_instruction *ins)
static
void
shader_glsl_texm3x3
(
const
struct
wined3d_shader_instruction
*
ins
)
{
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
IWineD3DBaseShaderImpl
*
shader
=
(
IWineD3DBaseShaderImpl
*
)
ins
->
ctx
->
shader
;
SHADER_PARSE_STATE
*
current_state
=
&
shader
->
baseShader
.
parse_state
;
glsl_src_param_t
src0_param
;
char
dst_mask
[
6
];
DWORD
reg
=
ins
->
dst
[
0
].
reg
.
idx
;
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
ctx
->
shader
;
SHADER_PARSE_STATE
*
current_state
=
&
This
->
baseShader
.
parse_state
;
shader_glsl_add_src_param
(
ins
,
&
ins
->
src
[
0
],
src_mask
,
&
src0_param
);
...
...
@@ -3144,7 +3144,7 @@ static void shader_glsl_texm3x3(const struct wined3d_shader_instruction *ins)
* Perform the final texture lookup based on the previous 2 3x3 matrix multiplies */
static
void
shader_glsl_texm3x3spec
(
const
struct
wined3d_shader_instruction
*
ins
)
{
IWineD3D
PixelShaderImpl
*
shader
=
(
IWineD3DPixel
ShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3D
BaseShaderImpl
*
shader
=
(
IWineD3DBase
ShaderImpl
*
)
ins
->
ctx
->
shader
;
const
struct
wined3d_gl_info
*
gl_info
=
ins
->
ctx
->
gl_info
;
DWORD
reg
=
ins
->
dst
[
0
].
reg
.
idx
;
glsl_src_param_t
src0_param
;
...
...
@@ -3176,7 +3176,7 @@ static void shader_glsl_texm3x3spec(const struct wined3d_shader_instruction *ins
* Perform the final texture lookup based on the previous 2 3x3 matrix multiplies */
static
void
shader_glsl_texm3x3vspec
(
const
struct
wined3d_shader_instruction
*
ins
)
{
IWineD3D
PixelShaderImpl
*
shader
=
(
IWineD3DPixel
ShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3D
BaseShaderImpl
*
shader
=
(
IWineD3DBase
ShaderImpl
*
)
ins
->
ctx
->
shader
;
const
struct
wined3d_gl_info
*
gl_info
=
ins
->
ctx
->
gl_info
;
DWORD
reg
=
ins
->
dst
[
0
].
reg
.
idx
;
struct
wined3d_shader_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
...
...
@@ -3211,8 +3211,8 @@ static void shader_glsl_texm3x3vspec(const struct wined3d_shader_instruction *in
*/
static
void
shader_glsl_texbem
(
const
struct
wined3d_shader_instruction
*
ins
)
{
IWineD3D
PixelShaderImpl
*
This
=
(
IWineD3DPixel
ShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
;
IWineD3D
BaseShaderImpl
*
shader
=
(
IWineD3DBase
ShaderImpl
*
)
ins
->
ctx
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
;
const
struct
wined3d_gl_info
*
gl_info
=
ins
->
ctx
->
gl_info
;
glsl_sample_function_t
sample_function
;
glsl_src_param_t
coord_param
;
...
...
@@ -4321,10 +4321,12 @@ static void set_glsl_shader_program(const struct wined3d_context *context,
* load them now to have them hardcoded in the GLSL program. This saves some CPU cycles
* later
*/
if
(
pshader
&&
!
((
IWineD3DPixelShaderImpl
*
)
pshader
)
->
baseShader
.
load_local_constsF
)
{
if
(
pshader
&&
!
((
IWineD3DBaseShaderImpl
*
)
pshader
)
->
baseShader
.
load_local_constsF
)
{
hardcode_local_constants
((
IWineD3DBaseShaderImpl
*
)
pshader
,
gl_info
,
programId
,
'P'
);
}
if
(
vshader
&&
!
((
IWineD3DVertexShaderImpl
*
)
vshader
)
->
baseShader
.
load_local_constsF
)
{
if
(
vshader
&&
!
((
IWineD3DBaseShaderImpl
*
)
vshader
)
->
baseShader
.
load_local_constsF
)
{
hardcode_local_constants
((
IWineD3DBaseShaderImpl
*
)
vshader
,
gl_info
,
programId
,
'V'
);
}
}
...
...
@@ -4485,8 +4487,6 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) {
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
;
struct
shader_glsl_priv
*
priv
=
device
->
shader_priv
;
const
struct
wined3d_gl_info
*
gl_info
;
IWineD3DPixelShaderImpl
*
ps
=
NULL
;
IWineD3DVertexShaderImpl
*
vs
=
NULL
;
struct
wined3d_context
*
context
;
/* Note: Do not use QueryInterface here to find out which shader type this is because this code
...
...
@@ -4496,12 +4496,11 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) {
if
(
pshader
)
{
struct
glsl_pshader_private
*
shader_data
;
ps
=
(
IWineD3DPixelShaderImpl
*
)
This
;
shader_data
=
ps
->
baseShader
.
backend_data
;
shader_data
=
This
->
baseShader
.
backend_data
;
if
(
!
shader_data
||
shader_data
->
num_gl_shaders
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
shader_data
);
p
s
->
baseShader
.
backend_data
=
NULL
;
Thi
s
->
baseShader
.
backend_data
=
NULL
;
return
;
}
...
...
@@ -4516,12 +4515,11 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) {
}
}
else
{
struct
glsl_vshader_private
*
shader_data
;
vs
=
(
IWineD3DVertexShaderImpl
*
)
This
;
shader_data
=
vs
->
baseShader
.
backend_data
;
shader_data
=
This
->
baseShader
.
backend_data
;
if
(
!
shader_data
||
shader_data
->
num_gl_shaders
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
shader_data
);
v
s
->
baseShader
.
backend_data
=
NULL
;
Thi
s
->
baseShader
.
backend_data
=
NULL
;
return
;
}
...
...
@@ -4557,7 +4555,7 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) {
if
(
pshader
)
{
UINT
i
;
struct
glsl_pshader_private
*
shader_data
=
p
s
->
baseShader
.
backend_data
;
struct
glsl_pshader_private
*
shader_data
=
Thi
s
->
baseShader
.
backend_data
;
ENTER_GL
();
for
(
i
=
0
;
i
<
shader_data
->
num_gl_shaders
;
i
++
)
{
...
...
@@ -4567,11 +4565,11 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) {
}
LEAVE_GL
();
HeapFree
(
GetProcessHeap
(),
0
,
shader_data
->
gl_shaders
);
HeapFree
(
GetProcessHeap
(),
0
,
shader_data
);
ps
->
baseShader
.
backend_data
=
NULL
;
}
else
{
}
else
{
UINT
i
;
struct
glsl_vshader_private
*
shader_data
=
v
s
->
baseShader
.
backend_data
;
struct
glsl_vshader_private
*
shader_data
=
Thi
s
->
baseShader
.
backend_data
;
ENTER_GL
();
for
(
i
=
0
;
i
<
shader_data
->
num_gl_shaders
;
i
++
)
{
...
...
@@ -4581,10 +4579,11 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) {
}
LEAVE_GL
();
HeapFree
(
GetProcessHeap
(),
0
,
shader_data
->
gl_shaders
);
HeapFree
(
GetProcessHeap
(),
0
,
shader_data
);
vs
->
baseShader
.
backend_data
=
NULL
;
}
HeapFree
(
GetProcessHeap
(),
0
,
This
->
baseShader
.
backend_data
);
This
->
baseShader
.
backend_data
=
NULL
;
context_release
(
context
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment