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
c5bf96c9
Commit
c5bf96c9
authored
Mar 28, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of IWineD3DBaseTextureClass.
parent
316f1c2e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
74 additions
and
72 deletions
+74
-72
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+10
-5
context.c
dlls/wined3d/context.c
+2
-2
device.c
dlls/wined3d/device.c
+8
-8
glsl_shader.c
dlls/wined3d/glsl_shader.c
+14
-9
nvidia_texture_shader.c
dlls/wined3d/nvidia_texture_shader.c
+1
-1
shader.c
dlls/wined3d/shader.c
+3
-6
state.c
dlls/wined3d/state.c
+10
-9
surface.c
dlls/wined3d/surface.c
+7
-7
texture.c
dlls/wined3d/texture.c
+0
-0
utils.c
dlls/wined3d/utils.c
+4
-4
volume.c
dlls/wined3d/volume.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+14
-20
No files found.
dlls/wined3d/arb_program_shader.c
View file @
c5bf96c9
...
...
@@ -503,10 +503,15 @@ static void shader_arb_load_np2fixup_constants(void *shader_priv,
continue
;
}
if
(
idx
%
2
)
{
tex_dim
[
2
]
=
tex
->
baseTexture
.
pow2Matrix
[
0
];
tex_dim
[
3
]
=
tex
->
baseTexture
.
pow2Matrix
[
5
];
}
else
{
tex_dim
[
0
]
=
tex
->
baseTexture
.
pow2Matrix
[
0
];
tex_dim
[
1
]
=
tex
->
baseTexture
.
pow2Matrix
[
5
];
if
(
idx
%
2
)
{
tex_dim
[
2
]
=
tex
->
pow2_matrix
[
0
];
tex_dim
[
3
]
=
tex
->
pow2_matrix
[
5
];
}
else
{
tex_dim
[
0
]
=
tex
->
pow2_matrix
[
0
];
tex_dim
[
1
]
=
tex
->
pow2_matrix
[
5
];
}
}
...
...
@@ -1344,7 +1349,7 @@ static void shader_hw_sample(const struct wined3d_shader_instruction *ins, DWORD
case
WINED3DSTT_2D
:
texture
=
device
->
stateBlock
->
state
.
textures
[
sampler_idx
];
if
(
texture
&&
texture
->
baseTexture
.
target
==
GL_TEXTURE_RECTANGLE_ARB
)
if
(
texture
&&
texture
->
target
==
GL_TEXTURE_RECTANGLE_ARB
)
{
tex_type
=
"RECT"
;
}
else
{
...
...
dlls/wined3d/context.c
View file @
c5bf96c9
...
...
@@ -151,10 +151,10 @@ static void context_apply_attachment_filter_states(const struct wined3d_context
update_magfilter
=
TRUE
;
}
if
(
texture
->
b
aseTexture
.
bindC
ount
)
if
(
texture
->
b
ind_c
ount
)
{
WARN
(
"Render targets should not be bound to a sampler
\n
"
);
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_SAMPLER
(
texture
->
baseTexture
.
sampler
));
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_SAMPLER
(
texture
->
sampler
));
}
if
(
update_minfilter
||
update_magfilter
)
...
...
dlls/wined3d/device.c
View file @
c5bf96c9
...
...
@@ -460,7 +460,7 @@ static void device_preload_texture(const struct wined3d_state *state, unsigned i
if
(
!
(
texture
=
state
->
textures
[
idx
]))
return
;
srgb
=
state
->
sampler_states
[
idx
][
WINED3DSAMP_SRGBTEXTURE
]
?
SRGB_SRGB
:
SRGB_RGB
;
texture
->
baseTexture
.
texture_ops
->
texture_preload
(
texture
,
srgb
);
texture
->
texture_ops
->
texture_preload
(
texture
,
srgb
);
}
void
device_preload_textures
(
IWineD3DDeviceImpl
*
device
)
...
...
@@ -4501,11 +4501,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface,
if
(
texture
)
{
LONG
bind_count
=
InterlockedIncrement
(
&
texture
->
b
aseTexture
.
bindC
ount
);
LONG
bind_count
=
InterlockedIncrement
(
&
texture
->
b
ind_c
ount
);
wined3d_texture_incref
(
texture
);
if
(
!
prev
||
texture
->
baseTexture
.
target
!=
prev
->
baseTexture
.
target
)
if
(
!
prev
||
texture
->
target
!=
prev
->
target
)
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_PIXELSHADER
);
if
(
!
prev
&&
stage
<
gl_info
->
limits
.
texture_stages
)
...
...
@@ -4518,12 +4518,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface,
}
if
(
bind_count
==
1
)
texture
->
baseTexture
.
sampler
=
stage
;
texture
->
sampler
=
stage
;
}
if
(
prev
)
{
LONG
bind_count
=
InterlockedDecrement
(
&
prev
->
b
aseTexture
.
bindC
ount
);
LONG
bind_count
=
InterlockedDecrement
(
&
prev
->
b
ind_c
ount
);
wined3d_texture_decref
(
prev
);
...
...
@@ -4533,7 +4533,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface,
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_TEXTURESTAGE
(
stage
,
WINED3DTSS_ALPHAOP
));
}
if
(
bind_count
&&
prev
->
baseTexture
.
sampler
==
stage
)
if
(
bind_count
&&
prev
->
sampler
==
stage
)
{
unsigned
int
i
;
...
...
@@ -4545,7 +4545,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface,
if
(
This
->
updateStateBlock
->
state
.
textures
[
i
]
==
prev
)
{
TRACE
(
"Texture is also bound to stage %u.
\n
"
,
i
);
prev
->
baseTexture
.
sampler
=
i
;
prev
->
sampler
=
i
;
break
;
}
}
...
...
@@ -5120,7 +5120,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture(IWineD3DDevice *iface,
}
/* Make sure that the destination texture is loaded. */
dst_texture
->
baseTexture
.
texture_ops
->
texture_preload
(
dst_texture
,
SRGB_RGB
);
dst_texture
->
texture_ops
->
texture_preload
(
dst_texture
,
SRGB_RGB
);
/* Update every surface level of the texture. */
switch
(
type
)
...
...
dlls/wined3d/glsl_shader.c
View file @
c5bf96c9
...
...
@@ -711,10 +711,15 @@ static void shader_glsl_load_np2fixup_constants(void *shader_priv,
continue
;
}
if
(
idx
%
2
)
{
tex_dim
[
2
]
=
tex
->
baseTexture
.
pow2Matrix
[
0
];
tex_dim
[
3
]
=
tex
->
baseTexture
.
pow2Matrix
[
5
];
}
else
{
tex_dim
[
0
]
=
tex
->
baseTexture
.
pow2Matrix
[
0
];
tex_dim
[
1
]
=
tex
->
baseTexture
.
pow2Matrix
[
5
];
if
(
idx
%
2
)
{
tex_dim
[
2
]
=
tex
->
pow2_matrix
[
0
];
tex_dim
[
3
]
=
tex
->
pow2_matrix
[
5
];
}
else
{
tex_dim
[
0
]
=
tex
->
pow2_matrix
[
0
];
tex_dim
[
1
]
=
tex
->
pow2_matrix
[
5
];
}
}
...
...
@@ -1065,14 +1070,14 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
texture
=
state
->
textures
[
i
];
if
(
pshader
&&
ps_args
->
shadow
&
(
1
<<
i
))
{
if
(
texture
&&
texture
->
baseTexture
.
target
==
GL_TEXTURE_RECTANGLE_ARB
)
if
(
texture
&&
texture
->
target
==
GL_TEXTURE_RECTANGLE_ARB
)
shader_addline
(
buffer
,
"uniform sampler2DRectShadow %csampler%u;
\n
"
,
prefix
,
i
);
else
shader_addline
(
buffer
,
"uniform sampler2DShadow %csampler%u;
\n
"
,
prefix
,
i
);
}
else
{
if
(
texture
&&
texture
->
baseTexture
.
target
==
GL_TEXTURE_RECTANGLE_ARB
)
if
(
texture
&&
texture
->
target
==
GL_TEXTURE_RECTANGLE_ARB
)
shader_addline
(
buffer
,
"uniform sampler2DRect %csampler%u;
\n
"
,
prefix
,
i
);
else
shader_addline
(
buffer
,
"uniform sampler2D %csampler%u;
\n
"
,
prefix
,
i
);
...
...
@@ -3079,7 +3084,7 @@ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins)
}
}
if
(
texture
&&
texture
->
baseTexture
.
target
==
GL_TEXTURE_RECTANGLE_ARB
)
if
(
texture
&&
texture
->
target
==
GL_TEXTURE_RECTANGLE_ARB
)
sample_flags
|=
WINED3D_GLSL_SAMPLE_RECT
;
shader_glsl_get_sample_function
(
ins
->
ctx
,
sampler_idx
,
sample_flags
,
&
sample_function
);
...
...
@@ -3133,7 +3138,7 @@ static void shader_glsl_texldd(const struct wined3d_shader_instruction *ins)
sampler_idx
=
ins
->
src
[
1
].
reg
.
idx
;
texture
=
device
->
stateBlock
->
state
.
textures
[
sampler_idx
];
if
(
texture
&&
texture
->
baseTexture
.
target
==
GL_TEXTURE_RECTANGLE_ARB
)
if
(
texture
&&
texture
->
target
==
GL_TEXTURE_RECTANGLE_ARB
)
sample_flags
|=
WINED3D_GLSL_SAMPLE_RECT
;
shader_glsl_get_sample_function
(
ins
->
ctx
,
sampler_idx
,
sample_flags
,
&
sample_function
);
...
...
@@ -3159,7 +3164,7 @@ static void shader_glsl_texldl(const struct wined3d_shader_instruction *ins)
sampler_idx
=
ins
->
src
[
1
].
reg
.
idx
;
texture
=
device
->
stateBlock
->
state
.
textures
[
sampler_idx
];
if
(
texture
&&
texture
->
baseTexture
.
target
==
GL_TEXTURE_RECTANGLE_ARB
)
if
(
texture
&&
texture
->
target
==
GL_TEXTURE_RECTANGLE_ARB
)
sample_flags
|=
WINED3D_GLSL_SAMPLE_RECT
;
shader_glsl_get_sample_function
(
ins
->
ctx
,
sampler_idx
,
sample_flags
,
&
sample_function
);
...
...
dlls/wined3d/nvidia_texture_shader.c
View file @
c5bf96c9
...
...
@@ -45,7 +45,7 @@ static void nvts_activate_dimensions(const struct wined3d_state *state, DWORD st
if
(
state
->
textures
[
stage
])
{
switch
(
state
->
textures
[
stage
]
->
baseTexture
.
target
)
switch
(
state
->
textures
[
stage
]
->
target
)
{
case
GL_TEXTURE_2D
:
glTexEnvi
(
GL_TEXTURE_SHADER_NV
,
GL_SHADER_OPERATION_NV
,
bumpmap
?
GL_OFFSET_TEXTURE_2D_NV
:
GL_TEXTURE_2D
);
...
...
dlls/wined3d/shader.c
View file @
c5bf96c9
...
...
@@ -2101,10 +2101,8 @@ void find_ps_compile_args(const struct wined3d_state *state,
args
->
shadow
|=
1
<<
i
;
/* Flag samplers that need NP2 texcoord fixup. */
if
(
!
texture
->
baseTexture
.
pow2Matrix_identity
)
{
if
(
!
texture
->
pow2_matrix_identity
)
args
->
np2_fixup
|=
(
1
<<
i
);
}
}
if
(
shader
->
baseShader
.
reg_maps
.
shader_version
.
major
>=
3
)
{
...
...
@@ -2332,7 +2330,7 @@ void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps, struc
continue
;
}
switch
(
textures
[
i
]
->
baseTexture
.
target
)
switch
(
textures
[
i
]
->
target
)
{
case
GL_TEXTURE_RECTANGLE_ARB
:
case
GL_TEXTURE_2D
:
...
...
@@ -2351,8 +2349,7 @@ void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps, struc
break
;
default:
FIXME
(
"Unrecognized texture type %#x, using 2D.
\n
"
,
textures
[
i
]
->
baseTexture
.
target
);
FIXME
(
"Unrecognized texture type %#x, using 2D.
\n
"
,
textures
[
i
]
->
target
);
sampler_type
[
i
]
=
WINED3DSTT_2D
;
}
}
...
...
dlls/wined3d/state.c
View file @
c5bf96c9
...
...
@@ -499,11 +499,11 @@ static void state_alpha(DWORD state, struct wined3d_stateblock *stateblock, stru
if
(
stateblock
->
state
.
textures
[
0
])
{
struct
wined3d_texture
*
texture
=
stateblock
->
state
.
textures
[
0
];
GLenum
texture_dimensions
=
texture
->
baseTexture
.
target
;
GLenum
texture_dimensions
=
texture
->
target
;
if
(
texture_dimensions
==
GL_TEXTURE_2D
||
texture_dimensions
==
GL_TEXTURE_RECTANGLE_ARB
)
{
IWineD3DSurfaceImpl
*
surf
=
surface_from_resource
(
texture
->
baseTexture
.
sub_resources
[
0
]);
IWineD3DSurfaceImpl
*
surf
=
surface_from_resource
(
texture
->
sub_resources
[
0
]);
if
(
surf
->
CKeyFlags
&
WINEDDSD_CKSRCBLT
)
{
...
...
@@ -3192,11 +3192,11 @@ void tex_alphaop(DWORD state, struct wined3d_stateblock *stateblock, struct wine
if
(
stateblock
->
state
.
render_states
[
WINED3DRS_COLORKEYENABLE
]
&&
!
stage
&&
stateblock
->
state
.
textures
[
0
])
{
struct
wined3d_texture
*
texture
=
stateblock
->
state
.
textures
[
0
];
GLenum
texture_dimensions
=
texture
->
baseTexture
.
target
;
GLenum
texture_dimensions
=
texture
->
target
;
if
(
texture_dimensions
==
GL_TEXTURE_2D
||
texture_dimensions
==
GL_TEXTURE_RECTANGLE_ARB
)
{
IWineD3DSurfaceImpl
*
surf
=
surface_from_resource
(
texture
->
baseTexture
.
sub_resources
[
0
]);
IWineD3DSurfaceImpl
*
surf
=
surface_from_resource
(
texture
->
sub_resources
[
0
]);
if
(
surf
->
CKeyFlags
&
WINEDDSD_CKSRCBLT
&&
!
surf
->
resource
.
format
->
alpha_mask
)
{
...
...
@@ -3307,7 +3307,7 @@ static void transform_texture(DWORD state_id, struct wined3d_stateblock *statebl
if
(
!
use_ps
(
state
))
{
TRACE
(
"Non power two matrix multiply fixup
\n
"
);
glMultMatrixf
(
state
->
textures
[
texUnit
]
->
baseTexture
.
pow2M
atrix
);
glMultMatrixf
(
state
->
textures
[
texUnit
]
->
pow2_m
atrix
);
}
}
}
...
...
@@ -3598,8 +3598,9 @@ static void sampler_texmatrix(DWORD state, struct wined3d_stateblock *stateblock
* The mapped stage is already active because the sampler() function below, which is part of the
* misc pipeline
*/
if
(
sampler
<
MAX_TEXTURES
)
{
const
BOOL
texIsPow2
=
!
texture
->
baseTexture
.
pow2Matrix_identity
;
if
(
sampler
<
MAX_TEXTURES
)
{
const
BOOL
texIsPow2
=
!
texture
->
pow2_matrix_identity
;
if
(
texIsPow2
||
(
context
->
lastWasPow2Texture
&
(
1
<<
sampler
)))
{
...
...
@@ -3646,7 +3647,7 @@ static void sampler(DWORD state_id, struct wined3d_stateblock *stateblock, struc
struct
wined3d_texture
*
texture
=
state
->
textures
[
sampler
];
BOOL
srgb
=
state
->
sampler_states
[
sampler
][
WINED3DSAMP_SRGBTEXTURE
];
texture
->
baseTexture
.
texture_ops
->
texture_bind
(
texture
,
gl_info
,
srgb
);
texture
->
texture_ops
->
texture_bind
(
texture
,
gl_info
,
srgb
);
wined3d_texture_apply_state_changes
(
texture
,
state
->
sampler_states
[
sampler
],
gl_info
);
if
(
gl_info
->
supported
[
EXT_TEXTURE_LOD_BIAS
])
...
...
@@ -3670,7 +3671,7 @@ static void sampler(DWORD state_id, struct wined3d_stateblock *stateblock, struc
}
/* Trigger shader constant reloading (for NP2 texcoord fixup) */
if
(
!
texture
->
baseTexture
.
pow2M
atrix_identity
)
if
(
!
texture
->
pow2_m
atrix_identity
)
{
device
->
shader_backend
->
shader_load_np2fixup_constants
(
device
->
shader_priv
,
gl_info
,
state
);
}
...
...
dlls/wined3d/surface.c
View file @
c5bf96c9
...
...
@@ -327,9 +327,9 @@ void draw_textured_quad(IWineD3DSurfaceImpl *src_surface, const RECT *src_rect,
if
(
src_surface
->
container
.
type
==
WINED3D_CONTAINER_TEXTURE
)
{
struct
wined3d_texture
*
texture
=
src_surface
->
container
.
u
.
texture
;
texture
->
baseTexture
.
texture_rgb
.
states
[
WINED3DTEXSTA_MAGFILTER
]
=
WINED3DTEXF_POINT
;
texture
->
baseTexture
.
texture_rgb
.
states
[
WINED3DTEXSTA_MINFILTER
]
=
WINED3DTEXF_POINT
;
texture
->
baseTexture
.
texture_rgb
.
states
[
WINED3DTEXSTA_MIPFILTER
]
=
WINED3DTEXF_NONE
;
texture
->
texture_rgb
.
states
[
WINED3DTEXSTA_MAGFILTER
]
=
WINED3DTEXF_POINT
;
texture
->
texture_rgb
.
states
[
WINED3DTEXSTA_MINFILTER
]
=
WINED3DTEXF_POINT
;
texture
->
texture_rgb
.
states
[
WINED3DTEXSTA_MIPFILTER
]
=
WINED3DTEXF_NONE
;
}
}
...
...
@@ -700,7 +700,7 @@ void surface_bind(IWineD3DSurfaceImpl *surface, const struct wined3d_gl_info *gl
struct
wined3d_texture
*
texture
=
surface
->
container
.
u
.
texture
;
TRACE
(
"Passing to container (%p).
\n
"
,
texture
);
texture
->
baseTexture
.
texture_ops
->
texture_bind
(
texture
,
gl_info
,
srgb
);
texture
->
texture_ops
->
texture_bind
(
texture
,
gl_info
,
srgb
);
}
else
{
...
...
@@ -1365,7 +1365,7 @@ void surface_internal_preload(IWineD3DSurfaceImpl *surface, enum WINED3DSRGB srg
struct
wined3d_texture
*
texture
=
surface
->
container
.
u
.
texture
;
TRACE
(
"Passing to container (%p).
\n
"
,
texture
);
texture
->
baseTexture
.
texture_ops
->
texture_preload
(
texture
,
srgb
);
texture
->
texture_ops
->
texture_preload
(
texture
,
srgb
);
}
else
{
...
...
@@ -1752,14 +1752,14 @@ void surface_prepare_texture(IWineD3DSurfaceImpl *surface, const struct wined3d_
if
(
surface
->
container
.
type
==
WINED3D_CONTAINER_TEXTURE
)
{
struct
wined3d_texture
*
texture
=
surface
->
container
.
u
.
texture
;
UINT
sub_count
=
texture
->
baseTexture
.
level_count
*
texture
->
baseTexture
.
layer_count
;
UINT
sub_count
=
texture
->
level_count
*
texture
->
layer_count
;
UINT
i
;
TRACE
(
"surface %p is a subresource of texture %p.
\n
"
,
surface
,
texture
);
for
(
i
=
0
;
i
<
sub_count
;
++
i
)
{
IWineD3DSurfaceImpl
*
s
=
surface_from_resource
(
texture
->
baseTexture
.
sub_resources
[
i
]);
IWineD3DSurfaceImpl
*
s
=
surface_from_resource
(
texture
->
sub_resources
[
i
]);
surface_prepare_texture_internal
(
s
,
gl_info
,
srgb
);
}
...
...
dlls/wined3d/texture.c
View file @
c5bf96c9
This diff is collapsed.
Click to expand it.
dlls/wined3d/utils.c
View file @
c5bf96c9
...
...
@@ -2803,7 +2803,7 @@ void gen_ffp_frag_op(struct wined3d_stateblock *stateblock, struct ffp_frag_sett
}
else
{
switch
(
texture
->
baseTexture
.
target
)
switch
(
texture
->
target
)
{
case
GL_TEXTURE_1D
:
settings
->
op
[
i
].
tex_type
=
tex_1d
;
...
...
@@ -2863,11 +2863,11 @@ void gen_ffp_frag_op(struct wined3d_stateblock *stateblock, struct ffp_frag_sett
GLenum
texture_dimensions
;
texture
=
stateblock
->
state
.
textures
[
0
];
texture_dimensions
=
texture
->
baseTexture
.
target
;
texture_dimensions
=
texture
->
target
;
if
(
texture_dimensions
==
GL_TEXTURE_2D
||
texture_dimensions
==
GL_TEXTURE_RECTANGLE_ARB
)
{
IWineD3DSurfaceImpl
*
surf
=
surface_from_resource
(
texture
->
baseTexture
.
sub_resources
[
0
]);
IWineD3DSurfaceImpl
*
surf
=
surface_from_resource
(
texture
->
sub_resources
[
0
]);
if
(
surf
->
CKeyFlags
&
WINEDDSD_CKSRCBLT
&&
!
surf
->
resource
.
format
->
alpha_mask
)
{
...
...
@@ -3032,7 +3032,7 @@ void texture_activate_dimensions(const struct wined3d_texture *texture, const st
{
if
(
texture
)
{
switch
(
texture
->
baseTexture
.
target
)
switch
(
texture
->
target
)
{
case
GL_TEXTURE_2D
:
glDisable
(
GL_TEXTURE_3D
);
...
...
dlls/wined3d/volume.c
View file @
c5bf96c9
...
...
@@ -59,7 +59,7 @@ static void volume_bind_and_dirtify(struct IWineD3DVolumeImpl *volume, const str
IWineD3DDeviceImpl_MarkStateDirty
(
volume
->
resource
.
device
,
STATE_SAMPLER
(
active_sampler
));
}
container
->
baseTexture
.
texture_ops
->
texture_bind
(
container
,
gl_info
,
FALSE
);
container
->
texture_ops
->
texture_bind
(
container
,
gl_info
,
FALSE
);
}
void
volume_add_dirty_box
(
struct
IWineD3DVolumeImpl
*
volume
,
const
WINED3DBOX
*
dirty_box
)
...
...
dlls/wined3d/wined3d_private.h
View file @
c5bf96c9
...
...
@@ -1888,30 +1888,25 @@ struct wined3d_texture_ops
void
(
*
texture_sub_resource_cleanup
)(
struct
wined3d_resource
*
sub_resource
);
};
typedef
struct
IWineD3DBaseTextureClass
struct
wined3d_texture
{
struct
wined3d_resource
resource
;
const
struct
wined3d_texture_ops
*
texture_ops
;
struct
gl_texture
texture_rgb
,
texture_srgb
;
struct
gl_texture
texture_rgb
,
texture_srgb
;
struct
wined3d_resource
**
sub_resources
;
UINT
layer_count
;
UINT
level_count
;
float
pow2M
atrix
[
16
];
UINT
LOD
;
WINED3DTEXTUREFILTERTYPE
filter
T
ype
;
LONG
bindC
ount
;
DWORD
sampler
;
BOOL
is_srgb
;
BOOL
pow2M
atrix_identity
;
BOOL
cond_np2
;
const
struct
min_lookup
*
min
MipL
ookup
;
const
GLenum
*
magL
ookup
;
float
pow2_m
atrix
[
16
];
UINT
lod
;
WINED3DTEXTUREFILTERTYPE
filter
_t
ype
;
LONG
bind_c
ount
;
DWORD
sampler
;
BOOL
is_srgb
;
BOOL
pow2_m
atrix_identity
;
BOOL
cond_np2
;
const
struct
min_lookup
*
min
_mip_l
ookup
;
const
GLenum
*
mag_l
ookup
;
GLenum
target
;
}
IWineD3DBaseTextureClass
;
struct
wined3d_texture
{
struct
wined3d_resource
resource
;
IWineD3DBaseTextureClass
baseTexture
;
};
static
inline
struct
wined3d_texture
*
wined3d_texture_from_resource
(
struct
wined3d_resource
*
resource
)
...
...
@@ -1923,8 +1918,7 @@ static inline struct gl_texture *wined3d_texture_get_gl_texture(struct wined3d_t
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
srgb
)
{
return
srgb
&&
!
gl_info
->
supported
[
EXT_TEXTURE_SRGB_DECODE
]
?
&
texture
->
baseTexture
.
texture_srgb
:
&
texture
->
baseTexture
.
texture_rgb
;
?
&
texture
->
texture_srgb
:
&
texture
->
texture_rgb
;
}
void
wined3d_texture_apply_state_changes
(
struct
wined3d_texture
*
texture
,
...
...
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