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
170dca77
Commit
170dca77
authored
Jun 16, 2015
by
Matteo Bruni
Committed by
Alexandre Julliard
Jun 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Handle per-vertex point size in the GLSL FFP replacement.
parent
3f3e2ba2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
6 deletions
+11
-6
visual.c
dlls/d3d8/tests/visual.c
+1
-1
visual.c
dlls/d3d9/tests/visual.c
+1
-1
context.c
dlls/wined3d/context.c
+2
-1
glsl_shader.c
dlls/wined3d/glsl_shader.c
+3
-2
utils.c
dlls/wined3d/utils.c
+2
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-1
No files found.
dlls/d3d8/tests/visual.c
View file @
170dca77
...
...
@@ -6475,7 +6475,7 @@ static void test_pointsize(void)
{
decl
,
&
vs1
,
&
ps1
,
D3DFVF_XYZ
,
32
,
32
},
{
NULL
,
&
novs
,
&
ps1
,
D3DFVF_XYZ
,
32
,
62
},
{
decl
,
&
vs1
,
&
nops
,
D3DFVF_XYZ
,
32
,
32
},
/* {NULL, &novs, &nops, D3DFVF_XYZ | D3DFVF_PSIZE, 48, 48}, */
{
NULL
,
&
novs
,
&
nops
,
D3DFVF_XYZ
|
D3DFVF_PSIZE
,
48
,
48
},
{
decl_psize
,
&
vs1_psize
,
&
ps1
,
D3DFVF_XYZ
|
D3DFVF_PSIZE
,
48
,
24
},
};
static
const
struct
...
...
dlls/d3d9/tests/visual.c
View file @
170dca77
...
...
@@ -10325,7 +10325,7 @@ static void pointsize_test(void)
{
&
vs1
,
&
ps2_zw
,
D3DFVF_XYZ
,
32
,
32
,
TRUE
,
FALSE
},
{
&
vs3
,
&
ps3
,
D3DFVF_XYZ
,
32
,
32
,
FALSE
,
TRUE
},
{
&
vs3
,
&
ps3_zw
,
D3DFVF_XYZ
,
32
,
32
,
TRUE
,
FALSE
},
/* {&novs, &nops, D3DFVF_XYZ | D3DFVF_PSIZE, 48, 48, FALSE, FALSE}, */
{
&
novs
,
&
nops
,
D3DFVF_XYZ
|
D3DFVF_PSIZE
,
48
,
48
,
FALSE
,
FALSE
},
{
&
vs1_psize
,
&
ps1
,
D3DFVF_XYZ
|
D3DFVF_PSIZE
,
48
,
24
,
FALSE
,
FALSE
},
{
&
vs3_psize
,
&
ps3
,
D3DFVF_XYZ
|
D3DFVF_PSIZE
,
48
,
24
,
FALSE
,
TRUE
},
};
...
...
dlls/wined3d/context.c
View file @
170dca77
...
...
@@ -2785,6 +2785,7 @@ void context_stream_info_from_declaration(struct wined3d_context *context,
/* We need to deal with frequency data! */
struct
wined3d_vertex_declaration
*
declaration
=
state
->
vertex_declaration
;
BOOL
use_vshader
=
use_vs
(
state
);
BOOL
generic_attributes
=
context
->
d3d_info
->
ffp_generic_attributes
;
unsigned
int
i
;
stream_info
->
use_map
=
0
;
...
...
@@ -2829,7 +2830,7 @@ void context_stream_info_from_declaration(struct wined3d_context *context,
}
else
{
if
(
!
element
->
ffp_valid
)
if
(
!
generic_attributes
&&
!
element
->
ffp_valid
)
{
WARN
(
"Skipping unsupported fixed function element of format %s and usage %s.
\n
"
,
debug_d3dformat
(
element
->
format
->
id
),
debug_d3ddeclusage
(
element
->
usage
));
...
...
dlls/wined3d/glsl_shader.c
View file @
170dca77
...
...
@@ -5867,9 +5867,10 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct wined3d_string_buffe
if
(
settings
->
point_size
)
{
shader_addline
(
buffer
,
"gl_PointSize =
ffp_point.size
/ sqrt(ffp_point.c_att"
shader_addline
(
buffer
,
"gl_PointSize =
%s
/ sqrt(ffp_point.c_att"
" + ffp_point.l_att * length(ec_pos.xyz)"
" + ffp_point.q_att * dot(ec_pos.xyz, ec_pos.xyz));
\n
"
);
" + ffp_point.q_att * dot(ec_pos.xyz, ec_pos.xyz));
\n
"
,
settings
->
per_vertex_point_size
?
"ffp_attrib_psize"
:
"ffp_point.size"
);
shader_addline
(
buffer
,
"gl_PointSize = clamp(gl_PointSize, ffp_point.size_min, ffp_point.size_max);
\n
"
);
}
...
...
dlls/wined3d/utils.c
View file @
170dca77
...
...
@@ -4514,6 +4514,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_state *state, const struct
settings
->
transformed
=
1
;
settings
->
point_size
=
state
->
gl_primitive_type
==
GL_POINTS
;
settings
->
per_vertex_point_size
=
!!
(
si
->
use_map
&
1
<<
WINED3D_FFP_PSIZE
);
if
(
!
state
->
render_states
[
WINED3D_RS_FOGENABLE
])
settings
->
fog_mode
=
WINED3D_FFP_VS_FOG_OFF
;
else
if
(
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
]
!=
WINED3D_FOG_NONE
)
...
...
@@ -4539,6 +4540,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_state *state, const struct
settings
->
lighting
=
!!
state
->
render_states
[
WINED3D_RS_LIGHTING
];
settings
->
localviewer
=
!!
state
->
render_states
[
WINED3D_RS_LOCALVIEWER
];
settings
->
point_size
=
state
->
gl_primitive_type
==
GL_POINTS
;
settings
->
per_vertex_point_size
=
!!
(
si
->
use_map
&
1
<<
WINED3D_FFP_PSIZE
);
if
(
state
->
render_states
[
WINED3D_RS_COLORVERTEX
]
&&
(
si
->
use_map
&
(
1
<<
WINED3D_FFP_DIFFUSE
)))
{
...
...
dlls/wined3d/wined3d_private.h
View file @
170dca77
...
...
@@ -1894,10 +1894,11 @@ struct wined3d_ffp_vs_settings
DWORD
lighting
:
1
;
DWORD
localviewer
:
1
;
DWORD
point_size
:
1
;
DWORD
per_vertex_point_size
:
1
;
DWORD
fog_mode
:
2
;
DWORD
texcoords
:
8
;
/* MAX_TEXTURES */
DWORD
ortho_fog
:
1
;
DWORD
padding
:
1
4
;
DWORD
padding
:
1
3
;
DWORD
texgen
[
MAX_TEXTURES
];
};
...
...
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