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
7a54209d
Commit
7a54209d
authored
Jan 19, 2021
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement the "precise" flag in the GLSL shader backend.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7e4f254b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
glsl_shader.c
dlls/wined3d/glsl_shader.c
+14
-0
No files found.
dlls/wined3d/glsl_shader.c
View file @
7a54209d
...
@@ -2540,6 +2540,10 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
...
@@ -2540,6 +2540,10 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
/* Temporary variables for matrix operations */
/* Temporary variables for matrix operations */
shader_addline
(
buffer
,
"vec4 tmp0;
\n
"
);
shader_addline
(
buffer
,
"vec4 tmp0;
\n
"
);
shader_addline
(
buffer
,
"vec4 tmp1;
\n
"
);
shader_addline
(
buffer
,
"vec4 tmp1;
\n
"
);
if
(
gl_info
->
supported
[
ARB_GPU_SHADER5
])
shader_addline
(
buffer
,
"precise vec4 tmp_precise;
\n
"
);
else
shader_addline
(
buffer
,
"/* precise */ vec4 tmp_precise;
\n
"
);
if
(
!
shader
->
load_local_constsF
)
if
(
!
shader
->
load_local_constsF
)
{
{
...
@@ -3273,6 +3277,9 @@ static DWORD shader_glsl_append_dst_ext(struct wined3d_string_buffer *buffer,
...
@@ -3273,6 +3277,9 @@ static DWORD shader_glsl_append_dst_ext(struct wined3d_string_buffer *buffer,
if
((
mask
=
shader_glsl_add_dst_param
(
ins
,
dst
,
&
glsl_dst
)))
if
((
mask
=
shader_glsl_add_dst_param
(
ins
,
dst
,
&
glsl_dst
)))
{
{
if
(
ins
->
flags
&
WINED3DSI_PRECISE_XYZW
)
sprintf
(
glsl_dst
.
reg_name
,
"tmp_precise"
);
switch
(
data_type
)
switch
(
data_type
)
{
{
case
WINED3D_DATA_FLOAT
:
case
WINED3D_DATA_FLOAT
:
...
@@ -3316,6 +3323,13 @@ static void shader_glsl_add_instruction_modifiers(const struct wined3d_shader_in
...
@@ -3316,6 +3323,13 @@ static void shader_glsl_add_instruction_modifiers(const struct wined3d_shader_in
if
(
!
ins
->
dst_count
)
return
;
if
(
!
ins
->
dst_count
)
return
;
if
(
ins
->
flags
&
WINED3DSI_PRECISE_XYZW
)
{
shader_glsl_add_dst_param
(
ins
,
&
ins
->
dst
[
0
],
&
dst_param
);
shader_addline
(
ins
->
ctx
->
buffer
,
"%s%s = tmp_precise%s;
\n
"
,
dst_param
.
reg_name
,
dst_param
.
mask_str
,
dst_param
.
mask_str
);
}
modifiers
=
ins
->
dst
[
0
].
modifiers
;
modifiers
=
ins
->
dst
[
0
].
modifiers
;
if
(
!
modifiers
)
return
;
if
(
!
modifiers
)
return
;
...
...
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