Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VkCV Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor 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
Vulkan2021
VkCV Framework
Merge requests
!82
Resolve "Upscaling Module"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Upscaling Module"
100-upscaling-module
into
develop
Overview
0
Commits
23
Pipelines
26
Changes
42
Merged
Tobias Frisch
requested to merge
100-upscaling-module
into
develop
3 years ago
Overview
0
Commits
23
Pipelines
26
Changes
42
Expand
Closes
#100 (closed)
Edited
3 years ago
by
Tobias Frisch
0
0
Merge request reports
Compare
develop
version 24
ad334731
3 years ago
version 23
29954143
3 years ago
version 22
736e17fc
3 years ago
version 21
5a3767f0
3 years ago
version 20
aa337bd8
3 years ago
version 19
71d66bc3
3 years ago
version 18
b3e2ed57
3 years ago
version 17
2581e667
3 years ago
version 16
05331786
3 years ago
version 15
0e64fc6e
3 years ago
version 14
f78774b9
3 years ago
version 13
b5a9e4ea
3 years ago
version 12
8a46f8d7
3 years ago
version 11
7b62621b
3 years ago
version 10
5e8b5de4
3 years ago
version 9
9c0f3c31
3 years ago
version 8
72f71946
3 years ago
version 7
02c6b99c
3 years ago
version 6
e10fc80e
3 years ago
version 5
a6e00a4d
3 years ago
version 4
3899d568
3 years ago
version 3
36a70784
3 years ago
version 2
27780b2d
3 years ago
version 1
a7694ca0
3 years ago
develop (base)
and
latest version
latest version
10417182
23 commits,
3 years ago
version 24
ad334731
22 commits,
3 years ago
version 23
29954143
21 commits,
3 years ago
version 22
736e17fc
20 commits,
3 years ago
version 21
5a3767f0
19 commits,
3 years ago
version 20
aa337bd8
18 commits,
3 years ago
version 19
71d66bc3
17 commits,
3 years ago
version 18
b3e2ed57
16 commits,
3 years ago
version 17
2581e667
15 commits,
3 years ago
version 16
05331786
14 commits,
3 years ago
version 15
0e64fc6e
13 commits,
3 years ago
version 14
f78774b9
12 commits,
3 years ago
version 13
b5a9e4ea
11 commits,
3 years ago
version 12
8a46f8d7
10 commits,
3 years ago
version 11
7b62621b
9 commits,
3 years ago
version 10
5e8b5de4
8 commits,
3 years ago
version 9
9c0f3c31
7 commits,
3 years ago
version 8
72f71946
6 commits,
3 years ago
version 7
02c6b99c
5 commits,
3 years ago
version 6
e10fc80e
4 commits,
3 years ago
version 5
a6e00a4d
3 commits,
3 years ago
version 4
3899d568
3 commits,
3 years ago
version 3
36a70784
3 commits,
3 years ago
version 2
27780b2d
2 commits,
3 years ago
version 1
a7694ca0
1 commit,
3 years ago
42 files
+
1446
−
286
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
42
Search (e.g. *.vue) (Ctrl+P)
config/ext/IncludeShader.cmake
0 → 100644
+
75
−
0
Options
function
(
include_shader shader include_dir source_dir
)
if
(
NOT EXISTS
${
shader
}
)
message
(
WARNING
"Shader file does not exist:
${
shader
}
"
)
else
()
get_filename_component
(
filename
${
shader
}
NAME
)
file
(
SIZE
${
shader
}
filesize
)
set
(
include_target_file
${
include_dir
}
/
${
filename
}
.hxx
)
set
(
source_target_file
${
source_dir
}
/
${
filename
}
.cxx
)
if
((
EXISTS
${
source_target_file
}
)
AND
(
EXISTS
${
include_target_file
}
))
file
(
TIMESTAMP
${
shader
}
shader_timestamp
"%Y-%m-%dT%H:%M:%S"
)
file
(
TIMESTAMP
${
source_target_file
}
source_timestamp
"%Y-%m-%dT%H:%M:%S"
)
string
(
COMPARE GREATER
${
shader_timestamp
}
${
source_timestamp
}
shader_update
)
else
()
set
(
shader_update true
)
endif
()
if
(
shader_update
)
string
(
TOUPPER
${
filename
}
varname
)
string
(
REPLACE
"."
"_"
varname
${
varname
}
)
set
(
shader_header
"#pragma once
\n
"
)
string
(
APPEND shader_header
"// This file is auto-generated via cmake, so don't touch it!
\n
"
)
string
(
APPEND shader_header
"extern unsigned char
${
varname
}
[
${
filesize
}
]
\;\n
"
)
string
(
APPEND shader_header
"extern unsigned int
${
varname
}
_LEN
\;\n
"
)
string
(
APPEND shader_header
"const std::string
${
varname
}
_SHADER (reinterpret_cast<const char*>(
${
varname
}
),
${
varname
}
_LEN)
\;
"
)
file
(
WRITE
${
include_target_file
}
${
shader_header
}
)
find_program
(
xxd_program
"xxd"
)
if
(
EXISTS
${
xxd_program
}
)
get_filename_component
(
shader_directory
${
shader
}
DIRECTORY
)
add_custom_command
(
OUTPUT
${
source_target_file
}
WORKING_DIRECTORY
"
${
shader_directory
}
"
COMMAND xxd -i -C
"
${
filename
}
"
"
${
source_target_file
}
"
COMMENT
"Processing shader into source files:
${
shader
}
"
)
else
()
set
(
shader_source
"// This file is auto-generated via cmake, so don't touch it!
\n
"
)
string
(
APPEND shader_source
"unsigned char
${
varname
}
[] = {"
)
math
(
EXPR max_fileoffset
"
${
filesize
}
- 1"
OUTPUT_FORMAT DECIMAL
)
message
(
STATUS
"Processing shader into source files:
${
shader
}
"
)
foreach
(
fileoffset RANGE
${
max_fileoffset
}
)
file
(
READ
${
shader
}
shader_source_byte OFFSET
${
fileoffset
}
LIMIT 1 HEX
)
math
(
EXPR offset_modulo
"
${
fileoffset
}
% 12"
OUTPUT_FORMAT DECIMAL
)
if
(
${
offset_modulo
}
EQUAL 0
)
string
(
APPEND shader_source
"
\n
"
)
endif
()
if
(
${
fileoffset
}
LESS
${
max_fileoffset
}
)
string
(
APPEND shader_source
"0x
${
shader_source_byte
}
, "
)
else
()
string
(
APPEND shader_source
"0x
${
shader_source_byte
}
\n
"
)
endif
()
endforeach
()
string
(
APPEND shader_source
"}
\;\n
"
)
string
(
APPEND shader_source
"unsigned int
${
varname
}
_LEN =
${
filesize
}
\;
"
)
file
(
WRITE
${
source_target_file
}
${
shader_source
}
)
endif
()
endif
()
endif
()
endfunction
()
Loading