Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
vkd3d
Manage
Activity
Members
Labels
Plan
Wiki
Bugzilla
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wine
vkd3d
Commits
0afe0032
Commit
0afe0032
authored
7 years ago
by
Józef Kucia
Browse files
Options
Downloads
Patches
Plain Diff
libs/vkd3d-shader: Add VKD3D_SHADER_STRIP_DEBUG compiler option.
parent
dbfa823b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/vkd3d_shader.h
+1
-0
1 addition, 0 deletions
include/vkd3d_shader.h
libs/vkd3d-shader/spirv.c
+11
-1
11 additions, 1 deletion
libs/vkd3d-shader/spirv.c
programs/vkd3d-compiler/main.c
+4
-1
4 additions, 1 deletion
programs/vkd3d-compiler/main.c
with
16 additions
and
2 deletions
include/vkd3d_shader.h
+
1
−
0
View file @
0afe0032
...
...
@@ -28,6 +28,7 @@ extern "C" {
enum
vkd3d_shader_compiler_option
{
VKD3D_SHADER_FLIP_Y
=
0x00000001
,
VKD3D_SHADER_STRIP_DEBUG
=
0x00000002
,
VKD3D_SHADER_COMPILER_OPTIONS_FORCE_32_BIT
=
0x7fffffff
,
};
...
...
This diff is collapsed.
Click to expand it.
libs/vkd3d-shader/spirv.c
+
11
−
1
View file @
0afe0032
...
...
@@ -107,6 +107,11 @@ static void vkd3d_spirv_stream_free(struct vkd3d_spirv_stream *stream)
vkd3d_free
(
stream
->
words
);
}
static
void
vkd3d_spirv_stream_clear
(
struct
vkd3d_spirv_stream
*
stream
)
{
stream
->
word_count
=
0
;
}
static
bool
vkd3d_spirv_stream_append
(
struct
vkd3d_spirv_stream
*
dst_stream
,
const
struct
vkd3d_spirv_stream
*
src_stream
)
{
...
...
@@ -2170,7 +2175,12 @@ void vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler
bool
vkd3d_dxbc_compiler_generate_spirv
(
struct
vkd3d_dxbc_compiler
*
compiler
,
struct
vkd3d_shader_code
*
spirv
)
{
if
(
!
vkd3d_spirv_compile_module
(
&
compiler
->
spirv_builder
,
spirv
))
struct
vkd3d_spirv_builder
*
builder
=
&
compiler
->
spirv_builder
;
if
(
compiler
->
options
&
VKD3D_SHADER_STRIP_DEBUG
)
vkd3d_spirv_stream_clear
(
&
builder
->
debug_stream
);
if
(
!
vkd3d_spirv_compile_module
(
builder
,
spirv
))
return
false
;
if
(
TRACE_ON
())
...
...
This diff is collapsed.
Click to expand it.
programs/vkd3d-compiler/main.c
+
4
−
1
View file @
0afe0032
...
...
@@ -90,6 +90,7 @@ static const struct
compiler_options
[]
=
{
{
"--flip-y"
,
VKD3D_SHADER_FLIP_Y
},
{
"--strip-debug"
,
VKD3D_SHADER_STRIP_DEBUG
},
};
struct
options
...
...
@@ -142,7 +143,9 @@ int main(int argc, char **argv)
if
(
!
parse_command_line
(
argc
,
argv
,
&
options
))
{
fprintf
(
stderr
,
"usage: %s [--flip-y] [-o <out_spirv_filename>] <dxbc_filename>
\n
"
,
argv
[
0
]);
fprintf
(
stderr
,
"usage: %s [--strip-degug] [--flip-y] [-o <out_spirv_filename>] <dxbc_filename>
\n
"
,
argv
[
0
]);
return
1
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment