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
9081f8af
Commit
9081f8af
authored
Nov 13, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Implement d3d10_device_GSSetShader().
parent
a0ee8b20
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
52 additions
and
3 deletions
+52
-3
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+1
-0
device.c
dlls/d3d10core/device.c
+6
-2
shader.c
dlls/d3d10core/shader.c
+9
-0
device.c
dlls/wined3d/device.c
+19
-0
state.c
dlls/wined3d/state.c
+7
-0
utils.c
dlls/wined3d/utils.c
+2
-0
wined3d.spec
dlls/wined3d/wined3d.spec
+1
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+6
-1
wined3d.h
include/wine/wined3d.h
+1
-0
No files found.
dlls/d3d10core/d3d10core_private.h
View file @
9081f8af
...
...
@@ -191,6 +191,7 @@ struct d3d10_geometry_shader
HRESULT
d3d10_geometry_shader_init
(
struct
d3d10_geometry_shader
*
shader
,
struct
d3d10_device
*
device
,
const
void
*
byte_code
,
SIZE_T
byte_code_length
)
DECLSPEC_HIDDEN
;
struct
d3d10_geometry_shader
*
unsafe_impl_from_ID3D10GeometryShader
(
ID3D10GeometryShader
*
iface
)
DECLSPEC_HIDDEN
;
/* ID3D10PixelShader */
struct
d3d10_pixel_shader
...
...
dlls/d3d10core/device.c
View file @
9081f8af
...
...
@@ -260,8 +260,12 @@ static void STDMETHODCALLTYPE d3d10_device_GSSetConstantBuffers(ID3D10Device *if
static
void
STDMETHODCALLTYPE
d3d10_device_GSSetShader
(
ID3D10Device
*
iface
,
ID3D10GeometryShader
*
shader
)
{
if
(
shader
)
FIXME
(
"iface %p, shader %p stub!
\n
"
,
iface
,
shader
);
else
WARN
(
"iface %p, shader %p stub!
\n
"
,
iface
,
shader
);
struct
d3d10_device
*
device
=
impl_from_ID3D10Device
(
iface
);
struct
d3d10_geometry_shader
*
gs
=
unsafe_impl_from_ID3D10GeometryShader
(
shader
);
TRACE
(
"iface %p, shader %p.
\n
"
,
iface
,
shader
);
wined3d_device_set_geometry_shader
(
device
->
wined3d_device
,
gs
?
gs
->
wined3d_shader
:
NULL
);
}
static
void
STDMETHODCALLTYPE
d3d10_device_IASetPrimitiveTopology
(
ID3D10Device
*
iface
,
...
...
dlls/d3d10core/shader.c
View file @
9081f8af
...
...
@@ -420,6 +420,15 @@ HRESULT d3d10_geometry_shader_init(struct d3d10_geometry_shader *shader, struct
return
S_OK
;
}
struct
d3d10_geometry_shader
*
unsafe_impl_from_ID3D10GeometryShader
(
ID3D10GeometryShader
*
iface
)
{
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
&
d3d10_geometry_shader_vtbl
);
return
impl_from_ID3D10GeometryShader
(
iface
);
}
static
inline
struct
d3d10_pixel_shader
*
impl_from_ID3D10PixelShader
(
ID3D10PixelShader
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
d3d10_pixel_shader
,
ID3D10PixelShader_iface
);
...
...
dlls/wined3d/device.c
View file @
9081f8af
...
...
@@ -2993,6 +2993,25 @@ HRESULT CDECL wined3d_device_get_ps_consts_f(const struct wined3d_device *device
return
WINED3D_OK
;
}
void
CDECL
wined3d_device_set_geometry_shader
(
struct
wined3d_device
*
device
,
struct
wined3d_shader
*
shader
)
{
struct
wined3d_shader
*
prev
=
device
->
updateStateBlock
->
state
.
geometry_shader
;
TRACE
(
"device %p, shader %p.
\n
"
,
device
,
shader
);
if
(
shader
)
wined3d_shader_incref
(
shader
);
if
(
prev
)
wined3d_shader_decref
(
prev
);
device
->
updateStateBlock
->
state
.
geometry_shader
=
shader
;
if
(
device
->
isRecordingState
||
shader
==
prev
)
return
;
device_invalidate_state
(
device
,
STATE_GEOMETRY_SHADER
);
}
/* Context activation is done by the caller. */
/* Do not call while under the GL lock. */
#define copy_and_next(dest, src, size) memcpy(dest, src, size); dest += (size)
...
...
dlls/wined3d/state.c
View file @
9081f8af
...
...
@@ -3760,6 +3760,11 @@ void apply_pixelshader(struct wined3d_context *context, const struct wined3d_sta
context
->
load_constants
=
1
;
}
void
state_geometry_shader
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
context
->
select_shader
=
1
;
}
static
void
shader_bumpenvmat
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
DWORD
stage
=
(
state_id
-
STATE_TEXTURESTAGE
(
0
,
0
))
/
(
WINED3D_HIGHEST_TEXTURE_STATE
+
1
);
...
...
@@ -5129,6 +5134,7 @@ const struct StateEntryTemplate misc_state_template[] = {
{
STATE_BASEVERTEXINDEX
,
{
STATE_STREAMSRC
,
NULL
,
},
WINED3D_GL_EXT_NONE
},
{
STATE_FRAMEBUFFER
,
{
STATE_FRAMEBUFFER
,
context_state_fb
},
WINED3D_GL_EXT_NONE
},
{
STATE_PIXELSHADER
,
{
STATE_PIXELSHADER
,
context_state_drawbuf
},
WINED3D_GL_EXT_NONE
},
{
STATE_GEOMETRY_SHADER
,
{
STATE_GEOMETRY_SHADER
,
state_geometry_shader
},
WINED3D_GL_EXT_NONE
},
{
0
/* Terminate */
,
{
0
,
0
},
WINED3D_GL_EXT_NONE
},
};
...
...
@@ -5789,6 +5795,7 @@ static void validate_state_table(struct StateEntry *state_table)
STATE_VERTEXSHADERCONSTANT
,
STATE_PIXELSHADERCONSTANT
,
STATE_VSHADER
,
STATE_GEOMETRY_SHADER
,
STATE_PIXELSHADER
,
STATE_VIEWPORT
,
STATE_SCISSORRECT
,
...
...
dlls/wined3d/utils.c
View file @
9081f8af
...
...
@@ -2335,6 +2335,8 @@ const char *debug_d3dstate(DWORD state)
return
"STATE_VDECL"
;
if
(
STATE_IS_VSHADER
(
state
))
return
"STATE_VSHADER"
;
if
(
STATE_IS_GEOMETRY_SHADER
(
state
))
return
"STATE_GEOMETRY_SHADER"
;
if
(
STATE_IS_VIEWPORT
(
state
))
return
"STATE_VIEWPORT"
;
if
(
STATE_IS_VERTEXSHADERCONSTANT
(
state
))
...
...
dlls/wined3d/wined3d.spec
View file @
9081f8af
...
...
@@ -111,6 +111,7 @@
@ cdecl wined3d_device_set_depth_stencil(ptr ptr)
@ cdecl wined3d_device_set_dialog_box_mode(ptr long)
@ cdecl wined3d_device_set_gamma_ramp(ptr long long ptr)
@ cdecl wined3d_device_set_geometry_shader(ptr ptr)
@ cdecl wined3d_device_set_index_buffer(ptr ptr long)
@ cdecl wined3d_device_set_light(ptr long ptr)
@ cdecl wined3d_device_set_light_enable(ptr long long)
...
...
dlls/wined3d/wined3d_private.h
View file @
9081f8af
...
...
@@ -995,7 +995,10 @@ extern glMultiTexCoordFunc multi_texcoord_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC
#define STATE_VSHADER (STATE_VDECL + 1)
#define STATE_IS_VSHADER(a) ((a) == STATE_VSHADER)
#define STATE_VIEWPORT (STATE_VSHADER + 1)
#define STATE_GEOMETRY_SHADER (STATE_VSHADER + 1)
#define STATE_IS_GEOMETRY_SHADER(a) ((a) == STATE_GEOMETRY_SHADER)
#define STATE_VIEWPORT (STATE_GEOMETRY_SHADER + 1)
#define STATE_IS_VIEWPORT(a) ((a) == STATE_VIEWPORT)
#define STATE_VERTEXSHADERCONSTANT (STATE_VIEWPORT + 1)
...
...
@@ -2296,6 +2299,8 @@ struct wined3d_state
INT
vs_consts_i
[
MAX_CONST_I
*
4
];
float
*
vs_consts_f
;
struct
wined3d_shader
*
geometry_shader
;
struct
wined3d_shader
*
pixel_shader
;
BOOL
ps_consts_b
[
MAX_CONST_B
];
INT
ps_consts_i
[
MAX_CONST_I
*
4
];
...
...
include/wine/wined3d.h
View file @
9081f8af
...
...
@@ -2198,6 +2198,7 @@ void __cdecl wined3d_device_set_depth_stencil(struct wined3d_device *device, str
HRESULT
__cdecl
wined3d_device_set_dialog_box_mode
(
struct
wined3d_device
*
device
,
BOOL
enable_dialogs
);
void
__cdecl
wined3d_device_set_gamma_ramp
(
const
struct
wined3d_device
*
device
,
UINT
swapchain_idx
,
DWORD
flags
,
const
struct
wined3d_gamma_ramp
*
ramp
);
void
__cdecl
wined3d_device_set_geometry_shader
(
struct
wined3d_device
*
device
,
struct
wined3d_shader
*
shader
);
void
__cdecl
wined3d_device_set_index_buffer
(
struct
wined3d_device
*
device
,
struct
wined3d_buffer
*
index_buffer
,
enum
wined3d_format_id
format_id
);
HRESULT
__cdecl
wined3d_device_set_light
(
struct
wined3d_device
*
device
,
...
...
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