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
c8f26a13
Commit
c8f26a13
authored
Jun 05, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Rename IWineD3DDeviceImpl_MarkStateDirty() to device_invalidate_state().
parent
708d9421
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
38 additions
and
47 deletions
+38
-47
buffer.c
dlls/wined3d/buffer.c
+8
-14
context.c
dlls/wined3d/context.c
+2
-2
device.c
dlls/wined3d/device.c
+0
-0
drawprim.c
dlls/wined3d/drawprim.c
+10
-9
surface.c
dlls/wined3d/surface.c
+10
-12
swapchain.c
dlls/wined3d/swapchain.c
+5
-5
texture.c
dlls/wined3d/texture.c
+1
-1
volume.c
dlls/wined3d/volume.c
+1
-3
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/buffer.c
View file @
c8f26a13
...
...
@@ -147,10 +147,8 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This, const struc
goto
fail
;
}
if
(
This
->
buffer_type_hint
==
GL_ELEMENT_ARRAY_BUFFER_ARB
)
{
IWineD3DDeviceImpl_MarkStateDirty
(
This
->
resource
.
device
,
STATE_INDEXBUFFER
);
}
if
(
This
->
buffer_type_hint
==
GL_ELEMENT_ARRAY_BUFFER_ARB
)
device_invalidate_state
(
This
->
resource
.
device
,
STATE_INDEXBUFFER
);
GL_EXTCALL
(
glBindBufferARB
(
This
->
buffer_type_hint
,
This
->
buffer_object
));
error
=
glGetError
();
if
(
error
!=
GL_NO_ERROR
)
...
...
@@ -513,9 +511,7 @@ BYTE *buffer_get_sysmem(struct wined3d_buffer *This, const struct wined3d_gl_inf
This
->
resource
.
allocatedMemory
=
(
BYTE
*
)(((
ULONG_PTR
)
This
->
resource
.
heapMemory
+
(
RESOURCE_ALIGNMENT
-
1
))
&
~
(
RESOURCE_ALIGNMENT
-
1
));
if
(
This
->
buffer_type_hint
==
GL_ELEMENT_ARRAY_BUFFER_ARB
)
{
IWineD3DDeviceImpl_MarkStateDirty
(
This
->
resource
.
device
,
STATE_INDEXBUFFER
);
}
device_invalidate_state
(
This
->
resource
.
device
,
STATE_INDEXBUFFER
);
ENTER_GL
();
GL_EXTCALL
(
glBindBufferARB
(
This
->
buffer_type_hint
,
This
->
buffer_object
));
...
...
@@ -833,7 +829,7 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
* is not valid any longer. Dirtify the stream source to force a
* reload. This happens only once per changed vertexbuffer and
* should occur rather rarely. */
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_STREAMSRC
);
device_invalidate_state
(
device
,
STATE_STREAMSRC
);
return
;
}
...
...
@@ -864,7 +860,7 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
FIXME
(
"Too many full buffer conversions, stopping converting.
\n
"
);
buffer_unload
(
&
buffer
->
resource
);
buffer
->
flags
&=
~
WINED3D_BUFFER_CREATEBO
;
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_STREAMSRC
);
device_invalidate_state
(
device
,
STATE_STREAMSRC
);
return
;
}
}
...
...
@@ -879,7 +875,7 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
}
if
(
buffer
->
buffer_type_hint
==
GL_ELEMENT_ARRAY_BUFFER_ARB
)
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_INDEXBUFFER
);
device_invalidate_state
(
device
,
STATE_INDEXBUFFER
);
if
(
!
buffer
->
conversion_map
)
{
...
...
@@ -1044,7 +1040,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
const
struct
wined3d_gl_info
*
gl_info
;
if
(
buffer
->
buffer_type_hint
==
GL_ELEMENT_ARRAY_BUFFER_ARB
)
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_INDEXBUFFER
);
device_invalidate_state
(
device
,
STATE_INDEXBUFFER
);
context
=
context_acquire
(
device
,
NULL
);
gl_info
=
context
->
gl_info
;
...
...
@@ -1148,9 +1144,7 @@ void CDECL wined3d_buffer_unmap(struct wined3d_buffer *buffer)
struct
wined3d_context
*
context
;
if
(
buffer
->
buffer_type_hint
==
GL_ELEMENT_ARRAY_BUFFER_ARB
)
{
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_INDEXBUFFER
);
}
device_invalidate_state
(
device
,
STATE_INDEXBUFFER
);
context
=
context_acquire
(
device
,
NULL
);
gl_info
=
context
->
gl_info
;
...
...
dlls/wined3d/context.c
View file @
c8f26a13
...
...
@@ -154,7 +154,7 @@ static void context_apply_attachment_filter_states(const struct wined3d_context
if
(
texture
->
bind_count
)
{
WARN
(
"Render targets should not be bound to a sampler
\n
"
);
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_SAMPLER
(
texture
->
sampler
));
device_invalidate_state
(
device
,
STATE_SAMPLER
(
texture
->
sampler
));
}
if
(
update_minfilter
||
update_magfilter
)
...
...
@@ -1147,7 +1147,7 @@ static void context_enter(struct wined3d_context *context)
* Context_MarkStateDirty
*
* Marks a state in a context dirty. Only one context, opposed to
*
IWineD3DDeviceImpl_MarkStateDirty
, which marks the state dirty in all
*
device_invalidate_state()
, which marks the state dirty in all
* contexts
*
* Params:
...
...
dlls/wined3d/device.c
View file @
c8f26a13
This diff is collapsed.
Click to expand it.
dlls/wined3d/drawprim.c
View file @
c8f26a13
...
...
@@ -853,8 +853,9 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct WineD3DRectPatch
*/
glPolygonMode
(
GL_FRONT_AND_BACK
,
GL_FILL
);
checkGLcall
(
"glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)"
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_RENDER
(
WINED3DRS_FILLMODE
));
if
(
patch
->
has_normals
)
{
device_invalidate_state
(
This
,
STATE_RENDER
(
WINED3DRS_FILLMODE
));
if
(
patch
->
has_normals
)
{
static
const
GLfloat
black
[]
=
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
};
static
const
GLfloat
red
[]
=
{
1
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
};
static
const
GLfloat
green
[]
=
{
0
.
0
f
,
1
.
0
f
,
0
.
0
f
,
0
.
0
f
};
...
...
@@ -864,30 +865,30 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct WineD3DRectPatch
checkGLcall
(
"glEnable(GL_LIGHTING)"
);
glLightModelfv
(
GL_LIGHT_MODEL_AMBIENT
,
black
);
checkGLcall
(
"glLightModel for MODEL_AMBIENT"
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_RENDER
(
WINED3DRS_AMBIENT
));
device_invalidate_state
(
This
,
STATE_RENDER
(
WINED3DRS_AMBIENT
));
for
(
i
=
3
;
i
<
context
->
gl_info
->
limits
.
lights
;
++
i
)
{
glDisable
(
GL_LIGHT0
+
i
);
checkGLcall
(
"glDisable(GL_LIGHT0 + i)"
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_ACTIVELIGHT
(
i
));
device_invalidate_state
(
This
,
STATE_ACTIVELIGHT
(
i
));
}
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_ACTIVELIGHT
(
0
));
device_invalidate_state
(
This
,
STATE_ACTIVELIGHT
(
0
));
glLightfv
(
GL_LIGHT0
,
GL_DIFFUSE
,
red
);
glLightfv
(
GL_LIGHT0
,
GL_SPECULAR
,
black
);
glLightfv
(
GL_LIGHT0
,
GL_AMBIENT
,
black
);
glLightfv
(
GL_LIGHT0
,
GL_POSITION
,
red
);
glEnable
(
GL_LIGHT0
);
checkGLcall
(
"Setting up light 1"
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_ACTIVELIGHT
(
1
));
device_invalidate_state
(
This
,
STATE_ACTIVELIGHT
(
1
));
glLightfv
(
GL_LIGHT1
,
GL_DIFFUSE
,
green
);
glLightfv
(
GL_LIGHT1
,
GL_SPECULAR
,
black
);
glLightfv
(
GL_LIGHT1
,
GL_AMBIENT
,
black
);
glLightfv
(
GL_LIGHT1
,
GL_POSITION
,
green
);
glEnable
(
GL_LIGHT1
);
checkGLcall
(
"Setting up light 2"
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_ACTIVELIGHT
(
2
));
device_invalidate_state
(
This
,
STATE_ACTIVELIGHT
(
2
));
glLightfv
(
GL_LIGHT2
,
GL_DIFFUSE
,
blue
);
glLightfv
(
GL_LIGHT2
,
GL_SPECULAR
,
black
);
glLightfv
(
GL_LIGHT2
,
GL_AMBIENT
,
black
);
...
...
@@ -895,8 +896,8 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct WineD3DRectPatch
glEnable
(
GL_LIGHT2
);
checkGLcall
(
"Setting up light 3"
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_MATERIAL
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_RENDER
(
WINED3DRS_COLORVERTEX
));
device_invalidate_state
(
This
,
STATE_MATERIAL
);
device_invalidate_state
(
This
,
STATE_RENDER
(
WINED3DRS_COLORVERTEX
));
glDisable
(
GL_COLOR_MATERIAL
);
glMaterialfv
(
GL_FRONT_AND_BACK
,
GL_EMISSION
,
black
);
glMaterialfv
(
GL_FRONT_AND_BACK
,
GL_SPECULAR
,
black
);
...
...
dlls/wined3d/surface.c
View file @
c8f26a13
...
...
@@ -608,9 +608,7 @@ static void surface_bind_and_dirtify(struct wined3d_surface *surface,
active_sampler
=
device
->
rev_tex_unit_map
[
active_texture
-
GL_TEXTURE0_ARB
];
if
(
active_sampler
!=
WINED3D_UNMAPPED_STAGE
)
{
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_SAMPLER
(
active_sampler
));
}
device_invalidate_state
(
device
,
STATE_SAMPLER
(
active_sampler
));
surface_bind
(
surface
,
gl_info
,
srgb
);
}
...
...
@@ -1147,21 +1145,21 @@ static void wined3d_surface_depth_blt_fbo(struct wined3d_device *device, struct
if
(
gl_mask
&
GL_DEPTH_BUFFER_BIT
)
{
glDepthMask
(
GL_TRUE
);
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_RENDER
(
WINED3DRS_ZWRITEENABLE
));
device_invalidate_state
(
device
,
STATE_RENDER
(
WINED3DRS_ZWRITEENABLE
));
}
if
(
gl_mask
&
GL_STENCIL_BUFFER_BIT
)
{
if
(
context
->
gl_info
->
supported
[
EXT_STENCIL_TWO_SIDE
])
{
glDisable
(
GL_STENCIL_TEST_TWO_SIDE_EXT
);
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_RENDER
(
WINED3DRS_TWOSIDEDSTENCILMODE
));
device_invalidate_state
(
device
,
STATE_RENDER
(
WINED3DRS_TWOSIDEDSTENCILMODE
));
}
glStencilMask
(
~
0U
);
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_RENDER
(
WINED3DRS_STENCILWRITEMASK
));
device_invalidate_state
(
device
,
STATE_RENDER
(
WINED3DRS_STENCILWRITEMASK
));
}
glDisable
(
GL_SCISSOR_TEST
);
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_RENDER
(
WINED3DRS_SCISSORTESTENABLE
));
device_invalidate_state
(
device
,
STATE_RENDER
(
WINED3DRS_SCISSORTESTENABLE
));
gl_info
->
fbo_ops
.
glBlitFramebuffer
(
src_rect
->
left
,
src_rect
->
top
,
src_rect
->
right
,
src_rect
->
bottom
,
dst_rect
->
left
,
dst_rect
->
top
,
dst_rect
->
right
,
dst_rect
->
bottom
,
gl_mask
,
GL_NEAREST
);
...
...
@@ -5100,13 +5098,13 @@ static void surface_blt_fbo(struct wined3d_device *device, const WINED3DTEXTUREF
context_check_fbo_status
(
context
,
GL_DRAW_FRAMEBUFFER
);
glColorMask
(
GL_TRUE
,
GL_TRUE
,
GL_TRUE
,
GL_TRUE
);
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
));
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE1
));
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE2
));
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE3
));
device_invalidate_state
(
device
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
));
device_invalidate_state
(
device
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE1
));
device_invalidate_state
(
device
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE2
));
device_invalidate_state
(
device
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE3
));
glDisable
(
GL_SCISSOR_TEST
);
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_RENDER
(
WINED3DRS_SCISSORTESTENABLE
));
device_invalidate_state
(
device
,
STATE_RENDER
(
WINED3DRS_SCISSORTESTENABLE
));
gl_info
->
fbo_ops
.
glBlitFramebuffer
(
src_rect
.
left
,
src_rect
.
top
,
src_rect
.
right
,
src_rect
.
bottom
,
dst_rect
.
left
,
dst_rect
.
top
,
dst_rect
.
right
,
dst_rect
.
bottom
,
GL_COLOR_BUFFER_BIT
,
gl_filter
);
...
...
dlls/wined3d/swapchain.c
View file @
c8f26a13
...
...
@@ -311,13 +311,13 @@ static void swapchain_blit(struct wined3d_swapchain *swapchain,
context_set_draw_buffer
(
context
,
GL_BACK
);
glColorMask
(
GL_TRUE
,
GL_TRUE
,
GL_TRUE
,
GL_TRUE
);
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
));
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE1
));
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE2
));
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE3
));
device_invalidate_state
(
device
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
));
device_invalidate_state
(
device
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE1
));
device_invalidate_state
(
device
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE2
));
device_invalidate_state
(
device
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE3
));
glDisable
(
GL_SCISSOR_TEST
);
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_RENDER
(
WINED3DRS_SCISSORTESTENABLE
));
device_invalidate_state
(
device
,
STATE_RENDER
(
WINED3DRS_SCISSORTESTENABLE
));
/* Note that the texture is upside down */
gl_info
->
fbo_ops
.
glBlitFramebuffer
(
src_rect
->
left
,
src_rect
->
top
,
src_rect
->
right
,
src_rect
->
bottom
,
...
...
dlls/wined3d/texture.c
View file @
c8f26a13
...
...
@@ -521,7 +521,7 @@ DWORD CDECL wined3d_texture_set_lod(struct wined3d_texture *texture, DWORD lod)
texture
->
texture_rgb
.
states
[
WINED3DTEXSTA_MAXMIPLEVEL
]
=
~
0U
;
texture
->
texture_srgb
.
states
[
WINED3DTEXSTA_MAXMIPLEVEL
]
=
~
0U
;
if
(
texture
->
bind_count
)
IWineD3DDeviceImpl_MarkStateDirty
(
texture
->
resource
.
device
,
STATE_SAMPLER
(
texture
->
sampler
));
device_invalidate_state
(
texture
->
resource
.
device
,
STATE_SAMPLER
(
texture
->
sampler
));
}
return
old
;
...
...
dlls/wined3d/volume.c
View file @
c8f26a13
...
...
@@ -53,9 +53,7 @@ static void volume_bind_and_dirtify(struct wined3d_volume *volume, const struct
}
if
(
active_sampler
!=
WINED3D_UNMAPPED_STAGE
)
{
IWineD3DDeviceImpl_MarkStateDirty
(
volume
->
resource
.
device
,
STATE_SAMPLER
(
active_sampler
));
}
device_invalidate_state
(
volume
->
resource
.
device
,
STATE_SAMPLER
(
active_sampler
));
container
->
texture_ops
->
texture_bind
(
container
,
gl_info
,
FALSE
);
}
...
...
dlls/wined3d/wined3d_private.h
View file @
c8f26a13
...
...
@@ -1793,7 +1793,7 @@ void device_switch_onscreen_ds(struct wined3d_device *device, struct wined3d_con
struct
wined3d_surface
*
depth_stencil
)
DECLSPEC_HIDDEN
;
void
device_update_stream_info
(
struct
wined3d_device
*
device
,
const
struct
wined3d_gl_info
*
gl_info
)
DECLSPEC_HIDDEN
;
void
device_update_tex_unit_map
(
struct
wined3d_device
*
device
)
DECLSPEC_HIDDEN
;
void
IWineD3DDeviceImpl_MarkStateDirty
(
struct
wined3d_device
*
device
,
DWORD
state
)
DECLSPEC_HIDDEN
;
void
device_invalidate_state
(
struct
wined3d_device
*
device
,
DWORD
state
)
DECLSPEC_HIDDEN
;
static
inline
BOOL
isStateDirty
(
struct
wined3d_context
*
context
,
DWORD
state
)
{
...
...
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