Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
4a698749
Commit
4a698749
authored
Nov 30, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass an IWineD3DDeviceImpl pointer to shader_alloc_private().
parent
77923346
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+3
-3
device.c
dlls/wined3d/device.c
+2
-2
glsl_shader.c
dlls/wined3d/glsl_shader.c
+4
-4
shader.c
dlls/wined3d/shader.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
4a698749
...
@@ -4744,8 +4744,8 @@ static const struct wine_rb_functions sig_tree_functions =
...
@@ -4744,8 +4744,8 @@ static const struct wine_rb_functions sig_tree_functions =
sig_tree_compare
sig_tree_compare
};
};
static
HRESULT
shader_arb_alloc
(
IWineD3DDevice
*
iface
)
{
static
HRESULT
shader_arb_alloc
(
IWineD3DDevice
Impl
*
device
)
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
{
struct
shader_arb_priv
*
priv
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
priv
));
struct
shader_arb_priv
*
priv
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
priv
));
if
(
wine_rb_init
(
&
priv
->
signature_tree
,
&
sig_tree_functions
)
==
-
1
)
if
(
wine_rb_init
(
&
priv
->
signature_tree
,
&
sig_tree_functions
)
==
-
1
)
{
{
...
@@ -4753,7 +4753,7 @@ static HRESULT shader_arb_alloc(IWineD3DDevice *iface) {
...
@@ -4753,7 +4753,7 @@ static HRESULT shader_arb_alloc(IWineD3DDevice *iface) {
HeapFree
(
GetProcessHeap
(),
0
,
priv
);
HeapFree
(
GetProcessHeap
(),
0
,
priv
);
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
}
}
This
->
shader_priv
=
priv
;
device
->
shader_priv
=
priv
;
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
...
...
dlls/wined3d/device.c
View file @
4a698749
...
@@ -1963,7 +1963,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
...
@@ -1963,7 +1963,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
if
(
This
->
depth_stencil
)
if
(
This
->
depth_stencil
)
IWineD3DSurface_AddRef
((
IWineD3DSurface
*
)
This
->
depth_stencil
);
IWineD3DSurface_AddRef
((
IWineD3DSurface
*
)
This
->
depth_stencil
);
hr
=
This
->
shader_backend
->
shader_alloc_private
(
iface
);
hr
=
This
->
shader_backend
->
shader_alloc_private
(
This
);
if
(
FAILED
(
hr
))
{
if
(
FAILED
(
hr
))
{
TRACE
(
"Shader private data couldn't be allocated
\n
"
);
TRACE
(
"Shader private data couldn't be allocated
\n
"
);
goto
err_out
;
goto
err_out
;
...
@@ -6244,7 +6244,7 @@ static HRESULT create_primary_opengl_context(IWineD3DDevice *iface, IWineD3DSwap
...
@@ -6244,7 +6244,7 @@ static HRESULT create_primary_opengl_context(IWineD3DDevice *iface, IWineD3DSwap
create_dummy_textures
(
This
);
create_dummy_textures
(
This
);
context_release
(
context
);
context_release
(
context
);
hr
=
This
->
shader_backend
->
shader_alloc_private
(
iface
);
hr
=
This
->
shader_backend
->
shader_alloc_private
(
This
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
ERR
(
"Failed to allocate shader private data, hr %#x.
\n
"
,
hr
);
ERR
(
"Failed to allocate shader private data, hr %#x.
\n
"
,
hr
);
...
...
dlls/wined3d/glsl_shader.c
View file @
4a698749
...
@@ -4818,9 +4818,9 @@ static const struct wine_rb_functions wined3d_glsl_program_rb_functions =
...
@@ -4818,9 +4818,9 @@ static const struct wine_rb_functions wined3d_glsl_program_rb_functions =
glsl_program_key_compare
,
glsl_program_key_compare
,
};
};
static
HRESULT
shader_glsl_alloc
(
IWineD3DDevice
*
iface
)
{
static
HRESULT
shader_glsl_alloc
(
IWineD3DDevice
Impl
*
device
)
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
{
const
struct
wined3d_gl_info
*
gl_info
=
&
This
->
adapter
->
gl_info
;
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
struct
shader_glsl_priv
*
priv
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
shader_glsl_priv
));
struct
shader_glsl_priv
*
priv
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
shader_glsl_priv
));
SIZE_T
stack_size
=
wined3d_log2i
(
max
(
gl_info
->
limits
.
glsl_vs_float_constants
,
SIZE_T
stack_size
=
wined3d_log2i
(
max
(
gl_info
->
limits
.
glsl_vs_float_constants
,
gl_info
->
limits
.
glsl_ps_float_constants
))
+
1
;
gl_info
->
limits
.
glsl_ps_float_constants
))
+
1
;
...
@@ -4858,7 +4858,7 @@ static HRESULT shader_glsl_alloc(IWineD3DDevice *iface) {
...
@@ -4858,7 +4858,7 @@ static HRESULT shader_glsl_alloc(IWineD3DDevice *iface) {
priv
->
next_constant_version
=
1
;
priv
->
next_constant_version
=
1
;
This
->
shader_priv
=
priv
;
device
->
shader_priv
=
priv
;
return
WINED3D_OK
;
return
WINED3D_OK
;
fail:
fail:
...
...
dlls/wined3d/shader.c
View file @
4a698749
...
@@ -1519,7 +1519,7 @@ static void shader_none_load_constants(const struct wined3d_context *context, ch
...
@@ -1519,7 +1519,7 @@ static void shader_none_load_constants(const struct wined3d_context *context, ch
static
void
shader_none_load_np2fixup_constants
(
void
*
shader_priv
,
static
void
shader_none_load_np2fixup_constants
(
void
*
shader_priv
,
const
struct
wined3d_gl_info
*
gl_info
,
const
struct
wined3d_state
*
state
)
{}
const
struct
wined3d_gl_info
*
gl_info
,
const
struct
wined3d_state
*
state
)
{}
static
void
shader_none_destroy
(
IWineD3DBaseShader
*
iface
)
{}
static
void
shader_none_destroy
(
IWineD3DBaseShader
*
iface
)
{}
static
HRESULT
shader_none_alloc
(
IWineD3DDevice
*
ifa
ce
)
{
return
WINED3D_OK
;}
static
HRESULT
shader_none_alloc
(
IWineD3DDevice
Impl
*
devi
ce
)
{
return
WINED3D_OK
;}
static
void
shader_none_free
(
IWineD3DDevice
*
iface
)
{}
static
void
shader_none_free
(
IWineD3DDevice
*
iface
)
{}
static
BOOL
shader_none_dirty_const
(
IWineD3DDevice
*
iface
)
{
return
FALSE
;}
static
BOOL
shader_none_dirty_const
(
IWineD3DDevice
*
iface
)
{
return
FALSE
;}
...
...
dlls/wined3d/wined3d_private.h
View file @
4a698749
...
@@ -759,7 +759,7 @@ typedef struct {
...
@@ -759,7 +759,7 @@ typedef struct {
void
(
*
shader_load_np2fixup_constants
)(
void
*
shader_priv
,
const
struct
wined3d_gl_info
*
gl_info
,
void
(
*
shader_load_np2fixup_constants
)(
void
*
shader_priv
,
const
struct
wined3d_gl_info
*
gl_info
,
const
struct
wined3d_state
*
state
);
const
struct
wined3d_state
*
state
);
void
(
*
shader_destroy
)(
IWineD3DBaseShader
*
iface
);
void
(
*
shader_destroy
)(
IWineD3DBaseShader
*
iface
);
HRESULT
(
*
shader_alloc_private
)(
IWineD3DDevice
*
ifa
ce
);
HRESULT
(
*
shader_alloc_private
)(
IWineD3DDevice
Impl
*
devi
ce
);
void
(
*
shader_free_private
)(
IWineD3DDevice
*
iface
);
void
(
*
shader_free_private
)(
IWineD3DDevice
*
iface
);
BOOL
(
*
shader_dirtifyable_constants
)(
IWineD3DDevice
*
iface
);
BOOL
(
*
shader_dirtifyable_constants
)(
IWineD3DDevice
*
iface
);
void
(
*
shader_get_caps
)(
const
struct
wined3d_gl_info
*
gl_info
,
struct
shader_caps
*
caps
);
void
(
*
shader_get_caps
)(
const
struct
wined3d_gl_info
*
gl_info
,
struct
shader_caps
*
caps
);
...
...
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