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
6b9118e4
Commit
6b9118e4
authored
Dec 01, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass an IWineD3DDeviceImpl pointer to alloc_private().
parent
00550613
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
20 deletions
+24
-20
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+12
-9
ati_fragment_shader.c
dlls/wined3d/ati_fragment_shader.c
+7
-6
device.c
dlls/wined3d/device.c
+2
-2
nvidia_texture_shader.c
dlls/wined3d/nvidia_texture_shader.c
+1
-1
state.c
dlls/wined3d/state.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
6b9118e4
...
@@ -5460,24 +5460,27 @@ static void arbfp_enable(BOOL enable)
...
@@ -5460,24 +5460,27 @@ static void arbfp_enable(BOOL enable)
LEAVE_GL
();
LEAVE_GL
();
}
}
static
HRESULT
arbfp_alloc
(
IWineD3DDevice
*
iface
)
{
static
HRESULT
arbfp_alloc
(
IWineD3DDevice
Impl
*
device
)
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
{
struct
shader_arb_priv
*
priv
;
struct
shader_arb_priv
*
priv
;
/* Share private data between the shader backend and the pipeline replacement, if both
/* Share private data between the shader backend and the pipeline replacement, if both
* are the arb implementation. This is needed to figure out whether ARBfp should be disabled
* are the arb implementation. This is needed to figure out whether ARBfp should be disabled
* if no pixel shader is bound or not
* if no pixel shader is bound or not
*/
*/
if
(
This
->
shader_backend
==
&
arb_program_shader_backend
)
{
if
(
device
->
shader_backend
==
&
arb_program_shader_backend
)
This
->
fragment_priv
=
This
->
shader_priv
;
{
}
else
{
device
->
fragment_priv
=
device
->
shader_priv
;
This
->
fragment_priv
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
shader_arb_priv
));
if
(
!
This
->
fragment_priv
)
return
E_OUTOFMEMORY
;
}
}
priv
=
This
->
fragment_priv
;
else
{
device
->
fragment_priv
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
shader_arb_priv
));
if
(
!
device
->
fragment_priv
)
return
E_OUTOFMEMORY
;
}
priv
=
device
->
fragment_priv
;
if
(
wine_rb_init
(
&
priv
->
fragment_shaders
,
&
wined3d_ffp_frag_program_rb_functions
)
==
-
1
)
if
(
wine_rb_init
(
&
priv
->
fragment_shaders
,
&
wined3d_ffp_frag_program_rb_functions
)
==
-
1
)
{
{
ERR
(
"Failed to initialize rbtree.
\n
"
);
ERR
(
"Failed to initialize rbtree.
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
fragment_priv
);
HeapFree
(
GetProcessHeap
(),
0
,
device
->
fragment_priv
);
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
}
}
priv
->
use_arbfp_fixed_func
=
TRUE
;
priv
->
use_arbfp_fixed_func
=
TRUE
;
...
...
dlls/wined3d/ati_fragment_shader.c
View file @
6b9118e4
...
@@ -1114,20 +1114,21 @@ static void atifs_get_caps(const struct wined3d_gl_info *gl_info, struct fragmen
...
@@ -1114,20 +1114,21 @@ static void atifs_get_caps(const struct wined3d_gl_info *gl_info, struct fragmen
caps
->
MaxSimultaneousTextures
=
6
;
caps
->
MaxSimultaneousTextures
=
6
;
}
}
static
HRESULT
atifs_alloc
(
IWineD3DDevice
*
iface
)
{
static
HRESULT
atifs_alloc
(
IWineD3DDevice
Impl
*
device
)
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
{
struct
atifs_private_data
*
priv
;
struct
atifs_private_data
*
priv
;
This
->
fragment_priv
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
atifs_private_data
));
device
->
fragment_priv
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
atifs_private_data
));
if
(
!
This
->
fragment_priv
)
{
if
(
!
device
->
fragment_priv
)
{
ERR
(
"Out of memory
\n
"
);
ERR
(
"Out of memory
\n
"
);
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
}
}
priv
=
This
->
fragment_priv
;
priv
=
device
->
fragment_priv
;
if
(
wine_rb_init
(
&
priv
->
fragment_shaders
,
&
wined3d_ffp_frag_program_rb_functions
)
==
-
1
)
if
(
wine_rb_init
(
&
priv
->
fragment_shaders
,
&
wined3d_ffp_frag_program_rb_functions
)
==
-
1
)
{
{
ERR
(
"Failed to initialize rbtree.
\n
"
);
ERR
(
"Failed to initialize rbtree.
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
fragment_priv
);
HeapFree
(
GetProcessHeap
(),
0
,
device
->
fragment_priv
);
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
}
}
return
WINED3D_OK
;
return
WINED3D_OK
;
...
...
dlls/wined3d/device.c
View file @
6b9118e4
...
@@ -1968,7 +1968,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
...
@@ -1968,7 +1968,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
TRACE
(
"Shader private data couldn't be allocated
\n
"
);
TRACE
(
"Shader private data couldn't be allocated
\n
"
);
goto
err_out
;
goto
err_out
;
}
}
hr
=
This
->
frag_pipe
->
alloc_private
(
iface
);
hr
=
This
->
frag_pipe
->
alloc_private
(
This
);
if
(
FAILED
(
hr
))
{
if
(
FAILED
(
hr
))
{
TRACE
(
"Fragment pipeline private data couldn't be allocated
\n
"
);
TRACE
(
"Fragment pipeline private data couldn't be allocated
\n
"
);
goto
err_out
;
goto
err_out
;
...
@@ -6251,7 +6251,7 @@ static HRESULT create_primary_opengl_context(IWineD3DDevice *iface, IWineD3DSwap
...
@@ -6251,7 +6251,7 @@ static HRESULT create_primary_opengl_context(IWineD3DDevice *iface, IWineD3DSwap
goto
err
;
goto
err
;
}
}
hr
=
This
->
frag_pipe
->
alloc_private
(
iface
);
hr
=
This
->
frag_pipe
->
alloc_private
(
This
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
ERR
(
"Failed to allocate fragment pipe private data, hr %#x.
\n
"
,
hr
);
ERR
(
"Failed to allocate fragment pipe private data, hr %#x.
\n
"
,
hr
);
...
...
dlls/wined3d/nvidia_texture_shader.c
View file @
6b9118e4
...
@@ -693,7 +693,7 @@ static void nvrc_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct
...
@@ -693,7 +693,7 @@ static void nvrc_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct
pCaps
->
MaxSimultaneousTextures
=
gl_info
->
limits
.
textures
;
pCaps
->
MaxSimultaneousTextures
=
gl_info
->
limits
.
textures
;
}
}
static
HRESULT
nvrc_fragment_alloc
(
IWineD3DDevice
*
ifa
ce
)
{
return
WINED3D_OK
;
}
static
HRESULT
nvrc_fragment_alloc
(
IWineD3DDevice
Impl
*
devi
ce
)
{
return
WINED3D_OK
;
}
/* Context activation is done by the caller. */
/* Context activation is done by the caller. */
static
void
nvrc_fragment_free
(
IWineD3DDevice
*
iface
)
{}
static
void
nvrc_fragment_free
(
IWineD3DDevice
*
iface
)
{}
...
...
dlls/wined3d/state.c
View file @
6b9118e4
...
@@ -5696,7 +5696,7 @@ static void ffp_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct
...
@@ -5696,7 +5696,7 @@ static void ffp_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct
pCaps
->
MaxSimultaneousTextures
=
gl_info
->
limits
.
textures
;
pCaps
->
MaxSimultaneousTextures
=
gl_info
->
limits
.
textures
;
}
}
static
HRESULT
ffp_fragment_alloc
(
IWineD3DDevice
*
ifa
ce
)
{
return
WINED3D_OK
;
}
static
HRESULT
ffp_fragment_alloc
(
IWineD3DDevice
Impl
*
devi
ce
)
{
return
WINED3D_OK
;
}
static
void
ffp_fragment_free
(
IWineD3DDevice
*
iface
)
{}
static
void
ffp_fragment_free
(
IWineD3DDevice
*
iface
)
{}
static
BOOL
ffp_color_fixup_supported
(
struct
color_fixup_desc
fixup
)
static
BOOL
ffp_color_fixup_supported
(
struct
color_fixup_desc
fixup
)
{
{
...
...
dlls/wined3d/wined3d_private.h
View file @
6b9118e4
...
@@ -1145,7 +1145,7 @@ struct fragment_pipeline
...
@@ -1145,7 +1145,7 @@ struct fragment_pipeline
{
{
void
(
*
enable_extension
)(
BOOL
enable
);
void
(
*
enable_extension
)(
BOOL
enable
);
void
(
*
get_caps
)(
const
struct
wined3d_gl_info
*
gl_info
,
struct
fragment_caps
*
caps
);
void
(
*
get_caps
)(
const
struct
wined3d_gl_info
*
gl_info
,
struct
fragment_caps
*
caps
);
HRESULT
(
*
alloc_private
)(
IWineD3DDevice
*
ifa
ce
);
HRESULT
(
*
alloc_private
)(
IWineD3DDevice
Impl
*
devi
ce
);
void
(
*
free_private
)(
IWineD3DDevice
*
iface
);
void
(
*
free_private
)(
IWineD3DDevice
*
iface
);
BOOL
(
*
color_fixup_supported
)(
struct
color_fixup_desc
fixup
);
BOOL
(
*
color_fixup_supported
)(
struct
color_fixup_desc
fixup
);
const
struct
StateEntryTemplate
*
states
;
const
struct
StateEntryTemplate
*
states
;
...
...
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