Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
67529025
Commit
67529025
authored
Feb 25, 2019
by
Paul Gofman
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use UBO for vertex shader float constants if supported.
parent
fea8be0e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
15 additions
and
2 deletions
+15
-2
directx.c
dlls/d3d8/directx.c
+1
-1
directx.c
dlls/d3d9/directx.c
+1
-1
adapter_gl.c
dlls/wined3d/adapter_gl.c
+3
-0
glsl_shader.c
dlls/wined3d/glsl_shader.c
+0
-0
shader.c
dlls/wined3d/shader.c
+2
-0
state.c
dlls/wined3d/state.c
+5
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-0
wined3d.h
include/wine/wined3d.h
+1
-0
No files found.
dlls/d3d8/directx.c
View file @
67529025
...
...
@@ -476,7 +476,7 @@ BOOL d3d8_init(struct d3d8 *d3d8)
DWORD
flags
=
WINED3D_LEGACY_DEPTH_BIAS
|
WINED3D_VIDMEM_ACCOUNTING
|
WINED3D_HANDLE_RESTORE
|
WINED3D_PIXEL_CENTER_INTEGER
|
WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR
|
WINED3D_NO_PRIMITIVE_RESTART
|
WINED3D_LEGACY_CUBEMAP_FILTERING
;
|
WINED3D_LEGACY_CUBEMAP_FILTERING
|
WINED3D_LEGACY_SHADER_CONSTANTS
;
unsigned
int
adapter_idx
,
output_idx
,
adapter_count
,
output_count
=
0
;
struct
wined3d_adapter
*
wined3d_adapter
;
...
...
dlls/d3d9/directx.c
View file @
67529025
...
...
@@ -686,7 +686,7 @@ BOOL d3d9_init(struct d3d9 *d3d9, BOOL extended)
DWORD
flags
=
WINED3D_PRESENT_CONVERSION
|
WINED3D_HANDLE_RESTORE
|
WINED3D_PIXEL_CENTER_INTEGER
|
WINED3D_SRGB_READ_WRITE_CONTROL
|
WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR
|
WINED3D_NO_PRIMITIVE_RESTART
|
WINED3D_LEGACY_CUBEMAP_FILTERING
|
WINED3D_NORMALIZED_DEPTH_BIAS
;
|
WINED3D_NORMALIZED_DEPTH_BIAS
|
WINED3D_LEGACY_SHADER_CONSTANTS
;
unsigned
int
adapter_idx
,
output_idx
,
adapter_count
,
output_count
=
0
;
struct
wined3d_adapter
*
wined3d_adapter
;
...
...
dlls/wined3d/adapter_gl.c
View file @
67529025
...
...
@@ -3107,6 +3107,9 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
gl_info
->
limits
.
uniform_blocks
[
WINED3D_SHADER_TYPE_VERTEX
]
=
min
(
gl_max
,
WINED3D_MAX_CBS
);
TRACE
(
"Max vertex uniform blocks: %u (%d).
\n
"
,
gl_info
->
limits
.
uniform_blocks
[
WINED3D_SHADER_TYPE_VERTEX
],
gl_max
);
gl_info
->
gl_ops
.
gl
.
p_glGetIntegerv
(
GL_MAX_UNIFORM_BLOCK_SIZE
,
&
gl_max
);
gl_info
->
limits
.
glsl_max_uniform_block_size
=
gl_max
;
TRACE
(
"Max uniform block size %u.
\n
"
,
gl_max
);
}
}
if
(
gl_info
->
supported
[
ARB_TESSELLATION_SHADER
])
...
...
dlls/wined3d/glsl_shader.c
View file @
67529025
This diff is collapsed.
Click to expand it.
dlls/wined3d/shader.c
View file @
67529025
...
...
@@ -765,6 +765,8 @@ static BOOL shader_record_register_usage(struct wined3d_shader *shader, struct w
}
else
{
if
(
reg
->
idx
[
0
].
offset
>=
reg_maps
->
constant_float_count
)
reg_maps
->
constant_float_count
=
reg
->
idx
[
0
].
offset
+
1
;
wined3d_insert_bits
(
reg_maps
->
constf
,
reg
->
idx
[
0
].
offset
,
1
,
0x1
);
}
}
...
...
dlls/wined3d/state.c
View file @
67529025
...
...
@@ -4583,6 +4583,11 @@ static void state_cb(struct wined3d_context *context, const struct wined3d_state
struct
wined3d_bo_gl
*
bo_gl
;
TRACE
(
"context %p, state %p, state_id %#x.
\n
"
,
context
,
state
,
state_id
);
if
(
context
->
d3d_info
->
wined3d_creation_flags
&
WINED3D_LEGACY_SHADER_CONSTANTS
)
{
WARN
(
"Called in legacy shader constant mode.
\n
"
);
return
;
}
if
(
STATE_IS_GRAPHICS_CONSTANT_BUFFER
(
state_id
))
shader_type
=
state_id
-
STATE_GRAPHICS_CONSTANT_BUFFER
(
0
);
...
...
dlls/wined3d/wined3d_private.h
View file @
67529025
...
...
@@ -1171,6 +1171,7 @@ struct wined3d_shader_reg_maps
struct
wined3d_shader_tgsm
*
tgsm
;
SIZE_T
tgsm_capacity
;
unsigned
int
tgsm_count
;
UINT
constant_float_count
;
};
/* Keeps track of details for TEX_M#x# instructions which need to maintain
...
...
@@ -3312,6 +3313,7 @@ struct wined3d_gl_limits
UINT
glsl_varyings
;
UINT
glsl_vs_float_constants
;
UINT
glsl_ps_float_constants
;
UINT
glsl_max_uniform_block_size
;
UINT
arb_vs_float_constants
;
UINT
arb_vs_native_constants
;
...
...
include/wine/wined3d.h
View file @
67529025
...
...
@@ -1349,6 +1349,7 @@ enum wined3d_memory_segment_group
#define WINED3D_NO_PRIMITIVE_RESTART 0x00000800
#define WINED3D_LEGACY_CUBEMAP_FILTERING 0x00001000
#define WINED3D_NORMALIZED_DEPTH_BIAS 0x00002000
#define WINED3D_LEGACY_SHADER_CONSTANTS 0x00004000
#define WINED3D_RESZ_CODE 0x7fa05000
...
...
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