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
eb4d20ef
Commit
eb4d20ef
authored
Sep 23, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Take the data type of immediates into account in shader_glsl_get_register_name().
parent
6909b514
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
4 deletions
+40
-4
glsl_shader.c
dlls/wined3d/glsl_shader.c
+40
-4
No files found.
dlls/wined3d/glsl_shader.c
View file @
eb4d20ef
...
...
@@ -1478,13 +1478,49 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
switch
(
reg
->
immconst_type
)
{
case
WINED3D_IMMCONST_SCALAR
:
sprintf
(
register_name
,
"%.8e"
,
*
(
const
float
*
)
reg
->
immconst_data
);
switch
(
reg
->
data_type
)
{
case
WINED3D_DATA_FLOAT
:
sprintf
(
register_name
,
"%.8e"
,
*
(
const
float
*
)
reg
->
immconst_data
);
break
;
case
WINED3D_DATA_INT
:
sprintf
(
register_name
,
"%#x"
,
reg
->
immconst_data
[
0
]);
break
;
case
WINED3D_DATA_RESOURCE
:
case
WINED3D_DATA_SAMPLER
:
case
WINED3D_DATA_UINT
:
sprintf
(
register_name
,
"%#xu"
,
reg
->
immconst_data
[
0
]);
break
;
default:
sprintf
(
register_name
,
"<unhandled data type %#x>"
,
reg
->
data_type
);
break
;
}
break
;
case
WINED3D_IMMCONST_VEC4
:
sprintf
(
register_name
,
"vec4(%.8e, %.8e, %.8e, %.8e)"
,
*
(
const
float
*
)
&
reg
->
immconst_data
[
0
],
*
(
const
float
*
)
&
reg
->
immconst_data
[
1
],
*
(
const
float
*
)
&
reg
->
immconst_data
[
2
],
*
(
const
float
*
)
&
reg
->
immconst_data
[
3
]);
switch
(
reg
->
data_type
)
{
case
WINED3D_DATA_FLOAT
:
sprintf
(
register_name
,
"vec4(%.8e, %.8e, %.8e, %.8e)"
,
*
(
const
float
*
)
&
reg
->
immconst_data
[
0
],
*
(
const
float
*
)
&
reg
->
immconst_data
[
1
],
*
(
const
float
*
)
&
reg
->
immconst_data
[
2
],
*
(
const
float
*
)
&
reg
->
immconst_data
[
3
]);
break
;
case
WINED3D_DATA_INT
:
sprintf
(
register_name
,
"ivec4(%#x, %#x, %#x, %#x)"
,
reg
->
immconst_data
[
0
],
reg
->
immconst_data
[
1
],
reg
->
immconst_data
[
2
],
reg
->
immconst_data
[
3
]);
break
;
case
WINED3D_DATA_RESOURCE
:
case
WINED3D_DATA_SAMPLER
:
case
WINED3D_DATA_UINT
:
sprintf
(
register_name
,
"uvec4(%#xu, %#xu, %#xu, %#xu)"
,
reg
->
immconst_data
[
0
],
reg
->
immconst_data
[
1
],
reg
->
immconst_data
[
2
],
reg
->
immconst_data
[
3
]);
break
;
default:
sprintf
(
register_name
,
"<unhandled data type %#x>"
,
reg
->
data_type
);
break
;
}
break
;
default:
...
...
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