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
a33d3ad4
Commit
a33d3ad4
authored
Mar 24, 2015
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add support for SV_InstanceID.
parent
f9fafb36
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
glsl_shader.c
dlls/wined3d/glsl_shader.c
+9
-4
wined3d.h
include/wine/wined3d.h
+1
-0
No files found.
dlls/wined3d/glsl_shader.c
View file @
a33d3ad4
...
...
@@ -1182,11 +1182,14 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
if
(
version
->
type
==
WINED3D_SHADER_TYPE_VERTEX
)
{
/* Declare attributes. */
for
(
i
=
0
,
map
=
reg_maps
->
input_registers
;
map
;
map
>>=
1
,
++
i
)
for
(
i
=
0
;
i
<
shader
->
input_signature
.
element_count
;
++
i
)
{
if
(
map
&
1
)
shader_addline
(
buffer
,
"attribute vec4 %s_in%u;
\n
"
,
prefix
,
i
);
const
struct
wined3d_shader_signature_element
*
e
=
&
shader
->
input_signature
.
elements
[
i
];
if
(
e
->
sysval_semantic
==
WINED3D_SV_INSTANCEID
)
shader_addline
(
buffer
,
"vec4 %s_in%u = vec4(intBitsToFloat(gl_InstanceID), 0.0, 0.0, 0.0);
\n
"
,
prefix
,
e
->
register_idx
);
else
shader_addline
(
buffer
,
"attribute vec4 %s_in%u;
\n
"
,
prefix
,
e
->
register_idx
);
}
shader_addline
(
buffer
,
"uniform vec4 posFixup;
\n
"
);
...
...
@@ -4588,6 +4591,8 @@ static GLuint shader_glsl_generate_vshader(const struct wined3d_context *context
shader_addline
(
buffer
,
"#version 120
\n
"
);
if
(
gl_info
->
supported
[
ARB_DRAW_INSTANCED
])
shader_addline
(
buffer
,
"#extension GL_ARB_draw_instanced : enable
\n
"
);
if
(
gl_info
->
supported
[
ARB_SHADER_BIT_ENCODING
])
shader_addline
(
buffer
,
"#extension GL_ARB_shader_bit_encoding : enable
\n
"
);
if
(
gl_info
->
supported
[
ARB_UNIFORM_BUFFER_OBJECT
])
...
...
include/wine/wined3d.h
View file @
a33d3ad4
...
...
@@ -768,6 +768,7 @@ enum wined3d_decl_usage
enum
wined3d_sysval_semantic
{
WINED3D_SV_POSITION
=
1
,
WINED3D_SV_INSTANCEID
=
8
,
WINED3D_SV_DEPTH
=
0xffffffff
,
WINED3D_SV_TARGET0
=
0
,
...
...
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