mirror of https://github.com/godotengine/godot
Merge pull request #57948 from akien-mga/vulkan-1.3.204
This commit is contained in:
commit
36892b7fc8
|
|
@ -169,7 +169,7 @@ Files extracted from upstream source:
|
||||||
## glslang
|
## glslang
|
||||||
|
|
||||||
- Upstream: https://github.com/KhronosGroup/glslang
|
- Upstream: https://github.com/KhronosGroup/glslang
|
||||||
- Version: 11.6.0 (2fb89a0072ae7316af1c856f22663fde4928128a, 2021)
|
- Version: 11.8.0 (c34bb3b6c55f6ab084124ad964be95a699700d34, 2022)
|
||||||
- License: glslang
|
- License: glslang
|
||||||
|
|
||||||
Version should be kept in sync with the one of the used Vulkan SDK (see `vulkan`
|
Version should be kept in sync with the one of the used Vulkan SDK (see `vulkan`
|
||||||
|
|
@ -182,8 +182,8 @@ copy of `DefaultTBuiltInResource` is in sync with the one defined upstream in
|
||||||
|
|
||||||
Files extracted from upstream source:
|
Files extracted from upstream source:
|
||||||
|
|
||||||
- `glslang` (except `glslang/HLSL`), `OGLCompilersDLL`, `SPIRV`,
|
- `glslang` (except `glslang/HLSL` and `glslang/ExtensionHeaders`),
|
||||||
minus the `CInterface` folders (depends on `StandAlone`)
|
`OGLCompilersDLL`, `SPIRV`, w/o `CInterface` folders (depend on `StandAlone`)
|
||||||
- Run `cmake . && make` and copy generated `include/glslang/build_info.h`
|
- Run `cmake . && make` and copy generated `include/glslang/build_info.h`
|
||||||
to `glslang/build_info.h`
|
to `glslang/build_info.h`
|
||||||
- `LICENSE.txt`
|
- `LICENSE.txt`
|
||||||
|
|
@ -552,7 +552,7 @@ Godot. Please check the file to know what's new.
|
||||||
## spirv-reflect
|
## spirv-reflect
|
||||||
|
|
||||||
- Upstream: https://github.com/KhronosGroup/SPIRV-Reflect
|
- Upstream: https://github.com/KhronosGroup/SPIRV-Reflect
|
||||||
- Version: git (cc937caab141d889c9c9dff572c5a6854d5cf9b4, 2021)
|
- Version: git (1aceb6af56e74b92a00378842dda5c5a73f49a4b, 2022)
|
||||||
- License: Apache 2.0
|
- License: Apache 2.0
|
||||||
|
|
||||||
Does not track Vulkan SDK releases closely, but try to package a commit newer
|
Does not track Vulkan SDK releases closely, but try to package a commit newer
|
||||||
|
|
@ -631,7 +631,7 @@ folder.
|
||||||
## volk
|
## volk
|
||||||
|
|
||||||
- Upstream: https://github.com/zeux/volk
|
- Upstream: https://github.com/zeux/volk
|
||||||
- Version: 1.2.190 (760a782f295a66de7391d6ed573d65e3fb1c8450, 2021)
|
- Version: 1.3.204 (92ba7c9f112a82cecf452ebf4b7c46f149a5799e, 2022)
|
||||||
- License: MIT
|
- License: MIT
|
||||||
|
|
||||||
Unless there is a specific reason to package a more recent version, please stick
|
Unless there is a specific reason to package a more recent version, please stick
|
||||||
|
|
@ -651,7 +651,7 @@ Files extracted from upstream source:
|
||||||
## vulkan
|
## vulkan
|
||||||
|
|
||||||
- Upstream: https://github.com/KhronosGroup/Vulkan-Headers
|
- Upstream: https://github.com/KhronosGroup/Vulkan-Headers
|
||||||
- Version: 1.2.190 (9e62d027636cd7210f60d934f56107ed6e1579b8, 2021)
|
- Version: 1.3.204 (1dace16d8044758d32736eb59802d171970e9448, 2022)
|
||||||
- License: Apache 2.0
|
- License: Apache 2.0
|
||||||
|
|
||||||
The vendored version should be kept in sync with volk, see above.
|
The vendored version should be kept in sync with volk, see above.
|
||||||
|
|
|
||||||
|
|
@ -303,41 +303,647 @@ APACHE LICENSE, VERSION 2.0
|
||||||
GPL 3 with special bison exception
|
GPL 3 with special bison exception
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Bison implementation for Yacc-like parsers in C
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
Preamble
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
The GNU General Public License is a free, copyleft license for
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
software and other kinds of works.
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
The licenses for most software and other practical works are designed
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
As a special exception, you may create a larger work that contains
|
When we speak of free software, we are referring to freedom, not
|
||||||
part or all of the Bison parser skeleton and distribute that work
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
under terms of your choice, so long as that work isn't itself a
|
have the freedom to distribute copies of free software (and charge for
|
||||||
parser generator using the skeleton or a modified version thereof
|
them if you wish), that you receive source code or can get it if you
|
||||||
as a parser skeleton. Alternatively, if you modify or redistribute
|
want it, that you can change the software or use pieces of it in new
|
||||||
the parser skeleton itself, you may (at your option) remove this
|
free programs, and that you know you can do these things.
|
||||||
special exception, which will cause the skeleton and the resulting
|
|
||||||
Bison output files to be licensed under the GNU General Public
|
|
||||||
License without this special exception.
|
|
||||||
|
|
||||||
This special exception was added by the Free Software Foundation in
|
To protect your rights, we need to prevent others from denying you
|
||||||
version 2.2 of Bison.
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
Bison Exception
|
||||||
|
|
||||||
|
As a special exception, you may create a larger work that contains part or all
|
||||||
|
of the Bison parser skeleton and distribute that work under terms of your
|
||||||
|
choice, so long as that work isn't itself a parser generator using the skeleton
|
||||||
|
or a modified version thereof as a parser skeleton. Alternatively, if you
|
||||||
|
modify or redistribute the parser skeleton itself, you may (at your option)
|
||||||
|
remove this special exception, which will cause the skeleton and the resulting
|
||||||
|
Bison output files to be licensed under the GNU General Public License without
|
||||||
|
this special exception.
|
||||||
|
|
||||||
|
This special exception was added by the Free Software Foundation in version
|
||||||
|
2.2 of Bison.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
================================================================================
|
================================================================================
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
The preprocessor has the core licenses stated above, plus an additional licence:
|
The preprocessor has the core licenses stated above, plus additional licences:
|
||||||
|
|
||||||
/****************************************************************************\
|
/****************************************************************************\
|
||||||
Copyright (c) 2002, NVIDIA Corporation.
|
Copyright (c) 2002, NVIDIA Corporation.
|
||||||
|
|
@ -382,3 +988,29 @@ NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
|
||||||
TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
|
TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
|
||||||
NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
\****************************************************************************/
|
\****************************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Copyright (c) 2014-2016 The Khronos Group Inc.
|
||||||
|
**
|
||||||
|
** Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
** of this software and/or associated documentation files (the "Materials"),
|
||||||
|
** to deal in the Materials without restriction, including without limitation
|
||||||
|
** the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
** and/or sell copies of the Materials, and to permit persons to whom the
|
||||||
|
** Materials are furnished to do so, subject to the following conditions:
|
||||||
|
**
|
||||||
|
** The above copyright notice and this permission notice shall be included in
|
||||||
|
** all copies or substantial portions of the Materials.
|
||||||
|
**
|
||||||
|
** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
|
||||||
|
** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
|
||||||
|
** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
|
||||||
|
**
|
||||||
|
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
|
||||||
|
** IN THE MATERIALS.
|
||||||
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1256,8 +1256,10 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
|
||||||
if (type.getBasicType() == glslang::EbtRayQuery)
|
if (type.getBasicType() == glslang::EbtRayQuery)
|
||||||
return spv::StorageClassPrivate;
|
return spv::StorageClassPrivate;
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
if (type.getQualifier().isSpirvByReference())
|
if (type.getQualifier().isSpirvByReference()) {
|
||||||
return spv::StorageClassFunction;
|
if (type.getQualifier().isParamInput() || type.getQualifier().isParamOutput())
|
||||||
|
return spv::StorageClassFunction;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if (type.getQualifier().isPipeInput())
|
if (type.getQualifier().isPipeInput())
|
||||||
return spv::StorageClassInput;
|
return spv::StorageClassInput;
|
||||||
|
|
@ -1662,9 +1664,22 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
||||||
|
|
||||||
case EShLangCompute:
|
case EShLangCompute:
|
||||||
builder.addCapability(spv::CapabilityShader);
|
builder.addCapability(spv::CapabilityShader);
|
||||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeLocalSize, glslangIntermediate->getLocalSize(0),
|
if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) {
|
||||||
glslangIntermediate->getLocalSize(1),
|
std::vector<spv::Id> dimConstId;
|
||||||
glslangIntermediate->getLocalSize(2));
|
for (int dim = 0; dim < 3; ++dim) {
|
||||||
|
bool specConst = (glslangIntermediate->getLocalSizeSpecId(dim) != glslang::TQualifier::layoutNotSet);
|
||||||
|
dimConstId.push_back(builder.makeUintConstant(glslangIntermediate->getLocalSize(dim), specConst));
|
||||||
|
if (specConst) {
|
||||||
|
builder.addDecoration(dimConstId.back(), spv::DecorationSpecId,
|
||||||
|
glslangIntermediate->getLocalSizeSpecId(dim));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
builder.addExecutionModeId(shaderEntry, spv::ExecutionModeLocalSizeId, dimConstId);
|
||||||
|
} else {
|
||||||
|
builder.addExecutionMode(shaderEntry, spv::ExecutionModeLocalSize, glslangIntermediate->getLocalSize(0),
|
||||||
|
glslangIntermediate->getLocalSize(1),
|
||||||
|
glslangIntermediate->getLocalSize(2));
|
||||||
|
}
|
||||||
if (glslangIntermediate->getLayoutDerivativeModeNone() == glslang::LayoutDerivativeGroupQuads) {
|
if (glslangIntermediate->getLayoutDerivativeModeNone() == glslang::LayoutDerivativeGroupQuads) {
|
||||||
builder.addCapability(spv::CapabilityComputeDerivativeGroupQuadsNV);
|
builder.addCapability(spv::CapabilityComputeDerivativeGroupQuadsNV);
|
||||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeDerivativeGroupQuadsNV);
|
builder.addExecutionMode(shaderEntry, spv::ExecutionModeDerivativeGroupQuadsNV);
|
||||||
|
|
@ -1768,9 +1783,22 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
||||||
case EShLangMeshNV:
|
case EShLangMeshNV:
|
||||||
builder.addCapability(spv::CapabilityMeshShadingNV);
|
builder.addCapability(spv::CapabilityMeshShadingNV);
|
||||||
builder.addExtension(spv::E_SPV_NV_mesh_shader);
|
builder.addExtension(spv::E_SPV_NV_mesh_shader);
|
||||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeLocalSize, glslangIntermediate->getLocalSize(0),
|
if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) {
|
||||||
glslangIntermediate->getLocalSize(1),
|
std::vector<spv::Id> dimConstId;
|
||||||
glslangIntermediate->getLocalSize(2));
|
for (int dim = 0; dim < 3; ++dim) {
|
||||||
|
bool specConst = (glslangIntermediate->getLocalSizeSpecId(dim) != glslang::TQualifier::layoutNotSet);
|
||||||
|
dimConstId.push_back(builder.makeUintConstant(glslangIntermediate->getLocalSize(dim), specConst));
|
||||||
|
if (specConst) {
|
||||||
|
builder.addDecoration(dimConstId.back(), spv::DecorationSpecId,
|
||||||
|
glslangIntermediate->getLocalSizeSpecId(dim));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
builder.addExecutionModeId(shaderEntry, spv::ExecutionModeLocalSizeId, dimConstId);
|
||||||
|
} else {
|
||||||
|
builder.addExecutionMode(shaderEntry, spv::ExecutionModeLocalSize, glslangIntermediate->getLocalSize(0),
|
||||||
|
glslangIntermediate->getLocalSize(1),
|
||||||
|
glslangIntermediate->getLocalSize(2));
|
||||||
|
}
|
||||||
if (glslangIntermediate->getStage() == EShLangMeshNV) {
|
if (glslangIntermediate->getStage() == EShLangMeshNV) {
|
||||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices,
|
builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices,
|
||||||
glslangIntermediate->getVertices());
|
glslangIntermediate->getVertices());
|
||||||
|
|
@ -1830,10 +1858,10 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
||||||
std::vector<spv::Id> operandIds;
|
std::vector<spv::Id> operandIds;
|
||||||
assert(!modeId.second.empty());
|
assert(!modeId.second.empty());
|
||||||
for (auto extraOperand : modeId.second) {
|
for (auto extraOperand : modeId.second) {
|
||||||
int nextConst = 0;
|
if (extraOperand->getType().getQualifier().isSpecConstant())
|
||||||
spv::Id operandId = createSpvConstantFromConstUnionArray(
|
operandIds.push_back(getSymbolId(extraOperand->getAsSymbolNode()));
|
||||||
extraOperand->getType(), extraOperand->getConstArray(), nextConst, false);
|
else
|
||||||
operandIds.push_back(operandId);
|
operandIds.push_back(createSpvConstant(*extraOperand));
|
||||||
}
|
}
|
||||||
builder.addExecutionModeId(shaderEntry, static_cast<spv::ExecutionMode>(modeId.first), operandIds);
|
builder.addExecutionModeId(shaderEntry, static_cast<spv::ExecutionMode>(modeId.first), operandIds);
|
||||||
}
|
}
|
||||||
|
|
@ -3384,7 +3412,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||||
const auto& spirvInst = node->getSpirvInstruction();
|
const auto& spirvInst = node->getSpirvInstruction();
|
||||||
if (spirvInst.set == "") {
|
if (spirvInst.set == "") {
|
||||||
std::vector<spv::IdImmediate> idImmOps;
|
std::vector<spv::IdImmediate> idImmOps;
|
||||||
for (int i = 0; i < glslangOperands.size(); ++i) {
|
for (unsigned int i = 0; i < glslangOperands.size(); ++i) {
|
||||||
if (glslangOperands[i]->getAsTyped()->getQualifier().isSpirvLiteral()) {
|
if (glslangOperands[i]->getAsTyped()->getQualifier().isSpirvLiteral()) {
|
||||||
// Translate the constant to a literal value
|
// Translate the constant to a literal value
|
||||||
std::vector<unsigned> literals;
|
std::vector<unsigned> literals;
|
||||||
|
|
@ -3777,7 +3805,16 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T
|
||||||
|
|
||||||
switch (node->getFlowOp()) {
|
switch (node->getFlowOp()) {
|
||||||
case glslang::EOpKill:
|
case glslang::EOpKill:
|
||||||
builder.makeStatementTerminator(spv::OpKill, "post-discard");
|
if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) {
|
||||||
|
if (glslangIntermediate->getSource() == glslang::EShSourceHlsl) {
|
||||||
|
builder.addCapability(spv::CapabilityDemoteToHelperInvocation);
|
||||||
|
builder.createNoResultOp(spv::OpDemoteToHelperInvocationEXT);
|
||||||
|
} else {
|
||||||
|
builder.makeStatementTerminator(spv::OpTerminateInvocation, "post-terminate-invocation");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
builder.makeStatementTerminator(spv::OpKill, "post-discard");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case glslang::EOpTerminateInvocation:
|
case glslang::EOpTerminateInvocation:
|
||||||
builder.addExtension(spv::E_SPV_KHR_terminate_invocation);
|
builder.addExtension(spv::E_SPV_KHR_terminate_invocation);
|
||||||
|
|
@ -3940,12 +3977,14 @@ spv::Id TGlslangToSpvTraverser::getSampledType(const glslang::TSampler& sampler)
|
||||||
builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float_fetch);
|
builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float_fetch);
|
||||||
builder.addCapability(spv::CapabilityFloat16ImageAMD);
|
builder.addCapability(spv::CapabilityFloat16ImageAMD);
|
||||||
return builder.makeFloatType(16);
|
return builder.makeFloatType(16);
|
||||||
case glslang::EbtInt64: return builder.makeIntType(64);
|
case glslang::EbtInt64:
|
||||||
builder.addExtension(spv::E_SPV_EXT_shader_image_int64);
|
builder.addExtension(spv::E_SPV_EXT_shader_image_int64);
|
||||||
builder.addCapability(spv::CapabilityFloat16ImageAMD);
|
builder.addCapability(spv::CapabilityInt64ImageEXT);
|
||||||
case glslang::EbtUint64: return builder.makeUintType(64);
|
return builder.makeIntType(64);
|
||||||
|
case glslang::EbtUint64:
|
||||||
builder.addExtension(spv::E_SPV_EXT_shader_image_int64);
|
builder.addExtension(spv::E_SPV_EXT_shader_image_int64);
|
||||||
builder.addCapability(spv::CapabilityFloat16ImageAMD);
|
builder.addCapability(spv::CapabilityInt64ImageEXT);
|
||||||
|
return builder.makeUintType(64);
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
|
|
@ -4146,68 +4185,55 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
|
||||||
const auto& spirvType = type.getSpirvType();
|
const auto& spirvType = type.getSpirvType();
|
||||||
const auto& spirvInst = spirvType.spirvInst;
|
const auto& spirvInst = spirvType.spirvInst;
|
||||||
|
|
||||||
std::vector<spv::Id> operands;
|
std::vector<spv::IdImmediate> operands;
|
||||||
for (const auto& typeParam : spirvType.typeParams) {
|
for (const auto& typeParam : spirvType.typeParams) {
|
||||||
if (typeParam.isConstant) {
|
// Constant expression
|
||||||
// Constant expression
|
if (typeParam.constant->isLiteral()) {
|
||||||
if (typeParam.constant->isLiteral()) {
|
if (typeParam.constant->getBasicType() == glslang::EbtFloat) {
|
||||||
if (typeParam.constant->getBasicType() == glslang::EbtFloat) {
|
float floatValue = static_cast<float>(typeParam.constant->getConstArray()[0].getDConst());
|
||||||
float floatValue = static_cast<float>(typeParam.constant->getConstArray()[0].getDConst());
|
unsigned literal = *reinterpret_cast<unsigned*>(&floatValue);
|
||||||
unsigned literal = *reinterpret_cast<unsigned*>(&floatValue);
|
operands.push_back({false, literal});
|
||||||
operands.push_back(literal);
|
} else if (typeParam.constant->getBasicType() == glslang::EbtInt) {
|
||||||
} else if (typeParam.constant->getBasicType() == glslang::EbtInt) {
|
unsigned literal = typeParam.constant->getConstArray()[0].getIConst();
|
||||||
unsigned literal = typeParam.constant->getConstArray()[0].getIConst();
|
operands.push_back({false, literal});
|
||||||
operands.push_back(literal);
|
} else if (typeParam.constant->getBasicType() == glslang::EbtUint) {
|
||||||
} else if (typeParam.constant->getBasicType() == glslang::EbtUint) {
|
unsigned literal = typeParam.constant->getConstArray()[0].getUConst();
|
||||||
unsigned literal = typeParam.constant->getConstArray()[0].getUConst();
|
operands.push_back({false, literal});
|
||||||
operands.push_back(literal);
|
} else if (typeParam.constant->getBasicType() == glslang::EbtBool) {
|
||||||
} else if (typeParam.constant->getBasicType() == glslang::EbtBool) {
|
unsigned literal = typeParam.constant->getConstArray()[0].getBConst();
|
||||||
unsigned literal = typeParam.constant->getConstArray()[0].getBConst();
|
operands.push_back({false, literal});
|
||||||
operands.push_back(literal);
|
} else if (typeParam.constant->getBasicType() == glslang::EbtString) {
|
||||||
} else if (typeParam.constant->getBasicType() == glslang::EbtString) {
|
auto str = typeParam.constant->getConstArray()[0].getSConst()->c_str();
|
||||||
auto str = typeParam.constant->getConstArray()[0].getSConst()->c_str();
|
unsigned literal = 0;
|
||||||
unsigned literal = 0;
|
char* literalPtr = reinterpret_cast<char*>(&literal);
|
||||||
char* literalPtr = reinterpret_cast<char*>(&literal);
|
unsigned charCount = 0;
|
||||||
unsigned charCount = 0;
|
char ch = 0;
|
||||||
char ch = 0;
|
do {
|
||||||
do {
|
ch = *(str++);
|
||||||
ch = *(str++);
|
*(literalPtr++) = ch;
|
||||||
*(literalPtr++) = ch;
|
++charCount;
|
||||||
++charCount;
|
if (charCount == 4) {
|
||||||
if (charCount == 4) {
|
operands.push_back({false, literal});
|
||||||
operands.push_back(literal);
|
literalPtr = reinterpret_cast<char*>(&literal);
|
||||||
literalPtr = reinterpret_cast<char*>(&literal);
|
charCount = 0;
|
||||||
charCount = 0;
|
|
||||||
}
|
|
||||||
} while (ch != 0);
|
|
||||||
|
|
||||||
// Partial literal is padded with 0
|
|
||||||
if (charCount > 0) {
|
|
||||||
for (; charCount < 4; ++charCount)
|
|
||||||
*(literalPtr++) = 0;
|
|
||||||
operands.push_back(literal);
|
|
||||||
}
|
}
|
||||||
} else
|
} while (ch != 0);
|
||||||
assert(0); // Unexpected type
|
|
||||||
} else {
|
// Partial literal is padded with 0
|
||||||
int nextConst = 0;
|
if (charCount > 0) {
|
||||||
spv::Id constant = createSpvConstantFromConstUnionArray(
|
for (; charCount < 4; ++charCount)
|
||||||
typeParam.constant->getType(), typeParam.constant->getConstArray(), nextConst, false);
|
*(literalPtr++) = 0;
|
||||||
operands.push_back(constant);
|
operands.push_back({false, literal});
|
||||||
}
|
}
|
||||||
} else {
|
} else
|
||||||
// Type specifier
|
assert(0); // Unexpected type
|
||||||
spv::Id typeId = convertGlslangToSpvType(*typeParam.type);
|
} else
|
||||||
operands.push_back(typeId);
|
operands.push_back({true, createSpvConstant(*typeParam.constant)});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spirvInst.set == "")
|
assert(spirvInst.set == ""); // Currently, couldn't be extended instructions.
|
||||||
spvType = builder.createOp(static_cast<spv::Op>(spirvInst.id), spv::NoType, operands);
|
spvType = builder.makeGenericType(static_cast<spv::Op>(spirvInst.id), operands);
|
||||||
else {
|
|
||||||
spvType = builder.createBuiltinCall(
|
|
||||||
spv::NoType, getExtBuiltins(spirvInst.set.c_str()), spirvInst.id, operands);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -7506,6 +7532,8 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
|
||||||
break;
|
break;
|
||||||
case glslang::EOpReadFirstInvocation:
|
case glslang::EOpReadFirstInvocation:
|
||||||
opCode = spv::OpSubgroupFirstInvocationKHR;
|
opCode = spv::OpSubgroupFirstInvocationKHR;
|
||||||
|
if (builder.isVectorType(typeId))
|
||||||
|
return CreateInvocationsVectorOperation(opCode, groupOperation, typeId, operands);
|
||||||
break;
|
break;
|
||||||
case glslang::EOpBallot:
|
case glslang::EOpBallot:
|
||||||
{
|
{
|
||||||
|
|
@ -7630,7 +7658,7 @@ spv::Id TGlslangToSpvTraverser::CreateInvocationsVectorOperation(spv::Op op, spv
|
||||||
assert(op == spv::OpGroupFMin || op == spv::OpGroupUMin || op == spv::OpGroupSMin ||
|
assert(op == spv::OpGroupFMin || op == spv::OpGroupUMin || op == spv::OpGroupSMin ||
|
||||||
op == spv::OpGroupFMax || op == spv::OpGroupUMax || op == spv::OpGroupSMax ||
|
op == spv::OpGroupFMax || op == spv::OpGroupUMax || op == spv::OpGroupSMax ||
|
||||||
op == spv::OpGroupFAdd || op == spv::OpGroupIAdd || op == spv::OpGroupBroadcast ||
|
op == spv::OpGroupFAdd || op == spv::OpGroupIAdd || op == spv::OpGroupBroadcast ||
|
||||||
op == spv::OpSubgroupReadInvocationKHR ||
|
op == spv::OpSubgroupReadInvocationKHR || op == spv::OpSubgroupFirstInvocationKHR ||
|
||||||
op == spv::OpGroupFMinNonUniformAMD || op == spv::OpGroupUMinNonUniformAMD ||
|
op == spv::OpGroupFMinNonUniformAMD || op == spv::OpGroupUMinNonUniformAMD ||
|
||||||
op == spv::OpGroupSMinNonUniformAMD ||
|
op == spv::OpGroupSMinNonUniformAMD ||
|
||||||
op == spv::OpGroupFMaxNonUniformAMD || op == spv::OpGroupUMaxNonUniformAMD ||
|
op == spv::OpGroupFMaxNonUniformAMD || op == spv::OpGroupUMaxNonUniformAMD ||
|
||||||
|
|
@ -7659,6 +7687,8 @@ spv::Id TGlslangToSpvTraverser::CreateInvocationsVectorOperation(spv::Op op, spv
|
||||||
spvGroupOperands.push_back(scalar);
|
spvGroupOperands.push_back(scalar);
|
||||||
spv::IdImmediate operand = { true, operands[1] };
|
spv::IdImmediate operand = { true, operands[1] };
|
||||||
spvGroupOperands.push_back(operand);
|
spvGroupOperands.push_back(operand);
|
||||||
|
} else if (op == spv::OpSubgroupFirstInvocationKHR) {
|
||||||
|
spvGroupOperands.push_back(scalar);
|
||||||
} else if (op == spv::OpGroupBroadcast) {
|
} else if (op == spv::OpGroupBroadcast) {
|
||||||
spv::IdImmediate scope = { true, builder.makeUintConstant(spv::ScopeSubgroup) };
|
spv::IdImmediate scope = { true, builder.makeUintConstant(spv::ScopeSubgroup) };
|
||||||
spvGroupOperands.push_back(scope);
|
spvGroupOperands.push_back(scope);
|
||||||
|
|
@ -8721,8 +8751,18 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
||||||
builder.addDecoration(id, spv::DecorationOffset, symbol->getQualifier().layoutOffset);
|
builder.addDecoration(id, spv::DecorationOffset, symbol->getQualifier().layoutOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (symbol->getQualifier().hasLocation())
|
if (symbol->getQualifier().hasLocation()) {
|
||||||
builder.addDecoration(id, spv::DecorationLocation, symbol->getQualifier().layoutLocation);
|
if (!(glslangIntermediate->isRayTracingStage() && glslangIntermediate->IsRequestedExtension(glslang::E_GL_EXT_ray_tracing)
|
||||||
|
&& (builder.getStorageClass(id) == spv::StorageClassRayPayloadKHR ||
|
||||||
|
builder.getStorageClass(id) == spv::StorageClassIncomingRayPayloadKHR ||
|
||||||
|
builder.getStorageClass(id) == spv::StorageClassCallableDataKHR ||
|
||||||
|
builder.getStorageClass(id) == spv::StorageClassIncomingCallableDataKHR))) {
|
||||||
|
// Location values are used to link TraceRayKHR and ExecuteCallableKHR to corresponding variables
|
||||||
|
// but are not valid in SPIRV since they are supported only for Input/Output Storage classes.
|
||||||
|
builder.addDecoration(id, spv::DecorationLocation, symbol->getQualifier().layoutLocation);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
builder.addDecoration(id, TranslateInvariantDecoration(symbol->getType().getQualifier()));
|
builder.addDecoration(id, TranslateInvariantDecoration(symbol->getType().getQualifier()));
|
||||||
if (symbol->getQualifier().hasStream() && glslangIntermediate->isMultiStream()) {
|
if (symbol->getQualifier().hasStream() && glslangIntermediate->isMultiStream()) {
|
||||||
builder.addCapability(spv::CapabilityGeometryStreams);
|
builder.addCapability(spv::CapabilityGeometryStreams);
|
||||||
|
|
@ -8756,7 +8796,16 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
||||||
|
|
||||||
// add built-in variable decoration
|
// add built-in variable decoration
|
||||||
if (builtIn != spv::BuiltInMax) {
|
if (builtIn != spv::BuiltInMax) {
|
||||||
builder.addDecoration(id, spv::DecorationBuiltIn, (int)builtIn);
|
// WorkgroupSize deprecated in spirv1.6
|
||||||
|
if (glslangIntermediate->getSpv().spv < glslang::EShTargetSpv_1_6 ||
|
||||||
|
builtIn != spv::BuiltInWorkgroupSize)
|
||||||
|
builder.addDecoration(id, spv::DecorationBuiltIn, (int)builtIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add volatile decoration to HelperInvocation for spirv1.6 and beyond
|
||||||
|
if (builtIn == spv::BuiltInHelperInvocation &&
|
||||||
|
glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) {
|
||||||
|
builder.addDecoration(id, spv::DecorationVolatile);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
|
|
@ -8841,12 +8890,12 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
||||||
std::vector<spv::Id> operandIds;
|
std::vector<spv::Id> operandIds;
|
||||||
assert(!decorateId.second.empty());
|
assert(!decorateId.second.empty());
|
||||||
for (auto extraOperand : decorateId.second) {
|
for (auto extraOperand : decorateId.second) {
|
||||||
int nextConst = 0;
|
if (extraOperand->getQualifier().isSpecConstant())
|
||||||
spv::Id operandId = createSpvConstantFromConstUnionArray(
|
operandIds.push_back(getSymbolId(extraOperand->getAsSymbolNode()));
|
||||||
extraOperand->getType(), extraOperand->getConstArray(), nextConst, false);
|
else
|
||||||
operandIds.push_back(operandId);
|
operandIds.push_back(createSpvConstant(*extraOperand));
|
||||||
}
|
}
|
||||||
builder.addDecoration(id, static_cast<spv::Decoration>(decorateId.first), operandIds);
|
builder.addDecorationId(id, static_cast<spv::Decoration>(decorateId.first), operandIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add spirv_decorate_string
|
// Add spirv_decorate_string
|
||||||
|
|
|
||||||
|
|
@ -297,15 +297,21 @@ namespace spv {
|
||||||
std::string spirvbin_t::literalString(unsigned word) const
|
std::string spirvbin_t::literalString(unsigned word) const
|
||||||
{
|
{
|
||||||
std::string literal;
|
std::string literal;
|
||||||
|
const spirword_t * pos = spv.data() + word;
|
||||||
|
|
||||||
literal.reserve(16);
|
literal.reserve(16);
|
||||||
|
|
||||||
const char* bytes = reinterpret_cast<const char*>(spv.data() + word);
|
do {
|
||||||
|
spirword_t word = *pos;
|
||||||
while (bytes && *bytes)
|
for (int i = 0; i < 4; i++) {
|
||||||
literal += *bytes++;
|
char c = word & 0xff;
|
||||||
|
if (c == '\0')
|
||||||
return literal;
|
return literal;
|
||||||
|
literal += c;
|
||||||
|
word >>= 8;
|
||||||
|
}
|
||||||
|
pos++;
|
||||||
|
} while (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void spirvbin_t::applyMap()
|
void spirvbin_t::applyMap()
|
||||||
|
|
|
||||||
|
|
@ -427,6 +427,37 @@ Id Builder::makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols)
|
||||||
return type->getResultId();
|
return type->getResultId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Id Builder::makeGenericType(spv::Op opcode, std::vector<spv::IdImmediate>& operands)
|
||||||
|
{
|
||||||
|
// try to find it
|
||||||
|
Instruction* type;
|
||||||
|
for (int t = 0; t < (int)groupedTypes[opcode].size(); ++t) {
|
||||||
|
type = groupedTypes[opcode][t];
|
||||||
|
if (static_cast<size_t>(type->getNumOperands()) != operands.size())
|
||||||
|
continue; // Number mismatch, find next
|
||||||
|
|
||||||
|
bool match = true;
|
||||||
|
for (int op = 0; match && op < (int)operands.size(); ++op) {
|
||||||
|
match = (operands[op].isId ? type->getIdOperand(op) : type->getImmediateOperand(op)) == operands[op].word;
|
||||||
|
}
|
||||||
|
if (match)
|
||||||
|
return type->getResultId();
|
||||||
|
}
|
||||||
|
|
||||||
|
// not found, make it
|
||||||
|
type = new Instruction(getUniqueId(), NoType, opcode);
|
||||||
|
for (size_t op = 0; op < operands.size(); ++op) {
|
||||||
|
if (operands[op].isId)
|
||||||
|
type->addIdOperand(operands[op].word);
|
||||||
|
else
|
||||||
|
type->addImmediateOperand(operands[op].word);
|
||||||
|
}
|
||||||
|
groupedTypes[opcode].push_back(type);
|
||||||
|
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
|
||||||
|
module.mapInstruction(type);
|
||||||
|
|
||||||
|
return type->getResultId();
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: performance: track arrays per stride
|
// TODO: performance: track arrays per stride
|
||||||
// If a stride is supplied (non-zero) make an array.
|
// If a stride is supplied (non-zero) make an array.
|
||||||
|
|
|
||||||
|
|
@ -181,6 +181,7 @@ public:
|
||||||
Id makeSamplerType();
|
Id makeSamplerType();
|
||||||
Id makeSampledImageType(Id imageType);
|
Id makeSampledImageType(Id imageType);
|
||||||
Id makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols);
|
Id makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols);
|
||||||
|
Id makeGenericType(spv::Op opcode, std::vector<spv::IdImmediate>& operands);
|
||||||
|
|
||||||
// accelerationStructureNV type
|
// accelerationStructureNV type
|
||||||
Id makeAccelerationStructureType();
|
Id makeAccelerationStructureType();
|
||||||
|
|
|
||||||
|
|
@ -44,10 +44,8 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "SpvBuilder.h"
|
#include "SpvBuilder.h"
|
||||||
|
|
||||||
#include "spirv.hpp"
|
#include "spirv.hpp"
|
||||||
#include "GlslangToSpv.h"
|
|
||||||
#include "SpvBuilder.h"
|
|
||||||
namespace spv {
|
namespace spv {
|
||||||
#include "GLSL.std.450.h"
|
#include "GLSL.std.450.h"
|
||||||
#include "GLSL.ext.KHR.h"
|
#include "GLSL.ext.KHR.h"
|
||||||
|
|
@ -113,8 +111,6 @@ void Builder::postProcessType(const Instruction& inst, Id typeId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OpAccessChain:
|
|
||||||
case OpPtrAccessChain:
|
|
||||||
case OpCopyObject:
|
case OpCopyObject:
|
||||||
break;
|
break;
|
||||||
case OpFConvert:
|
case OpFConvert:
|
||||||
|
|
@ -161,26 +157,43 @@ void Builder::postProcessType(const Instruction& inst, Id typeId)
|
||||||
switch (inst.getImmediateOperand(1)) {
|
switch (inst.getImmediateOperand(1)) {
|
||||||
case GLSLstd450Frexp:
|
case GLSLstd450Frexp:
|
||||||
case GLSLstd450FrexpStruct:
|
case GLSLstd450FrexpStruct:
|
||||||
if (getSpvVersion() < glslang::EShTargetSpv_1_3 && containsType(typeId, OpTypeInt, 16))
|
if (getSpvVersion() < spv::Spv_1_3 && containsType(typeId, OpTypeInt, 16))
|
||||||
addExtension(spv::E_SPV_AMD_gpu_shader_int16);
|
addExtension(spv::E_SPV_AMD_gpu_shader_int16);
|
||||||
break;
|
break;
|
||||||
case GLSLstd450InterpolateAtCentroid:
|
case GLSLstd450InterpolateAtCentroid:
|
||||||
case GLSLstd450InterpolateAtSample:
|
case GLSLstd450InterpolateAtSample:
|
||||||
case GLSLstd450InterpolateAtOffset:
|
case GLSLstd450InterpolateAtOffset:
|
||||||
if (getSpvVersion() < glslang::EShTargetSpv_1_3 && containsType(typeId, OpTypeFloat, 16))
|
if (getSpvVersion() < spv::Spv_1_3 && containsType(typeId, OpTypeFloat, 16))
|
||||||
addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
|
addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case OpAccessChain:
|
||||||
|
case OpPtrAccessChain:
|
||||||
|
if (isPointerType(typeId))
|
||||||
|
break;
|
||||||
|
if (basicTypeOp == OpTypeInt) {
|
||||||
|
if (width == 16)
|
||||||
|
addCapability(CapabilityInt16);
|
||||||
|
else if (width == 8)
|
||||||
|
addCapability(CapabilityInt8);
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
if (basicTypeOp == OpTypeFloat && width == 16)
|
if (basicTypeOp == OpTypeInt) {
|
||||||
addCapability(CapabilityFloat16);
|
if (width == 16)
|
||||||
if (basicTypeOp == OpTypeInt && width == 16)
|
addCapability(CapabilityInt16);
|
||||||
addCapability(CapabilityInt16);
|
else if (width == 8)
|
||||||
if (basicTypeOp == OpTypeInt && width == 8)
|
addCapability(CapabilityInt8);
|
||||||
addCapability(CapabilityInt8);
|
else if (width == 64)
|
||||||
|
addCapability(CapabilityInt64);
|
||||||
|
} else if (basicTypeOp == OpTypeFloat) {
|
||||||
|
if (width == 16)
|
||||||
|
addCapability(CapabilityFloat16);
|
||||||
|
else if (width == 64)
|
||||||
|
addCapability(CapabilityFloat64);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,8 @@ spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLog
|
||||||
}
|
}
|
||||||
case glslang::EShTargetVulkan_1_2:
|
case glslang::EShTargetVulkan_1_2:
|
||||||
return spv_target_env::SPV_ENV_VULKAN_1_2;
|
return spv_target_env::SPV_ENV_VULKAN_1_2;
|
||||||
|
case glslang::EShTargetVulkan_1_3:
|
||||||
|
return spv_target_env::SPV_ENV_VULKAN_1_3;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@
|
||||||
#include <stack>
|
#include <stack>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include "disassemble.h"
|
#include "disassemble.h"
|
||||||
#include "doc.h"
|
#include "doc.h"
|
||||||
|
|
@ -100,6 +101,7 @@ protected:
|
||||||
void outputMask(OperandClass operandClass, unsigned mask);
|
void outputMask(OperandClass operandClass, unsigned mask);
|
||||||
void disassembleImmediates(int numOperands);
|
void disassembleImmediates(int numOperands);
|
||||||
void disassembleIds(int numOperands);
|
void disassembleIds(int numOperands);
|
||||||
|
std::pair<int, std::string> decodeString();
|
||||||
int disassembleString();
|
int disassembleString();
|
||||||
void disassembleInstruction(Id resultId, Id typeId, Op opCode, int numOperands);
|
void disassembleInstruction(Id resultId, Id typeId, Op opCode, int numOperands);
|
||||||
|
|
||||||
|
|
@ -290,31 +292,44 @@ void SpirvStream::disassembleIds(int numOperands)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// return the number of operands consumed by the string
|
// decode string from words at current position (non-consuming)
|
||||||
int SpirvStream::disassembleString()
|
std::pair<int, std::string> SpirvStream::decodeString()
|
||||||
{
|
{
|
||||||
int startWord = word;
|
std::string res;
|
||||||
|
int wordPos = word;
|
||||||
out << " \"";
|
char c;
|
||||||
|
|
||||||
const char* wordString;
|
|
||||||
bool done = false;
|
bool done = false;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
unsigned int content = stream[word];
|
unsigned int content = stream[wordPos];
|
||||||
wordString = (const char*)&content;
|
|
||||||
for (int charCount = 0; charCount < 4; ++charCount) {
|
for (int charCount = 0; charCount < 4; ++charCount) {
|
||||||
if (*wordString == 0) {
|
c = content & 0xff;
|
||||||
|
content >>= 8;
|
||||||
|
if (c == '\0') {
|
||||||
done = true;
|
done = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
out << *(wordString++);
|
res += c;
|
||||||
}
|
}
|
||||||
++word;
|
++wordPos;
|
||||||
} while (! done);
|
} while(! done);
|
||||||
|
|
||||||
|
return std::make_pair(wordPos - word, res);
|
||||||
|
}
|
||||||
|
|
||||||
|
// return the number of operands consumed by the string
|
||||||
|
int SpirvStream::disassembleString()
|
||||||
|
{
|
||||||
|
out << " \"";
|
||||||
|
|
||||||
|
std::pair<int, std::string> decoderes = decodeString();
|
||||||
|
|
||||||
|
out << decoderes.second;
|
||||||
out << "\"";
|
out << "\"";
|
||||||
|
|
||||||
return word - startWord;
|
word += decoderes.first;
|
||||||
|
|
||||||
|
return decoderes.first;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, int numOperands)
|
void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, int numOperands)
|
||||||
|
|
@ -331,7 +346,7 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
|
||||||
nextNestedControl = 0;
|
nextNestedControl = 0;
|
||||||
}
|
}
|
||||||
} else if (opCode == OpExtInstImport) {
|
} else if (opCode == OpExtInstImport) {
|
||||||
idDescriptor[resultId] = (const char*)(&stream[word]);
|
idDescriptor[resultId] = decodeString().second;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (resultId != 0 && idDescriptor[resultId].size() == 0) {
|
if (resultId != 0 && idDescriptor[resultId].size() == 0) {
|
||||||
|
|
@ -428,7 +443,7 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
|
||||||
--numOperands;
|
--numOperands;
|
||||||
// Get names for printing "(XXX)" for readability, *after* this id
|
// Get names for printing "(XXX)" for readability, *after* this id
|
||||||
if (opCode == OpName)
|
if (opCode == OpName)
|
||||||
idDescriptor[stream[word - 1]] = (const char*)(&stream[word]);
|
idDescriptor[stream[word - 1]] = decodeString().second;
|
||||||
break;
|
break;
|
||||||
case OperandVariableIds:
|
case OperandVariableIds:
|
||||||
disassembleIds(numOperands);
|
disassembleIds(numOperands);
|
||||||
|
|
|
||||||
|
|
@ -900,6 +900,12 @@ const char* CapabilityString(int info)
|
||||||
case CapabilityDeviceGroup: return "DeviceGroup";
|
case CapabilityDeviceGroup: return "DeviceGroup";
|
||||||
case CapabilityMultiView: return "MultiView";
|
case CapabilityMultiView: return "MultiView";
|
||||||
|
|
||||||
|
case CapabilityDenormPreserve: return "DenormPreserve";
|
||||||
|
case CapabilityDenormFlushToZero: return "DenormFlushToZero";
|
||||||
|
case CapabilitySignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve";
|
||||||
|
case CapabilityRoundingModeRTE: return "RoundingModeRTE";
|
||||||
|
case CapabilityRoundingModeRTZ: return "RoundingModeRTZ";
|
||||||
|
|
||||||
case CapabilityStencilExportEXT: return "StencilExportEXT";
|
case CapabilityStencilExportEXT: return "StencilExportEXT";
|
||||||
|
|
||||||
case CapabilityFloat16ImageAMD: return "Float16ImageAMD";
|
case CapabilityFloat16ImageAMD: return "Float16ImageAMD";
|
||||||
|
|
|
||||||
|
|
@ -49,12 +49,12 @@ namespace spv {
|
||||||
|
|
||||||
typedef unsigned int Id;
|
typedef unsigned int Id;
|
||||||
|
|
||||||
#define SPV_VERSION 0x10500
|
#define SPV_VERSION 0x10600
|
||||||
#define SPV_REVISION 4
|
#define SPV_REVISION 1
|
||||||
|
|
||||||
static const unsigned int MagicNumber = 0x07230203;
|
static const unsigned int MagicNumber = 0x07230203;
|
||||||
static const unsigned int Version = 0x00010500;
|
static const unsigned int Version = 0x00010600;
|
||||||
static const unsigned int Revision = 4;
|
static const unsigned int Revision = 1;
|
||||||
static const unsigned int OpCodeMask = 0xffff;
|
static const unsigned int OpCodeMask = 0xffff;
|
||||||
static const unsigned int WordCountShift = 16;
|
static const unsigned int WordCountShift = 16;
|
||||||
|
|
||||||
|
|
@ -65,6 +65,7 @@ enum SourceLanguage {
|
||||||
SourceLanguageOpenCL_C = 3,
|
SourceLanguageOpenCL_C = 3,
|
||||||
SourceLanguageOpenCL_CPP = 4,
|
SourceLanguageOpenCL_CPP = 4,
|
||||||
SourceLanguageHLSL = 5,
|
SourceLanguageHLSL = 5,
|
||||||
|
SourceLanguageCPP_for_OpenCL = 6,
|
||||||
SourceLanguageMax = 0x7fffffff,
|
SourceLanguageMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -352,6 +353,8 @@ enum ImageOperandsShift {
|
||||||
ImageOperandsVolatileTexelKHRShift = 11,
|
ImageOperandsVolatileTexelKHRShift = 11,
|
||||||
ImageOperandsSignExtendShift = 12,
|
ImageOperandsSignExtendShift = 12,
|
||||||
ImageOperandsZeroExtendShift = 13,
|
ImageOperandsZeroExtendShift = 13,
|
||||||
|
ImageOperandsNontemporalShift = 14,
|
||||||
|
ImageOperandsOffsetsShift = 16,
|
||||||
ImageOperandsMax = 0x7fffffff,
|
ImageOperandsMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -375,6 +378,8 @@ enum ImageOperandsMask {
|
||||||
ImageOperandsVolatileTexelKHRMask = 0x00000800,
|
ImageOperandsVolatileTexelKHRMask = 0x00000800,
|
||||||
ImageOperandsSignExtendMask = 0x00001000,
|
ImageOperandsSignExtendMask = 0x00001000,
|
||||||
ImageOperandsZeroExtendMask = 0x00002000,
|
ImageOperandsZeroExtendMask = 0x00002000,
|
||||||
|
ImageOperandsNontemporalMask = 0x00004000,
|
||||||
|
ImageOperandsOffsetsMask = 0x00010000,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum FPFastMathModeShift {
|
enum FPFastMathModeShift {
|
||||||
|
|
@ -491,6 +496,7 @@ enum Decoration {
|
||||||
DecorationPerPrimitiveNV = 5271,
|
DecorationPerPrimitiveNV = 5271,
|
||||||
DecorationPerViewNV = 5272,
|
DecorationPerViewNV = 5272,
|
||||||
DecorationPerTaskNV = 5273,
|
DecorationPerTaskNV = 5273,
|
||||||
|
DecorationPerVertexKHR = 5285,
|
||||||
DecorationPerVertexNV = 5285,
|
DecorationPerVertexNV = 5285,
|
||||||
DecorationNonUniform = 5300,
|
DecorationNonUniform = 5300,
|
||||||
DecorationNonUniformEXT = 5300,
|
DecorationNonUniformEXT = 5300,
|
||||||
|
|
@ -498,6 +504,10 @@ enum Decoration {
|
||||||
DecorationRestrictPointerEXT = 5355,
|
DecorationRestrictPointerEXT = 5355,
|
||||||
DecorationAliasedPointer = 5356,
|
DecorationAliasedPointer = 5356,
|
||||||
DecorationAliasedPointerEXT = 5356,
|
DecorationAliasedPointerEXT = 5356,
|
||||||
|
DecorationBindlessSamplerNV = 5398,
|
||||||
|
DecorationBindlessImageNV = 5399,
|
||||||
|
DecorationBoundSamplerNV = 5400,
|
||||||
|
DecorationBoundImageNV = 5401,
|
||||||
DecorationSIMTCallINTEL = 5599,
|
DecorationSIMTCallINTEL = 5599,
|
||||||
DecorationReferencedIndirectlyINTEL = 5602,
|
DecorationReferencedIndirectlyINTEL = 5602,
|
||||||
DecorationClobberINTEL = 5607,
|
DecorationClobberINTEL = 5607,
|
||||||
|
|
@ -537,6 +547,7 @@ enum Decoration {
|
||||||
DecorationFunctionFloatingPointModeINTEL = 6080,
|
DecorationFunctionFloatingPointModeINTEL = 6080,
|
||||||
DecorationSingleElementVectorINTEL = 6085,
|
DecorationSingleElementVectorINTEL = 6085,
|
||||||
DecorationVectorComputeCallableFunctionINTEL = 6087,
|
DecorationVectorComputeCallableFunctionINTEL = 6087,
|
||||||
|
DecorationMediaBlockIOINTEL = 6140,
|
||||||
DecorationMax = 0x7fffffff,
|
DecorationMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -621,7 +632,9 @@ enum BuiltIn {
|
||||||
BuiltInLayerPerViewNV = 5279,
|
BuiltInLayerPerViewNV = 5279,
|
||||||
BuiltInMeshViewCountNV = 5280,
|
BuiltInMeshViewCountNV = 5280,
|
||||||
BuiltInMeshViewIndicesNV = 5281,
|
BuiltInMeshViewIndicesNV = 5281,
|
||||||
|
BuiltInBaryCoordKHR = 5286,
|
||||||
BuiltInBaryCoordNV = 5286,
|
BuiltInBaryCoordNV = 5286,
|
||||||
|
BuiltInBaryCoordNoPerspKHR = 5287,
|
||||||
BuiltInBaryCoordNoPerspNV = 5287,
|
BuiltInBaryCoordNoPerspNV = 5287,
|
||||||
BuiltInFragSizeEXT = 5292,
|
BuiltInFragSizeEXT = 5292,
|
||||||
BuiltInFragmentSizeNV = 5292,
|
BuiltInFragmentSizeNV = 5292,
|
||||||
|
|
@ -722,6 +735,7 @@ enum FunctionControlShift {
|
||||||
FunctionControlDontInlineShift = 1,
|
FunctionControlDontInlineShift = 1,
|
||||||
FunctionControlPureShift = 2,
|
FunctionControlPureShift = 2,
|
||||||
FunctionControlConstShift = 3,
|
FunctionControlConstShift = 3,
|
||||||
|
FunctionControlOptNoneINTELShift = 16,
|
||||||
FunctionControlMax = 0x7fffffff,
|
FunctionControlMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -731,6 +745,7 @@ enum FunctionControlMask {
|
||||||
FunctionControlDontInlineMask = 0x00000002,
|
FunctionControlDontInlineMask = 0x00000002,
|
||||||
FunctionControlPureMask = 0x00000004,
|
FunctionControlPureMask = 0x00000004,
|
||||||
FunctionControlConstMask = 0x00000008,
|
FunctionControlConstMask = 0x00000008,
|
||||||
|
FunctionControlOptNoneINTELMask = 0x00010000,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MemorySemanticsShift {
|
enum MemorySemanticsShift {
|
||||||
|
|
@ -911,6 +926,7 @@ enum Capability {
|
||||||
CapabilityGroupNonUniformQuad = 68,
|
CapabilityGroupNonUniformQuad = 68,
|
||||||
CapabilityShaderLayer = 69,
|
CapabilityShaderLayer = 69,
|
||||||
CapabilityShaderViewportIndex = 70,
|
CapabilityShaderViewportIndex = 70,
|
||||||
|
CapabilityUniformDecoration = 71,
|
||||||
CapabilityFragmentShadingRateKHR = 4422,
|
CapabilityFragmentShadingRateKHR = 4422,
|
||||||
CapabilitySubgroupBallotKHR = 4423,
|
CapabilitySubgroupBallotKHR = 4423,
|
||||||
CapabilityDrawParameters = 4427,
|
CapabilityDrawParameters = 4427,
|
||||||
|
|
@ -959,6 +975,7 @@ enum Capability {
|
||||||
CapabilityFragmentFullyCoveredEXT = 5265,
|
CapabilityFragmentFullyCoveredEXT = 5265,
|
||||||
CapabilityMeshShadingNV = 5266,
|
CapabilityMeshShadingNV = 5266,
|
||||||
CapabilityImageFootprintNV = 5282,
|
CapabilityImageFootprintNV = 5282,
|
||||||
|
CapabilityFragmentBarycentricKHR = 5284,
|
||||||
CapabilityFragmentBarycentricNV = 5284,
|
CapabilityFragmentBarycentricNV = 5284,
|
||||||
CapabilityComputeDerivativeGroupQuadsNV = 5288,
|
CapabilityComputeDerivativeGroupQuadsNV = 5288,
|
||||||
CapabilityFragmentDensityEXT = 5291,
|
CapabilityFragmentDensityEXT = 5291,
|
||||||
|
|
@ -1003,7 +1020,9 @@ enum Capability {
|
||||||
CapabilityFragmentShaderShadingRateInterlockEXT = 5372,
|
CapabilityFragmentShaderShadingRateInterlockEXT = 5372,
|
||||||
CapabilityShaderSMBuiltinsNV = 5373,
|
CapabilityShaderSMBuiltinsNV = 5373,
|
||||||
CapabilityFragmentShaderPixelInterlockEXT = 5378,
|
CapabilityFragmentShaderPixelInterlockEXT = 5378,
|
||||||
|
CapabilityDemoteToHelperInvocation = 5379,
|
||||||
CapabilityDemoteToHelperInvocationEXT = 5379,
|
CapabilityDemoteToHelperInvocationEXT = 5379,
|
||||||
|
CapabilityBindlessTextureNV = 5390,
|
||||||
CapabilitySubgroupShuffleINTEL = 5568,
|
CapabilitySubgroupShuffleINTEL = 5568,
|
||||||
CapabilitySubgroupBufferBlockIOINTEL = 5569,
|
CapabilitySubgroupBufferBlockIOINTEL = 5569,
|
||||||
CapabilitySubgroupImageBlockIOINTEL = 5570,
|
CapabilitySubgroupImageBlockIOINTEL = 5570,
|
||||||
|
|
@ -1028,6 +1047,7 @@ enum Capability {
|
||||||
CapabilityFPGAMemoryAttributesINTEL = 5824,
|
CapabilityFPGAMemoryAttributesINTEL = 5824,
|
||||||
CapabilityFPFastMathModeINTEL = 5837,
|
CapabilityFPFastMathModeINTEL = 5837,
|
||||||
CapabilityArbitraryPrecisionIntegersINTEL = 5844,
|
CapabilityArbitraryPrecisionIntegersINTEL = 5844,
|
||||||
|
CapabilityArbitraryPrecisionFloatingPointINTEL = 5845,
|
||||||
CapabilityUnstructuredLoopControlsINTEL = 5886,
|
CapabilityUnstructuredLoopControlsINTEL = 5886,
|
||||||
CapabilityFPGALoopControlsINTEL = 5888,
|
CapabilityFPGALoopControlsINTEL = 5888,
|
||||||
CapabilityKernelAttributesINTEL = 5892,
|
CapabilityKernelAttributesINTEL = 5892,
|
||||||
|
|
@ -1036,14 +1056,26 @@ enum Capability {
|
||||||
CapabilityFPGAClusterAttributesINTEL = 5904,
|
CapabilityFPGAClusterAttributesINTEL = 5904,
|
||||||
CapabilityLoopFuseINTEL = 5906,
|
CapabilityLoopFuseINTEL = 5906,
|
||||||
CapabilityFPGABufferLocationINTEL = 5920,
|
CapabilityFPGABufferLocationINTEL = 5920,
|
||||||
|
CapabilityArbitraryPrecisionFixedPointINTEL = 5922,
|
||||||
CapabilityUSMStorageClassesINTEL = 5935,
|
CapabilityUSMStorageClassesINTEL = 5935,
|
||||||
CapabilityIOPipesINTEL = 5943,
|
CapabilityIOPipesINTEL = 5943,
|
||||||
CapabilityBlockingPipesINTEL = 5945,
|
CapabilityBlockingPipesINTEL = 5945,
|
||||||
CapabilityFPGARegINTEL = 5948,
|
CapabilityFPGARegINTEL = 5948,
|
||||||
|
CapabilityDotProductInputAll = 6016,
|
||||||
|
CapabilityDotProductInputAllKHR = 6016,
|
||||||
|
CapabilityDotProductInput4x8Bit = 6017,
|
||||||
|
CapabilityDotProductInput4x8BitKHR = 6017,
|
||||||
|
CapabilityDotProductInput4x8BitPacked = 6018,
|
||||||
|
CapabilityDotProductInput4x8BitPackedKHR = 6018,
|
||||||
|
CapabilityDotProduct = 6019,
|
||||||
|
CapabilityDotProductKHR = 6019,
|
||||||
|
CapabilityBitInstructions = 6025,
|
||||||
CapabilityAtomicFloat32AddEXT = 6033,
|
CapabilityAtomicFloat32AddEXT = 6033,
|
||||||
CapabilityAtomicFloat64AddEXT = 6034,
|
CapabilityAtomicFloat64AddEXT = 6034,
|
||||||
CapabilityLongConstantCompositeINTEL = 6089,
|
CapabilityLongConstantCompositeINTEL = 6089,
|
||||||
|
CapabilityOptNoneINTEL = 6094,
|
||||||
CapabilityAtomicFloat16AddEXT = 6095,
|
CapabilityAtomicFloat16AddEXT = 6095,
|
||||||
|
CapabilityDebugInfoModuleINTEL = 6114,
|
||||||
CapabilityMax = 0x7fffffff,
|
CapabilityMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1122,6 +1154,32 @@ enum FPOperationMode {
|
||||||
FPOperationModeMax = 0x7fffffff,
|
FPOperationModeMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum QuantizationModes {
|
||||||
|
QuantizationModesTRN = 0,
|
||||||
|
QuantizationModesTRN_ZERO = 1,
|
||||||
|
QuantizationModesRND = 2,
|
||||||
|
QuantizationModesRND_ZERO = 3,
|
||||||
|
QuantizationModesRND_INF = 4,
|
||||||
|
QuantizationModesRND_MIN_INF = 5,
|
||||||
|
QuantizationModesRND_CONV = 6,
|
||||||
|
QuantizationModesRND_CONV_ODD = 7,
|
||||||
|
QuantizationModesMax = 0x7fffffff,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum OverflowModes {
|
||||||
|
OverflowModesWRAP = 0,
|
||||||
|
OverflowModesSAT = 1,
|
||||||
|
OverflowModesSAT_ZERO = 2,
|
||||||
|
OverflowModesSAT_SYM = 3,
|
||||||
|
OverflowModesMax = 0x7fffffff,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum PackedVectorFormat {
|
||||||
|
PackedVectorFormatPackedVectorFormat4x8Bit = 0,
|
||||||
|
PackedVectorFormatPackedVectorFormat4x8BitKHR = 0,
|
||||||
|
PackedVectorFormatMax = 0x7fffffff,
|
||||||
|
};
|
||||||
|
|
||||||
enum Op {
|
enum Op {
|
||||||
OpNop = 0,
|
OpNop = 0,
|
||||||
OpUndef = 1,
|
OpUndef = 1,
|
||||||
|
|
@ -1479,6 +1537,18 @@ enum Op {
|
||||||
OpConvertUToAccelerationStructureKHR = 4447,
|
OpConvertUToAccelerationStructureKHR = 4447,
|
||||||
OpIgnoreIntersectionKHR = 4448,
|
OpIgnoreIntersectionKHR = 4448,
|
||||||
OpTerminateRayKHR = 4449,
|
OpTerminateRayKHR = 4449,
|
||||||
|
OpSDot = 4450,
|
||||||
|
OpSDotKHR = 4450,
|
||||||
|
OpUDot = 4451,
|
||||||
|
OpUDotKHR = 4451,
|
||||||
|
OpSUDot = 4452,
|
||||||
|
OpSUDotKHR = 4452,
|
||||||
|
OpSDotAccSat = 4453,
|
||||||
|
OpSDotAccSatKHR = 4453,
|
||||||
|
OpUDotAccSat = 4454,
|
||||||
|
OpUDotAccSatKHR = 4454,
|
||||||
|
OpSUDotAccSat = 4455,
|
||||||
|
OpSUDotAccSatKHR = 4455,
|
||||||
OpTypeRayQueryKHR = 4472,
|
OpTypeRayQueryKHR = 4472,
|
||||||
OpRayQueryInitializeKHR = 4473,
|
OpRayQueryInitializeKHR = 4473,
|
||||||
OpRayQueryTerminateKHR = 4474,
|
OpRayQueryTerminateKHR = 4474,
|
||||||
|
|
@ -1517,8 +1587,16 @@ enum Op {
|
||||||
OpCooperativeMatrixLengthNV = 5362,
|
OpCooperativeMatrixLengthNV = 5362,
|
||||||
OpBeginInvocationInterlockEXT = 5364,
|
OpBeginInvocationInterlockEXT = 5364,
|
||||||
OpEndInvocationInterlockEXT = 5365,
|
OpEndInvocationInterlockEXT = 5365,
|
||||||
|
OpDemoteToHelperInvocation = 5380,
|
||||||
OpDemoteToHelperInvocationEXT = 5380,
|
OpDemoteToHelperInvocationEXT = 5380,
|
||||||
OpIsHelperInvocationEXT = 5381,
|
OpIsHelperInvocationEXT = 5381,
|
||||||
|
OpConvertUToImageNV = 5391,
|
||||||
|
OpConvertUToSamplerNV = 5392,
|
||||||
|
OpConvertImageToUNV = 5393,
|
||||||
|
OpConvertSamplerToUNV = 5394,
|
||||||
|
OpConvertUToSampledImageNV = 5395,
|
||||||
|
OpConvertSampledImageToUNV = 5396,
|
||||||
|
OpSamplerImageAddressingModeNV = 5397,
|
||||||
OpSubgroupShuffleINTEL = 5571,
|
OpSubgroupShuffleINTEL = 5571,
|
||||||
OpSubgroupShuffleDownINTEL = 5572,
|
OpSubgroupShuffleDownINTEL = 5572,
|
||||||
OpSubgroupShuffleUpINTEL = 5573,
|
OpSubgroupShuffleUpINTEL = 5573,
|
||||||
|
|
@ -1543,7 +1621,7 @@ enum Op {
|
||||||
OpUSubSatINTEL = 5596,
|
OpUSubSatINTEL = 5596,
|
||||||
OpIMul32x16INTEL = 5597,
|
OpIMul32x16INTEL = 5597,
|
||||||
OpUMul32x16INTEL = 5598,
|
OpUMul32x16INTEL = 5598,
|
||||||
OpConstFunctionPointerINTEL = 5600,
|
OpConstantFunctionPointerINTEL = 5600,
|
||||||
OpFunctionPointerCallINTEL = 5601,
|
OpFunctionPointerCallINTEL = 5601,
|
||||||
OpAsmTargetINTEL = 5609,
|
OpAsmTargetINTEL = 5609,
|
||||||
OpAsmINTEL = 5610,
|
OpAsmINTEL = 5610,
|
||||||
|
|
@ -1677,7 +1755,59 @@ enum Op {
|
||||||
OpVariableLengthArrayINTEL = 5818,
|
OpVariableLengthArrayINTEL = 5818,
|
||||||
OpSaveMemoryINTEL = 5819,
|
OpSaveMemoryINTEL = 5819,
|
||||||
OpRestoreMemoryINTEL = 5820,
|
OpRestoreMemoryINTEL = 5820,
|
||||||
|
OpArbitraryFloatSinCosPiINTEL = 5840,
|
||||||
|
OpArbitraryFloatCastINTEL = 5841,
|
||||||
|
OpArbitraryFloatCastFromIntINTEL = 5842,
|
||||||
|
OpArbitraryFloatCastToIntINTEL = 5843,
|
||||||
|
OpArbitraryFloatAddINTEL = 5846,
|
||||||
|
OpArbitraryFloatSubINTEL = 5847,
|
||||||
|
OpArbitraryFloatMulINTEL = 5848,
|
||||||
|
OpArbitraryFloatDivINTEL = 5849,
|
||||||
|
OpArbitraryFloatGTINTEL = 5850,
|
||||||
|
OpArbitraryFloatGEINTEL = 5851,
|
||||||
|
OpArbitraryFloatLTINTEL = 5852,
|
||||||
|
OpArbitraryFloatLEINTEL = 5853,
|
||||||
|
OpArbitraryFloatEQINTEL = 5854,
|
||||||
|
OpArbitraryFloatRecipINTEL = 5855,
|
||||||
|
OpArbitraryFloatRSqrtINTEL = 5856,
|
||||||
|
OpArbitraryFloatCbrtINTEL = 5857,
|
||||||
|
OpArbitraryFloatHypotINTEL = 5858,
|
||||||
|
OpArbitraryFloatSqrtINTEL = 5859,
|
||||||
|
OpArbitraryFloatLogINTEL = 5860,
|
||||||
|
OpArbitraryFloatLog2INTEL = 5861,
|
||||||
|
OpArbitraryFloatLog10INTEL = 5862,
|
||||||
|
OpArbitraryFloatLog1pINTEL = 5863,
|
||||||
|
OpArbitraryFloatExpINTEL = 5864,
|
||||||
|
OpArbitraryFloatExp2INTEL = 5865,
|
||||||
|
OpArbitraryFloatExp10INTEL = 5866,
|
||||||
|
OpArbitraryFloatExpm1INTEL = 5867,
|
||||||
|
OpArbitraryFloatSinINTEL = 5868,
|
||||||
|
OpArbitraryFloatCosINTEL = 5869,
|
||||||
|
OpArbitraryFloatSinCosINTEL = 5870,
|
||||||
|
OpArbitraryFloatSinPiINTEL = 5871,
|
||||||
|
OpArbitraryFloatCosPiINTEL = 5872,
|
||||||
|
OpArbitraryFloatASinINTEL = 5873,
|
||||||
|
OpArbitraryFloatASinPiINTEL = 5874,
|
||||||
|
OpArbitraryFloatACosINTEL = 5875,
|
||||||
|
OpArbitraryFloatACosPiINTEL = 5876,
|
||||||
|
OpArbitraryFloatATanINTEL = 5877,
|
||||||
|
OpArbitraryFloatATanPiINTEL = 5878,
|
||||||
|
OpArbitraryFloatATan2INTEL = 5879,
|
||||||
|
OpArbitraryFloatPowINTEL = 5880,
|
||||||
|
OpArbitraryFloatPowRINTEL = 5881,
|
||||||
|
OpArbitraryFloatPowNINTEL = 5882,
|
||||||
OpLoopControlINTEL = 5887,
|
OpLoopControlINTEL = 5887,
|
||||||
|
OpFixedSqrtINTEL = 5923,
|
||||||
|
OpFixedRecipINTEL = 5924,
|
||||||
|
OpFixedRsqrtINTEL = 5925,
|
||||||
|
OpFixedSinINTEL = 5926,
|
||||||
|
OpFixedCosINTEL = 5927,
|
||||||
|
OpFixedSinCosINTEL = 5928,
|
||||||
|
OpFixedSinPiINTEL = 5929,
|
||||||
|
OpFixedCosPiINTEL = 5930,
|
||||||
|
OpFixedSinCosPiINTEL = 5931,
|
||||||
|
OpFixedLogINTEL = 5932,
|
||||||
|
OpFixedExpINTEL = 5933,
|
||||||
OpPtrCastToCrossWorkgroupINTEL = 5934,
|
OpPtrCastToCrossWorkgroupINTEL = 5934,
|
||||||
OpCrossWorkgroupCastToPtrINTEL = 5938,
|
OpCrossWorkgroupCastToPtrINTEL = 5938,
|
||||||
OpReadPipeBlockingINTEL = 5946,
|
OpReadPipeBlockingINTEL = 5946,
|
||||||
|
|
@ -2069,6 +2199,12 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
||||||
case OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break;
|
case OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpIgnoreIntersectionKHR: *hasResult = false; *hasResultType = false; break;
|
case OpIgnoreIntersectionKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
case OpTerminateRayKHR: *hasResult = false; *hasResultType = false; break;
|
case OpTerminateRayKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case OpSDot: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpUDot: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpSUDot: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpSDotAccSat: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpUDotAccSat: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpSUDotAccSat: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break;
|
case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break;
|
||||||
case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
|
case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
|
case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
|
|
@ -2105,8 +2241,15 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
||||||
case OpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break;
|
case OpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpBeginInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break;
|
case OpBeginInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break;
|
||||||
case OpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break;
|
case OpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break;
|
||||||
case OpDemoteToHelperInvocationEXT: *hasResult = false; *hasResultType = false; break;
|
case OpDemoteToHelperInvocation: *hasResult = false; *hasResultType = false; break;
|
||||||
case OpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break;
|
case OpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpConvertUToImageNV: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpConvertUToSamplerNV: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpConvertImageToUNV: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpConvertSamplerToUNV: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break;
|
||||||
case OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break;
|
case OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break;
|
case OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break;
|
case OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
|
@ -2131,7 +2274,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
||||||
case OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break;
|
case OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
|
case OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
|
case OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpConstFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break;
|
case OpConstantFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break;
|
case OpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break;
|
case OpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpAsmINTEL: *hasResult = true; *hasResultType = true; break;
|
case OpAsmINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
|
@ -2263,7 +2406,59 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
||||||
case OpVariableLengthArrayINTEL: *hasResult = true; *hasResultType = true; break;
|
case OpVariableLengthArrayINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpSaveMemoryINTEL: *hasResult = true; *hasResultType = true; break;
|
case OpSaveMemoryINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpRestoreMemoryINTEL: *hasResult = false; *hasResultType = false; break;
|
case OpRestoreMemoryINTEL: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case OpArbitraryFloatSinCosPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatCastINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatCastFromIntINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatCastToIntINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatAddINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatSubINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatMulINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatDivINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatGTINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatGEINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatLTINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatLEINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatEQINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatRecipINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatRSqrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatCbrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatHypotINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatSqrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatLogINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatLog2INTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatLog10INTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatLog1pINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatExpINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatExp2INTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatExp10INTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatExpm1INTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatSinINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatCosINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatSinCosINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatSinPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatCosPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatASinINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatASinPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatACosINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatACosPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatATanINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatATanPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatATan2INTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatPowINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break;
|
case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpFixedSinINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpFixedCosINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpFixedSinCosINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpFixedSinPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpFixedCosPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpFixedSinCosPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpFixedLogINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpFixedExpINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpPtrCastToCrossWorkgroupINTEL: *hasResult = true; *hasResultType = true; break;
|
case OpPtrCastToCrossWorkgroupINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpCrossWorkgroupCastToPtrINTEL: *hasResult = true; *hasResultType = true; break;
|
case OpCrossWorkgroupCastToPtrINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpReadPipeBlockingINTEL: *hasResult = true; *hasResultType = true; break;
|
case OpReadPipeBlockingINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
|
|
||||||
|
|
@ -111,27 +111,23 @@ public:
|
||||||
|
|
||||||
void addStringOperand(const char* str)
|
void addStringOperand(const char* str)
|
||||||
{
|
{
|
||||||
unsigned int word;
|
unsigned int word = 0;
|
||||||
char* wordString = (char*)&word;
|
unsigned int shiftAmount = 0;
|
||||||
char* wordPtr = wordString;
|
|
||||||
int charCount = 0;
|
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
c = *(str++);
|
c = *(str++);
|
||||||
*(wordPtr++) = c;
|
word |= ((unsigned int)c) << shiftAmount;
|
||||||
++charCount;
|
shiftAmount += 8;
|
||||||
if (charCount == 4) {
|
if (shiftAmount == 32) {
|
||||||
addImmediateOperand(word);
|
addImmediateOperand(word);
|
||||||
wordPtr = wordString;
|
word = 0;
|
||||||
charCount = 0;
|
shiftAmount = 0;
|
||||||
}
|
}
|
||||||
} while (c != 0);
|
} while (c != 0);
|
||||||
|
|
||||||
// deal with partial last word
|
// deal with partial last word
|
||||||
if (charCount > 0) {
|
if (shiftAmount > 0) {
|
||||||
// pad with 0s
|
|
||||||
for (; charCount < 4; ++charCount)
|
|
||||||
*(wordPtr++) = 0;
|
|
||||||
addImmediateOperand(word);
|
addImmediateOperand(word);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,11 @@
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#include <cfloat>
|
||||||
|
#else
|
||||||
|
#include <cmath>
|
||||||
|
#endif
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
@ -61,7 +66,7 @@ std::string to_string(const T& val) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || defined MINGW_HAS_SECURE_API
|
#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || MINGW_HAS_SECURE_API
|
||||||
#include <basetsd.h>
|
#include <basetsd.h>
|
||||||
#ifndef snprintf
|
#ifndef snprintf
|
||||||
#define snprintf sprintf_s
|
#define snprintf sprintf_s
|
||||||
|
|
@ -213,7 +218,7 @@ template <class T> T Max(const T a, const T b) { return a > b ? a : b; }
|
||||||
//
|
//
|
||||||
// Create a TString object from an integer.
|
// Create a TString object from an integer.
|
||||||
//
|
//
|
||||||
#if defined _MSC_VER || defined MINGW_HAS_SECURE_API
|
#if defined _MSC_VER || MINGW_HAS_SECURE_API
|
||||||
inline const TString String(const int i, const int base = 10)
|
inline const TString String(const int i, const int base = 10)
|
||||||
{
|
{
|
||||||
char text[16]; // 32 bit ints are at most 10 digits in base 10
|
char text[16]; // 32 bit ints are at most 10 digits in base 10
|
||||||
|
|
@ -302,6 +307,34 @@ template <class T> int IntLog2(T n)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool IsInfinity(double x) {
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
switch (_fpclass(x)) {
|
||||||
|
case _FPCLASS_NINF:
|
||||||
|
case _FPCLASS_PINF:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
return std::isinf(x);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool IsNan(double x) {
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
switch (_fpclass(x)) {
|
||||||
|
case _FPCLASS_SNAN:
|
||||||
|
case _FPCLASS_QNAN:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
return std::isnan(x);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
} // end namespace glslang
|
} // end namespace glslang
|
||||||
|
|
||||||
#endif // _COMMON_INCLUDED_
|
#endif // _COMMON_INCLUDED_
|
||||||
|
|
|
||||||
|
|
@ -306,6 +306,8 @@ public:
|
||||||
|
|
||||||
TPoolAllocator& getAllocator() const { return allocator; }
|
TPoolAllocator& getAllocator() const { return allocator; }
|
||||||
|
|
||||||
|
pool_allocator select_on_container_copy_construction() const { return pool_allocator{}; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
pool_allocator& operator=(const pool_allocator&) { return *this; }
|
pool_allocator& operator=(const pool_allocator&) { return *this; }
|
||||||
TPoolAllocator& allocator;
|
TPoolAllocator& allocator;
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ struct TSpirvExecutionMode {
|
||||||
// spirv_execution_mode
|
// spirv_execution_mode
|
||||||
TMap<int, TVector<const TIntermConstantUnion*>> modes;
|
TMap<int, TVector<const TIntermConstantUnion*>> modes;
|
||||||
// spirv_execution_mode_id
|
// spirv_execution_mode_id
|
||||||
TMap<int, TVector<const TIntermConstantUnion*> > modeIds;
|
TMap<int, TVector<const TIntermTyped*> > modeIds;
|
||||||
};
|
};
|
||||||
|
|
||||||
// SPIR-V decorations
|
// SPIR-V decorations
|
||||||
|
|
@ -75,7 +75,7 @@ struct TSpirvDecorate {
|
||||||
// spirv_decorate
|
// spirv_decorate
|
||||||
TMap<int, TVector<const TIntermConstantUnion*> > decorates;
|
TMap<int, TVector<const TIntermConstantUnion*> > decorates;
|
||||||
// spirv_decorate_id
|
// spirv_decorate_id
|
||||||
TMap<int, TVector<const TIntermConstantUnion*> > decorateIds;
|
TMap<int, TVector<const TIntermTyped*>> decorateIds;
|
||||||
// spirv_decorate_string
|
// spirv_decorate_string
|
||||||
TMap<int, TVector<const TIntermConstantUnion*> > decorateStrings;
|
TMap<int, TVector<const TIntermConstantUnion*> > decorateStrings;
|
||||||
};
|
};
|
||||||
|
|
@ -98,20 +98,12 @@ struct TSpirvInstruction {
|
||||||
struct TSpirvTypeParameter {
|
struct TSpirvTypeParameter {
|
||||||
POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
|
POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
|
||||||
|
|
||||||
TSpirvTypeParameter(const TIntermConstantUnion* arg) { isConstant = true; constant = arg; }
|
TSpirvTypeParameter(const TIntermConstantUnion* arg) { constant = arg; }
|
||||||
TSpirvTypeParameter(const TType* arg) { isConstant = false; type = arg; }
|
|
||||||
|
|
||||||
bool operator==(const TSpirvTypeParameter& rhs) const
|
bool operator==(const TSpirvTypeParameter& rhs) const { return constant == rhs.constant; }
|
||||||
{
|
|
||||||
return isConstant == rhs.isConstant && ((isConstant && constant == rhs.constant) || (!isConstant && type == rhs.type));
|
|
||||||
}
|
|
||||||
bool operator!=(const TSpirvTypeParameter& rhs) const { return !operator==(rhs); }
|
bool operator!=(const TSpirvTypeParameter& rhs) const { return !operator==(rhs); }
|
||||||
|
|
||||||
bool isConstant;
|
const TIntermConstantUnion* constant;
|
||||||
union {
|
|
||||||
const TIntermConstantUnion* constant;
|
|
||||||
const TType* type;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef TVector<TSpirvTypeParameter> TSpirvTypeParameters;
|
typedef TVector<TSpirvTypeParameter> TSpirvTypeParameters;
|
||||||
|
|
|
||||||
|
|
@ -741,6 +741,16 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isUniform() const
|
||||||
|
{
|
||||||
|
switch (storage) {
|
||||||
|
case EvqUniform:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool isIo() const
|
bool isIo() const
|
||||||
{
|
{
|
||||||
switch (storage) {
|
switch (storage) {
|
||||||
|
|
@ -1855,10 +1865,12 @@ public:
|
||||||
bool isAtomic() const { return false; }
|
bool isAtomic() const { return false; }
|
||||||
bool isCoopMat() const { return false; }
|
bool isCoopMat() const { return false; }
|
||||||
bool isReference() const { return false; }
|
bool isReference() const { return false; }
|
||||||
|
bool isSpirvType() const { return false; }
|
||||||
#else
|
#else
|
||||||
bool isAtomic() const { return basicType == EbtAtomicUint; }
|
bool isAtomic() const { return basicType == EbtAtomicUint; }
|
||||||
bool isCoopMat() const { return coopmat; }
|
bool isCoopMat() const { return coopmat; }
|
||||||
bool isReference() const { return getBasicType() == EbtReference; }
|
bool isReference() const { return getBasicType() == EbtReference; }
|
||||||
|
bool isSpirvType() const { return getBasicType() == EbtSpirvType; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// return true if this type contains any subtype which satisfies the given predicate.
|
// return true if this type contains any subtype which satisfies the given predicate.
|
||||||
|
|
@ -2434,11 +2446,15 @@ public:
|
||||||
//
|
//
|
||||||
bool sameStructType(const TType& right) const
|
bool sameStructType(const TType& right) const
|
||||||
{
|
{
|
||||||
|
// TODO: Why return true when neither types are structures?
|
||||||
// Most commonly, they are both nullptr, or the same pointer to the same actual structure
|
// Most commonly, they are both nullptr, or the same pointer to the same actual structure
|
||||||
if ((!isStruct() && !right.isStruct()) ||
|
if ((!isStruct() && !right.isStruct()) ||
|
||||||
(isStruct() && right.isStruct() && structure == right.structure))
|
(isStruct() && right.isStruct() && structure == right.structure))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if (!isStruct() || !right.isStruct())
|
||||||
|
return false;
|
||||||
|
|
||||||
// Structure names have to match
|
// Structure names have to match
|
||||||
if (*typeName != *right.typeName)
|
if (*typeName != *right.typeName)
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -2448,8 +2464,7 @@ public:
|
||||||
bool isGLPerVertex = *typeName == "gl_PerVertex";
|
bool isGLPerVertex = *typeName == "gl_PerVertex";
|
||||||
|
|
||||||
// Both being nullptr was caught above, now they both have to be structures of the same number of elements
|
// Both being nullptr was caught above, now they both have to be structures of the same number of elements
|
||||||
if (!isStruct() || !right.isStruct() ||
|
if (structure->size() != right.structure->size() && !isGLPerVertex)
|
||||||
(structure->size() != right.structure->size() && !isGLPerVertex))
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Compare the names and types of all the members, which have to match
|
// Compare the names and types of all the members, which have to match
|
||||||
|
|
@ -2459,6 +2474,14 @@ public:
|
||||||
if (*(*structure)[li].type != *(*right.structure)[ri].type)
|
if (*(*structure)[li].type != *(*right.structure)[ri].type)
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
// Skip hidden members
|
||||||
|
if ((*structure)[li].type->hiddenMember()) {
|
||||||
|
ri--;
|
||||||
|
continue;
|
||||||
|
} else if ((*right.structure)[ri].type->hiddenMember()) {
|
||||||
|
li--;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// If one of the members is something that's inconsistently declared, skip over it
|
// If one of the members is something that's inconsistently declared, skip over it
|
||||||
// for now.
|
// for now.
|
||||||
if (isGLPerVertex) {
|
if (isGLPerVertex) {
|
||||||
|
|
@ -2475,10 +2498,10 @@ public:
|
||||||
}
|
}
|
||||||
// If we get here, then there should only be inconsistently declared members left
|
// If we get here, then there should only be inconsistently declared members left
|
||||||
} else if (li < structure->size()) {
|
} else if (li < structure->size()) {
|
||||||
if (!isInconsistentGLPerVertexMember((*structure)[li].type->getFieldName()))
|
if (!(*structure)[li].type->hiddenMember() && !isInconsistentGLPerVertexMember((*structure)[li].type->getFieldName()))
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if (!isInconsistentGLPerVertexMember((*right.structure)[ri].type->getFieldName()))
|
if (!(*right.structure)[ri].type->hiddenMember() && !isInconsistentGLPerVertexMember((*right.structure)[ri].type->getFieldName()))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -224,6 +224,9 @@ GLSLANG_EXPORT void glslang_finalize_process();
|
||||||
|
|
||||||
GLSLANG_EXPORT glslang_shader_t* glslang_shader_create(const glslang_input_t* input);
|
GLSLANG_EXPORT glslang_shader_t* glslang_shader_create(const glslang_input_t* input);
|
||||||
GLSLANG_EXPORT void glslang_shader_delete(glslang_shader_t* shader);
|
GLSLANG_EXPORT void glslang_shader_delete(glslang_shader_t* shader);
|
||||||
|
GLSLANG_EXPORT void glslang_shader_shift_binding(glslang_shader_t* shader, glslang_resource_type_t res, unsigned int base);
|
||||||
|
GLSLANG_EXPORT void glslang_shader_shift_binding_for_set(glslang_shader_t* shader, glslang_resource_type_t res, unsigned int base, unsigned int set);
|
||||||
|
GLSLANG_EXPORT void glslang_shader_set_options(glslang_shader_t* shader, int options); // glslang_shader_options_t
|
||||||
GLSLANG_EXPORT int glslang_shader_preprocess(glslang_shader_t* shader, const glslang_input_t* input);
|
GLSLANG_EXPORT int glslang_shader_preprocess(glslang_shader_t* shader, const glslang_input_t* input);
|
||||||
GLSLANG_EXPORT int glslang_shader_parse(glslang_shader_t* shader, const glslang_input_t* input);
|
GLSLANG_EXPORT int glslang_shader_parse(glslang_shader_t* shader, const glslang_input_t* input);
|
||||||
GLSLANG_EXPORT const char* glslang_shader_get_preprocessed_code(glslang_shader_t* shader);
|
GLSLANG_EXPORT const char* glslang_shader_get_preprocessed_code(glslang_shader_t* shader);
|
||||||
|
|
@ -234,6 +237,7 @@ GLSLANG_EXPORT glslang_program_t* glslang_program_create();
|
||||||
GLSLANG_EXPORT void glslang_program_delete(glslang_program_t* program);
|
GLSLANG_EXPORT void glslang_program_delete(glslang_program_t* program);
|
||||||
GLSLANG_EXPORT void glslang_program_add_shader(glslang_program_t* program, glslang_shader_t* shader);
|
GLSLANG_EXPORT void glslang_program_add_shader(glslang_program_t* program, glslang_shader_t* shader);
|
||||||
GLSLANG_EXPORT int glslang_program_link(glslang_program_t* program, int messages); // glslang_messages_t
|
GLSLANG_EXPORT int glslang_program_link(glslang_program_t* program, int messages); // glslang_messages_t
|
||||||
|
GLSLANG_EXPORT int glslang_program_map_io(glslang_program_t* program);
|
||||||
GLSLANG_EXPORT void glslang_program_SPIRV_generate(glslang_program_t* program, glslang_stage_t stage);
|
GLSLANG_EXPORT void glslang_program_SPIRV_generate(glslang_program_t* program, glslang_stage_t stage);
|
||||||
GLSLANG_EXPORT size_t glslang_program_SPIRV_get_size(glslang_program_t* program);
|
GLSLANG_EXPORT size_t glslang_program_SPIRV_get_size(glslang_program_t* program);
|
||||||
GLSLANG_EXPORT void glslang_program_SPIRV_get(glslang_program_t* program, unsigned int*);
|
GLSLANG_EXPORT void glslang_program_SPIRV_get(glslang_program_t* program, unsigned int*);
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,9 @@ typedef enum {
|
||||||
GLSLANG_TARGET_VULKAN_1_0 = (1 << 22),
|
GLSLANG_TARGET_VULKAN_1_0 = (1 << 22),
|
||||||
GLSLANG_TARGET_VULKAN_1_1 = (1 << 22) | (1 << 12),
|
GLSLANG_TARGET_VULKAN_1_1 = (1 << 22) | (1 << 12),
|
||||||
GLSLANG_TARGET_VULKAN_1_2 = (1 << 22) | (2 << 12),
|
GLSLANG_TARGET_VULKAN_1_2 = (1 << 22) | (2 << 12),
|
||||||
|
GLSLANG_TARGET_VULKAN_1_3 = (1 << 22) | (3 << 12),
|
||||||
GLSLANG_TARGET_OPENGL_450 = 450,
|
GLSLANG_TARGET_OPENGL_450 = 450,
|
||||||
LAST_ELEMENT_MARKER(GLSLANG_TARGET_CLIENT_VERSION_COUNT = 4),
|
LAST_ELEMENT_MARKER(GLSLANG_TARGET_CLIENT_VERSION_COUNT = 5),
|
||||||
} glslang_target_client_version_t;
|
} glslang_target_client_version_t;
|
||||||
|
|
||||||
/* SH_TARGET_LanguageVersion counterpart */
|
/* SH_TARGET_LanguageVersion counterpart */
|
||||||
|
|
@ -113,7 +114,8 @@ typedef enum {
|
||||||
GLSLANG_TARGET_SPV_1_3 = (1 << 16) | (3 << 8),
|
GLSLANG_TARGET_SPV_1_3 = (1 << 16) | (3 << 8),
|
||||||
GLSLANG_TARGET_SPV_1_4 = (1 << 16) | (4 << 8),
|
GLSLANG_TARGET_SPV_1_4 = (1 << 16) | (4 << 8),
|
||||||
GLSLANG_TARGET_SPV_1_5 = (1 << 16) | (5 << 8),
|
GLSLANG_TARGET_SPV_1_5 = (1 << 16) | (5 << 8),
|
||||||
LAST_ELEMENT_MARKER(GLSLANG_TARGET_LANGUAGE_VERSION_COUNT = 6),
|
GLSLANG_TARGET_SPV_1_6 = (1 << 16) | (6 << 8),
|
||||||
|
LAST_ELEMENT_MARKER(GLSLANG_TARGET_LANGUAGE_VERSION_COUNT = 7),
|
||||||
} glslang_target_language_version_t;
|
} glslang_target_language_version_t;
|
||||||
|
|
||||||
/* EShExecutable counterpart */
|
/* EShExecutable counterpart */
|
||||||
|
|
@ -181,6 +183,26 @@ typedef enum {
|
||||||
LAST_ELEMENT_MARKER(GLSLANG_PROFILE_COUNT),
|
LAST_ELEMENT_MARKER(GLSLANG_PROFILE_COUNT),
|
||||||
} glslang_profile_t;
|
} glslang_profile_t;
|
||||||
|
|
||||||
|
/* Shader options */
|
||||||
|
typedef enum {
|
||||||
|
GLSLANG_SHADER_DEFAULT_BIT = 0,
|
||||||
|
GLSLANG_SHADER_AUTO_MAP_BINDINGS = (1 << 0),
|
||||||
|
GLSLANG_SHADER_AUTO_MAP_LOCATIONS = (1 << 1),
|
||||||
|
GLSLANG_SHADER_VULKAN_RULES_RELAXED = (1 << 2),
|
||||||
|
LAST_ELEMENT_MARKER(GLSLANG_SHADER_COUNT),
|
||||||
|
} glslang_shader_options_t;
|
||||||
|
|
||||||
|
/* TResourceType counterpart */
|
||||||
|
typedef enum {
|
||||||
|
GLSLANG_RESOURCE_TYPE_SAMPLER,
|
||||||
|
GLSLANG_RESOURCE_TYPE_TEXTURE,
|
||||||
|
GLSLANG_RESOURCE_TYPE_IMAGE,
|
||||||
|
GLSLANG_RESOURCE_TYPE_UBO,
|
||||||
|
GLSLANG_RESOURCE_TYPE_SSBO,
|
||||||
|
GLSLANG_RESOURCE_TYPE_UAV,
|
||||||
|
LAST_ELEMENT_MARKER(GLSLANG_RESOURCE_TYPE_COUNT),
|
||||||
|
} glslang_resource_type_t;
|
||||||
|
|
||||||
#undef LAST_ELEMENT_MARKER
|
#undef LAST_ELEMENT_MARKER
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1643,6 +1643,7 @@ public:
|
||||||
~TIntermAggregate() { delete pragmaTable; }
|
~TIntermAggregate() { delete pragmaTable; }
|
||||||
virtual TIntermAggregate* getAsAggregate() { return this; }
|
virtual TIntermAggregate* getAsAggregate() { return this; }
|
||||||
virtual const TIntermAggregate* getAsAggregate() const { return this; }
|
virtual const TIntermAggregate* getAsAggregate() const { return this; }
|
||||||
|
virtual void updatePrecision();
|
||||||
virtual void setOperator(TOperator o) { op = o; }
|
virtual void setOperator(TOperator o) { op = o; }
|
||||||
virtual TIntermSequence& getSequence() { return sequence; }
|
virtual TIntermSequence& getSequence() { return sequence; }
|
||||||
virtual const TIntermSequence& getSequence() const { return sequence; }
|
virtual const TIntermSequence& getSequence() const { return sequence; }
|
||||||
|
|
|
||||||
|
|
@ -46,35 +46,6 @@ namespace {
|
||||||
|
|
||||||
using namespace glslang;
|
using namespace glslang;
|
||||||
|
|
||||||
typedef union {
|
|
||||||
double d;
|
|
||||||
int i[2];
|
|
||||||
} DoubleIntUnion;
|
|
||||||
|
|
||||||
// Some helper functions
|
|
||||||
|
|
||||||
bool isNan(double x)
|
|
||||||
{
|
|
||||||
DoubleIntUnion u;
|
|
||||||
// tough to find a platform independent library function, do it directly
|
|
||||||
u.d = x;
|
|
||||||
int bitPatternL = u.i[0];
|
|
||||||
int bitPatternH = u.i[1];
|
|
||||||
return (bitPatternH & 0x7ff80000) == 0x7ff80000 &&
|
|
||||||
((bitPatternH & 0xFFFFF) != 0 || bitPatternL != 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isInf(double x)
|
|
||||||
{
|
|
||||||
DoubleIntUnion u;
|
|
||||||
// tough to find a platform independent library function, do it directly
|
|
||||||
u.d = x;
|
|
||||||
int bitPatternL = u.i[0];
|
|
||||||
int bitPatternH = u.i[1];
|
|
||||||
return (bitPatternH & 0x7ff00000) == 0x7ff00000 &&
|
|
||||||
(bitPatternH & 0xFFFFF) == 0 && bitPatternL == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
const double pi = 3.1415926535897932384626433832795;
|
const double pi = 3.1415926535897932384626433832795;
|
||||||
|
|
||||||
} // end anonymous namespace
|
} // end anonymous namespace
|
||||||
|
|
@ -531,7 +502,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
|
||||||
case EbtFloat: newConstArray[i].setDConst(-unionArray[i].getDConst()); break;
|
case EbtFloat: newConstArray[i].setDConst(-unionArray[i].getDConst()); break;
|
||||||
// Note: avoid UBSAN error regarding negating 0x80000000
|
// Note: avoid UBSAN error regarding negating 0x80000000
|
||||||
case EbtInt: newConstArray[i].setIConst(
|
case EbtInt: newConstArray[i].setIConst(
|
||||||
unionArray[i].getIConst() == 0x80000000
|
static_cast<unsigned int>(unionArray[i].getIConst()) == 0x80000000
|
||||||
? -0x7FFFFFFF - 1
|
? -0x7FFFFFFF - 1
|
||||||
: -unionArray[i].getIConst());
|
: -unionArray[i].getIConst());
|
||||||
break;
|
break;
|
||||||
|
|
@ -663,12 +634,12 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
|
||||||
|
|
||||||
case EOpIsNan:
|
case EOpIsNan:
|
||||||
{
|
{
|
||||||
newConstArray[i].setBConst(isNan(unionArray[i].getDConst()));
|
newConstArray[i].setBConst(IsNan(unionArray[i].getDConst()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EOpIsInf:
|
case EOpIsInf:
|
||||||
{
|
{
|
||||||
newConstArray[i].setBConst(isInf(unionArray[i].getDConst()));
|
newConstArray[i].setBConst(IsInfinity(unionArray[i].getDConst()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
// Copyright (C) 2012-2016 LunarG, Inc.
|
// Copyright (C) 2012-2016 LunarG, Inc.
|
||||||
// Copyright (C) 2015-2020 Google, Inc.
|
// Copyright (C) 2015-2020 Google, Inc.
|
||||||
// Copyright (C) 2017 ARM Limited.
|
// Copyright (C) 2017 ARM Limited.
|
||||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
// Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -316,6 +316,7 @@ const CustomFunction CustomFunctions[] = {
|
||||||
|
|
||||||
{ EOpTextureQuerySize, "textureSize", nullptr },
|
{ EOpTextureQuerySize, "textureSize", nullptr },
|
||||||
{ EOpTextureQueryLod, "textureQueryLod", nullptr },
|
{ EOpTextureQueryLod, "textureQueryLod", nullptr },
|
||||||
|
{ EOpTextureQueryLod, "textureQueryLOD", nullptr }, // extension GL_ARB_texture_query_lod
|
||||||
{ EOpTextureQueryLevels, "textureQueryLevels", nullptr },
|
{ EOpTextureQueryLevels, "textureQueryLevels", nullptr },
|
||||||
{ EOpTextureQuerySamples, "textureSamples", nullptr },
|
{ EOpTextureQuerySamples, "textureSamples", nullptr },
|
||||||
{ EOpTexture, "texture", nullptr },
|
{ EOpTexture, "texture", nullptr },
|
||||||
|
|
@ -4159,106 +4160,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||||
"u16vec4 unpack16(uint64_t);"
|
"u16vec4 unpack16(uint64_t);"
|
||||||
"i32vec2 unpack32(int64_t);"
|
"i32vec2 unpack32(int64_t);"
|
||||||
"u32vec2 unpack32(uint64_t);"
|
"u32vec2 unpack32(uint64_t);"
|
||||||
|
|
||||||
"float64_t radians(float64_t);"
|
|
||||||
"f64vec2 radians(f64vec2);"
|
|
||||||
"f64vec3 radians(f64vec3);"
|
|
||||||
"f64vec4 radians(f64vec4);"
|
|
||||||
|
|
||||||
"float64_t degrees(float64_t);"
|
|
||||||
"f64vec2 degrees(f64vec2);"
|
|
||||||
"f64vec3 degrees(f64vec3);"
|
|
||||||
"f64vec4 degrees(f64vec4);"
|
|
||||||
|
|
||||||
"float64_t sin(float64_t);"
|
|
||||||
"f64vec2 sin(f64vec2);"
|
|
||||||
"f64vec3 sin(f64vec3);"
|
|
||||||
"f64vec4 sin(f64vec4);"
|
|
||||||
|
|
||||||
"float64_t cos(float64_t);"
|
|
||||||
"f64vec2 cos(f64vec2);"
|
|
||||||
"f64vec3 cos(f64vec3);"
|
|
||||||
"f64vec4 cos(f64vec4);"
|
|
||||||
|
|
||||||
"float64_t tan(float64_t);"
|
|
||||||
"f64vec2 tan(f64vec2);"
|
|
||||||
"f64vec3 tan(f64vec3);"
|
|
||||||
"f64vec4 tan(f64vec4);"
|
|
||||||
|
|
||||||
"float64_t asin(float64_t);"
|
|
||||||
"f64vec2 asin(f64vec2);"
|
|
||||||
"f64vec3 asin(f64vec3);"
|
|
||||||
"f64vec4 asin(f64vec4);"
|
|
||||||
|
|
||||||
"float64_t acos(float64_t);"
|
|
||||||
"f64vec2 acos(f64vec2);"
|
|
||||||
"f64vec3 acos(f64vec3);"
|
|
||||||
"f64vec4 acos(f64vec4);"
|
|
||||||
|
|
||||||
"float64_t atan(float64_t, float64_t);"
|
|
||||||
"f64vec2 atan(f64vec2, f64vec2);"
|
|
||||||
"f64vec3 atan(f64vec3, f64vec3);"
|
|
||||||
"f64vec4 atan(f64vec4, f64vec4);"
|
|
||||||
|
|
||||||
"float64_t atan(float64_t);"
|
|
||||||
"f64vec2 atan(f64vec2);"
|
|
||||||
"f64vec3 atan(f64vec3);"
|
|
||||||
"f64vec4 atan(f64vec4);"
|
|
||||||
|
|
||||||
"float64_t sinh(float64_t);"
|
|
||||||
"f64vec2 sinh(f64vec2);"
|
|
||||||
"f64vec3 sinh(f64vec3);"
|
|
||||||
"f64vec4 sinh(f64vec4);"
|
|
||||||
|
|
||||||
"float64_t cosh(float64_t);"
|
|
||||||
"f64vec2 cosh(f64vec2);"
|
|
||||||
"f64vec3 cosh(f64vec3);"
|
|
||||||
"f64vec4 cosh(f64vec4);"
|
|
||||||
|
|
||||||
"float64_t tanh(float64_t);"
|
|
||||||
"f64vec2 tanh(f64vec2);"
|
|
||||||
"f64vec3 tanh(f64vec3);"
|
|
||||||
"f64vec4 tanh(f64vec4);"
|
|
||||||
|
|
||||||
"float64_t asinh(float64_t);"
|
|
||||||
"f64vec2 asinh(f64vec2);"
|
|
||||||
"f64vec3 asinh(f64vec3);"
|
|
||||||
"f64vec4 asinh(f64vec4);"
|
|
||||||
|
|
||||||
"float64_t acosh(float64_t);"
|
|
||||||
"f64vec2 acosh(f64vec2);"
|
|
||||||
"f64vec3 acosh(f64vec3);"
|
|
||||||
"f64vec4 acosh(f64vec4);"
|
|
||||||
|
|
||||||
"float64_t atanh(float64_t);"
|
|
||||||
"f64vec2 atanh(f64vec2);"
|
|
||||||
"f64vec3 atanh(f64vec3);"
|
|
||||||
"f64vec4 atanh(f64vec4);"
|
|
||||||
|
|
||||||
"float64_t pow(float64_t, float64_t);"
|
|
||||||
"f64vec2 pow(f64vec2, f64vec2);"
|
|
||||||
"f64vec3 pow(f64vec3, f64vec3);"
|
|
||||||
"f64vec4 pow(f64vec4, f64vec4);"
|
|
||||||
|
|
||||||
"float64_t exp(float64_t);"
|
|
||||||
"f64vec2 exp(f64vec2);"
|
|
||||||
"f64vec3 exp(f64vec3);"
|
|
||||||
"f64vec4 exp(f64vec4);"
|
|
||||||
|
|
||||||
"float64_t log(float64_t);"
|
|
||||||
"f64vec2 log(f64vec2);"
|
|
||||||
"f64vec3 log(f64vec3);"
|
|
||||||
"f64vec4 log(f64vec4);"
|
|
||||||
|
|
||||||
"float64_t exp2(float64_t);"
|
|
||||||
"f64vec2 exp2(f64vec2);"
|
|
||||||
"f64vec3 exp2(f64vec3);"
|
|
||||||
"f64vec4 exp2(f64vec4);"
|
|
||||||
|
|
||||||
"float64_t log2(float64_t);"
|
|
||||||
"f64vec2 log2(f64vec2);"
|
|
||||||
"f64vec3 log2(f64vec3);"
|
|
||||||
"f64vec4 log2(f64vec4);"
|
|
||||||
"\n");
|
"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4369,7 +4270,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||||
//
|
//
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
if (profile != EEsProfile && version >= 400) {
|
if (profile != EEsProfile && (version >= 400 || version == 150)) {
|
||||||
stageBuiltins[EShLangGeometry].append(
|
stageBuiltins[EShLangGeometry].append(
|
||||||
"void EmitStreamVertex(int);"
|
"void EmitStreamVertex(int);"
|
||||||
"void EndStreamPrimitive(int);"
|
"void EndStreamPrimitive(int);"
|
||||||
|
|
@ -4653,7 +4554,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||||
"\n");
|
"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// GL_ARB_shader_clock & GL_EXT_shader_realtime_clock
|
// GL_ARB_shader_clock& GL_EXT_shader_realtime_clock
|
||||||
if (profile != EEsProfile && version >= 450) {
|
if (profile != EEsProfile && version >= 450) {
|
||||||
commonBuiltins.append(
|
commonBuiltins.append(
|
||||||
"uvec2 clock2x32ARB();"
|
"uvec2 clock2x32ARB();"
|
||||||
|
|
@ -5174,9 +5075,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version >= 450)
|
if (version >= 430)
|
||||||
stageBuiltins[EShLangVertex].append(
|
stageBuiltins[EShLangVertex].append(
|
||||||
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
|
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
|
||||||
|
);
|
||||||
|
|
||||||
|
if (version >= 450)
|
||||||
|
stageBuiltins[EShLangVertex].append(
|
||||||
"out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
"out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
||||||
"out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
"out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
||||||
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
||||||
|
|
@ -5312,9 +5217,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||||
"in int gl_InvocationID;"
|
"in int gl_InvocationID;"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (version >= 450)
|
if (version >= 430)
|
||||||
stageBuiltins[EShLangGeometry].append(
|
stageBuiltins[EShLangGeometry].append(
|
||||||
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
|
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
|
||||||
|
);
|
||||||
|
|
||||||
|
if (version >= 450)
|
||||||
|
stageBuiltins[EShLangGeometry].append(
|
||||||
"out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
"out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
||||||
"out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
"out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
||||||
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
||||||
|
|
@ -5390,7 +5299,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||||
if (version >= 450)
|
if (version >= 450)
|
||||||
stageBuiltins[EShLangTessControl].append(
|
stageBuiltins[EShLangTessControl].append(
|
||||||
"float gl_CullDistance[];"
|
"float gl_CullDistance[];"
|
||||||
|
);
|
||||||
|
if (version >= 430)
|
||||||
|
stageBuiltins[EShLangTessControl].append(
|
||||||
"int gl_ViewportMask[];" // GL_NV_viewport_array2
|
"int gl_ViewportMask[];" // GL_NV_viewport_array2
|
||||||
|
);
|
||||||
|
if (version >= 450)
|
||||||
|
stageBuiltins[EShLangTessControl].append(
|
||||||
"vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
"vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
||||||
"int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
"int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
||||||
"vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
"vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
||||||
|
|
@ -5493,9 +5408,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||||
"out int gl_Layer;"
|
"out int gl_Layer;"
|
||||||
"\n");
|
"\n");
|
||||||
|
|
||||||
if (version >= 450)
|
if (version >= 430)
|
||||||
stageBuiltins[EShLangTessEvaluation].append(
|
stageBuiltins[EShLangTessEvaluation].append(
|
||||||
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
|
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
|
||||||
|
);
|
||||||
|
|
||||||
|
if (version >= 450)
|
||||||
|
stageBuiltins[EShLangTessEvaluation].append(
|
||||||
"out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
"out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
||||||
"out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
"out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
||||||
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
||||||
|
|
@ -6329,38 +6248,44 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int
|
||||||
//
|
//
|
||||||
// textureQueryLod(), fragment stage only
|
// textureQueryLod(), fragment stage only
|
||||||
// Also enabled with extension GL_ARB_texture_query_lod
|
// Also enabled with extension GL_ARB_texture_query_lod
|
||||||
|
// Extension GL_ARB_texture_query_lod says that textureQueryLOD() also exist at extension.
|
||||||
|
|
||||||
if (profile != EEsProfile && version >= 150 && sampler.isCombined() && sampler.dim != EsdRect &&
|
if (profile != EEsProfile && version >= 150 && sampler.isCombined() && sampler.dim != EsdRect &&
|
||||||
! sampler.isMultiSample() && ! sampler.isBuffer()) {
|
! sampler.isMultiSample() && ! sampler.isBuffer()) {
|
||||||
for (int f16TexAddr = 0; f16TexAddr < 2; ++f16TexAddr) {
|
|
||||||
if (f16TexAddr && sampler.type != EbtFloat16)
|
|
||||||
continue;
|
|
||||||
stageBuiltins[EShLangFragment].append("vec2 textureQueryLod(");
|
|
||||||
stageBuiltins[EShLangFragment].append(typeName);
|
|
||||||
if (dimMap[sampler.dim] == 1)
|
|
||||||
if (f16TexAddr)
|
|
||||||
stageBuiltins[EShLangFragment].append(", float16_t");
|
|
||||||
else
|
|
||||||
stageBuiltins[EShLangFragment].append(", float");
|
|
||||||
else {
|
|
||||||
if (f16TexAddr)
|
|
||||||
stageBuiltins[EShLangFragment].append(", f16vec");
|
|
||||||
else
|
|
||||||
stageBuiltins[EShLangFragment].append(", vec");
|
|
||||||
stageBuiltins[EShLangFragment].append(postfixes[dimMap[sampler.dim]]);
|
|
||||||
}
|
|
||||||
stageBuiltins[EShLangFragment].append(");\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
stageBuiltins[EShLangCompute].append("vec2 textureQueryLod(");
|
const TString funcName[2] = {"vec2 textureQueryLod(", "vec2 textureQueryLOD("};
|
||||||
stageBuiltins[EShLangCompute].append(typeName);
|
|
||||||
if (dimMap[sampler.dim] == 1)
|
for (int i = 0; i < 2; ++i){
|
||||||
stageBuiltins[EShLangCompute].append(", float");
|
for (int f16TexAddr = 0; f16TexAddr < 2; ++f16TexAddr) {
|
||||||
else {
|
if (f16TexAddr && sampler.type != EbtFloat16)
|
||||||
stageBuiltins[EShLangCompute].append(", vec");
|
continue;
|
||||||
stageBuiltins[EShLangCompute].append(postfixes[dimMap[sampler.dim]]);
|
stageBuiltins[EShLangFragment].append(funcName[i]);
|
||||||
|
stageBuiltins[EShLangFragment].append(typeName);
|
||||||
|
if (dimMap[sampler.dim] == 1)
|
||||||
|
if (f16TexAddr)
|
||||||
|
stageBuiltins[EShLangFragment].append(", float16_t");
|
||||||
|
else
|
||||||
|
stageBuiltins[EShLangFragment].append(", float");
|
||||||
|
else {
|
||||||
|
if (f16TexAddr)
|
||||||
|
stageBuiltins[EShLangFragment].append(", f16vec");
|
||||||
|
else
|
||||||
|
stageBuiltins[EShLangFragment].append(", vec");
|
||||||
|
stageBuiltins[EShLangFragment].append(postfixes[dimMap[sampler.dim]]);
|
||||||
|
}
|
||||||
|
stageBuiltins[EShLangFragment].append(");\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
stageBuiltins[EShLangCompute].append(funcName[i]);
|
||||||
|
stageBuiltins[EShLangCompute].append(typeName);
|
||||||
|
if (dimMap[sampler.dim] == 1)
|
||||||
|
stageBuiltins[EShLangCompute].append(", float");
|
||||||
|
else {
|
||||||
|
stageBuiltins[EShLangCompute].append(", vec");
|
||||||
|
stageBuiltins[EShLangCompute].append(postfixes[dimMap[sampler.dim]]);
|
||||||
|
}
|
||||||
|
stageBuiltins[EShLangCompute].append(");\n");
|
||||||
}
|
}
|
||||||
stageBuiltins[EShLangCompute].append(");\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
@ -7701,6 +7626,11 @@ static void BuiltInVariable(const char* name, TBuiltInVariable builtIn, TSymbolT
|
||||||
symQualifier.builtIn = builtIn;
|
symQualifier.builtIn = builtIn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void RetargetVariable(const char* from, const char* to, TSymbolTable& symbolTable)
|
||||||
|
{
|
||||||
|
symbolTable.retargetSymbol(from, to);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// For built-in variables inside a named block.
|
// For built-in variables inside a named block.
|
||||||
// SpecialQualifier() won't ever go inside a block; their member's qualifier come
|
// SpecialQualifier() won't ever go inside a block; their member's qualifier come
|
||||||
|
|
@ -7768,8 +7698,8 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||||
|
|
||||||
if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) {
|
if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) {
|
||||||
// treat these built-ins as aliases of VertexIndex and InstanceIndex
|
// treat these built-ins as aliases of VertexIndex and InstanceIndex
|
||||||
BuiltInVariable("gl_VertexID", EbvVertexIndex, symbolTable);
|
RetargetVariable("gl_InstanceID", "gl_InstanceIndex", symbolTable);
|
||||||
BuiltInVariable("gl_InstanceID", EbvInstanceIndex, symbolTable);
|
RetargetVariable("gl_VertexID", "gl_VertexIndex", symbolTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profile != EEsProfile) {
|
if (profile != EEsProfile) {
|
||||||
|
|
@ -8140,7 +8070,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profile != EEsProfile && version < 400) {
|
if (profile != EEsProfile && version < 400) {
|
||||||
symbolTable.setFunctionExtensions("textureQueryLod", 1, &E_GL_ARB_texture_query_lod);
|
symbolTable.setFunctionExtensions("textureQueryLOD", 1, &E_GL_ARB_texture_query_lod);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profile != EEsProfile && version >= 460) {
|
if (profile != EEsProfile && version >= 460) {
|
||||||
|
|
@ -8403,7 +8333,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||||
symbolTable.setFunctionExtensions("clockARB", 1, &E_GL_ARB_shader_clock);
|
symbolTable.setFunctionExtensions("clockARB", 1, &E_GL_ARB_shader_clock);
|
||||||
symbolTable.setFunctionExtensions("clock2x32ARB", 1, &E_GL_ARB_shader_clock);
|
symbolTable.setFunctionExtensions("clock2x32ARB", 1, &E_GL_ARB_shader_clock);
|
||||||
|
|
||||||
symbolTable.setFunctionExtensions("clockRealtimeEXT", 1, &E_GL_EXT_shader_realtime_clock);
|
symbolTable.setFunctionExtensions("clockRealtimeEXT", 1, &E_GL_EXT_shader_realtime_clock);
|
||||||
symbolTable.setFunctionExtensions("clockRealtime2x32EXT", 1, &E_GL_EXT_shader_realtime_clock);
|
symbolTable.setFunctionExtensions("clockRealtime2x32EXT", 1, &E_GL_EXT_shader_realtime_clock);
|
||||||
|
|
||||||
if (profile == EEsProfile && version < 320) {
|
if (profile == EEsProfile && version < 320) {
|
||||||
|
|
@ -8423,10 +8353,11 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profile != EEsProfile && version < 330 ) {
|
if (profile != EEsProfile && version < 330 ) {
|
||||||
symbolTable.setFunctionExtensions("floatBitsToInt", 1, &E_GL_ARB_shader_bit_encoding);
|
const char* bitsConvertExt[2] = {E_GL_ARB_shader_bit_encoding, E_GL_ARB_gpu_shader5};
|
||||||
symbolTable.setFunctionExtensions("floatBitsToUint", 1, &E_GL_ARB_shader_bit_encoding);
|
symbolTable.setFunctionExtensions("floatBitsToInt", 2, bitsConvertExt);
|
||||||
symbolTable.setFunctionExtensions("intBitsToFloat", 1, &E_GL_ARB_shader_bit_encoding);
|
symbolTable.setFunctionExtensions("floatBitsToUint", 2, bitsConvertExt);
|
||||||
symbolTable.setFunctionExtensions("uintBitsToFloat", 1, &E_GL_ARB_shader_bit_encoding);
|
symbolTable.setFunctionExtensions("intBitsToFloat", 2, bitsConvertExt);
|
||||||
|
symbolTable.setFunctionExtensions("uintBitsToFloat", 2, bitsConvertExt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profile != EEsProfile && version < 430 ) {
|
if (profile != EEsProfile && version < 430 ) {
|
||||||
|
|
|
||||||
|
|
@ -416,20 +416,24 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child,
|
||||||
// TODO: but, did this bypass constant folding?
|
// TODO: but, did this bypass constant folding?
|
||||||
//
|
//
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case EOpConstructInt8:
|
case EOpConstructInt8:
|
||||||
case EOpConstructUint8:
|
case EOpConstructUint8:
|
||||||
case EOpConstructInt16:
|
case EOpConstructInt16:
|
||||||
case EOpConstructUint16:
|
case EOpConstructUint16:
|
||||||
case EOpConstructInt:
|
case EOpConstructInt:
|
||||||
case EOpConstructUint:
|
case EOpConstructUint:
|
||||||
case EOpConstructInt64:
|
case EOpConstructInt64:
|
||||||
case EOpConstructUint64:
|
case EOpConstructUint64:
|
||||||
case EOpConstructBool:
|
case EOpConstructBool:
|
||||||
case EOpConstructFloat:
|
case EOpConstructFloat:
|
||||||
case EOpConstructDouble:
|
case EOpConstructDouble:
|
||||||
case EOpConstructFloat16:
|
case EOpConstructFloat16: {
|
||||||
return child;
|
TIntermUnary* unary_node = child->getAsUnaryNode();
|
||||||
default: break; // some compilers want this
|
if (unary_node != nullptr)
|
||||||
|
unary_node->updatePrecision();
|
||||||
|
return child;
|
||||||
|
}
|
||||||
|
default: break; // some compilers want this
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
@ -3776,6 +3780,28 @@ bool TIntermediate::promoteAggregate(TIntermAggregate& node)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Propagate precision qualifiers *up* from children to parent, and then
|
||||||
|
// back *down* again to the children's subtrees.
|
||||||
|
void TIntermAggregate::updatePrecision()
|
||||||
|
{
|
||||||
|
if (getBasicType() == EbtInt || getBasicType() == EbtUint ||
|
||||||
|
getBasicType() == EbtFloat || getBasicType() == EbtFloat16) {
|
||||||
|
TPrecisionQualifier maxPrecision = EpqNone;
|
||||||
|
TIntermSequence operands = getSequence();
|
||||||
|
for (unsigned int i = 0; i < operands.size(); ++i) {
|
||||||
|
TIntermTyped* typedNode = operands[i]->getAsTyped();
|
||||||
|
assert(typedNode);
|
||||||
|
maxPrecision = std::max(maxPrecision, typedNode->getQualifier().precision);
|
||||||
|
}
|
||||||
|
getQualifier().precision = maxPrecision;
|
||||||
|
for (unsigned int i = 0; i < operands.size(); ++i) {
|
||||||
|
TIntermTyped* typedNode = operands[i]->getAsTyped();
|
||||||
|
assert(typedNode);
|
||||||
|
typedNode->propagatePrecision(maxPrecision);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Propagate precision qualifiers *up* from children to parent, and then
|
// Propagate precision qualifiers *up* from children to parent, and then
|
||||||
// back *down* again to the children's subtrees.
|
// back *down* again to the children's subtrees.
|
||||||
void TIntermBinary::updatePrecision()
|
void TIntermBinary::updatePrecision()
|
||||||
|
|
@ -3876,7 +3902,7 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC
|
||||||
case EbtFloat16: PROMOTE(setDConst, double, Get); break; \
|
case EbtFloat16: PROMOTE(setDConst, double, Get); break; \
|
||||||
case EbtFloat: PROMOTE(setDConst, double, Get); break; \
|
case EbtFloat: PROMOTE(setDConst, double, Get); break; \
|
||||||
case EbtDouble: PROMOTE(setDConst, double, Get); break; \
|
case EbtDouble: PROMOTE(setDConst, double, Get); break; \
|
||||||
case EbtInt8: PROMOTE(setI8Const, char, Get); break; \
|
case EbtInt8: PROMOTE(setI8Const, signed char, Get); break; \
|
||||||
case EbtInt16: PROMOTE(setI16Const, short, Get); break; \
|
case EbtInt16: PROMOTE(setI16Const, short, Get); break; \
|
||||||
case EbtInt: PROMOTE(setIConst, int, Get); break; \
|
case EbtInt: PROMOTE(setIConst, int, Get); break; \
|
||||||
case EbtInt64: PROMOTE(setI64Const, long long, Get); break; \
|
case EbtInt64: PROMOTE(setI64Const, long long, Get); break; \
|
||||||
|
|
|
||||||
|
|
@ -622,6 +622,19 @@ void TParseContextBase::growGlobalUniformBlock(const TSourceLoc& loc, TType& mem
|
||||||
globalUniformBlock->getWritableType().getQualifier().layoutBinding = globalUniformBinding;
|
globalUniformBlock->getWritableType().getQualifier().layoutBinding = globalUniformBinding;
|
||||||
globalUniformBlock->getWritableType().getQualifier().layoutSet = globalUniformSet;
|
globalUniformBlock->getWritableType().getQualifier().layoutSet = globalUniformSet;
|
||||||
|
|
||||||
|
// Check for declarations of this default uniform that already exist due to other compilation units.
|
||||||
|
TSymbol* symbol = symbolTable.find(memberName);
|
||||||
|
if (symbol) {
|
||||||
|
if (memberType != symbol->getType()) {
|
||||||
|
TString err;
|
||||||
|
err += "\"" + memberType.getCompleteString() + "\"";
|
||||||
|
err += " versus ";
|
||||||
|
err += "\"" + symbol->getType().getCompleteString() + "\"";
|
||||||
|
error(loc, "Types must match:", memberType.getFieldName().c_str(), err.c_str());
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Add the requested member as a member to the global block.
|
// Add the requested member as a member to the global block.
|
||||||
TType* type = new TType;
|
TType* type = new TType;
|
||||||
type->shallowCopy(memberType);
|
type->shallowCopy(memberType);
|
||||||
|
|
|
||||||
|
|
@ -1321,7 +1321,7 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
|
||||||
// Find it in the symbol table.
|
// Find it in the symbol table.
|
||||||
//
|
//
|
||||||
const TFunction* fnCandidate;
|
const TFunction* fnCandidate;
|
||||||
bool builtIn;
|
bool builtIn {false};
|
||||||
fnCandidate = findFunction(loc, *function, builtIn);
|
fnCandidate = findFunction(loc, *function, builtIn);
|
||||||
if (fnCandidate) {
|
if (fnCandidate) {
|
||||||
// This is a declared function that might map to
|
// This is a declared function that might map to
|
||||||
|
|
@ -2495,6 +2495,8 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
|
||||||
|
|
||||||
case EOpEmitStreamVertex:
|
case EOpEmitStreamVertex:
|
||||||
case EOpEndStreamPrimitive:
|
case EOpEndStreamPrimitive:
|
||||||
|
if (version == 150)
|
||||||
|
requireExtensions(loc, 1, &E_GL_ARB_gpu_shader5, "if the verison is 150 , the EmitStreamVertex and EndStreamPrimitive only support at extension GL_ARB_gpu_shader5");
|
||||||
intermediate.setMultiStream();
|
intermediate.setMultiStream();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -3029,11 +3031,14 @@ void TParseContext::constantValueCheck(TIntermTyped* node, const char* token)
|
||||||
|
|
||||||
//
|
//
|
||||||
// Both test, and if necessary spit out an error, to see if the node is really
|
// Both test, and if necessary spit out an error, to see if the node is really
|
||||||
// an integer.
|
// a 32-bit integer or can implicitly convert to one.
|
||||||
//
|
//
|
||||||
void TParseContext::integerCheck(const TIntermTyped* node, const char* token)
|
void TParseContext::integerCheck(const TIntermTyped* node, const char* token)
|
||||||
{
|
{
|
||||||
if ((node->getBasicType() == EbtInt || node->getBasicType() == EbtUint) && node->isScalar())
|
auto from_type = node->getBasicType();
|
||||||
|
if ((from_type == EbtInt || from_type == EbtUint ||
|
||||||
|
intermediate.canImplicitlyPromote(from_type, EbtInt, EOpNull) ||
|
||||||
|
intermediate.canImplicitlyPromote(from_type, EbtUint, EOpNull)) && node->isScalar())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
error(node->getLoc(), "scalar integer expression required", token, "");
|
error(node->getLoc(), "scalar integer expression required", token, "");
|
||||||
|
|
@ -6207,11 +6212,13 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
||||||
|
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
if (qualifier.hasXfbOffset() && qualifier.hasXfbBuffer()) {
|
if (qualifier.hasXfbOffset() && qualifier.hasXfbBuffer()) {
|
||||||
int repeated = intermediate.addXfbBufferOffset(type);
|
if (type.isUnsizedArray()) {
|
||||||
if (repeated >= 0)
|
|
||||||
error(loc, "overlapping offsets at", "xfb_offset", "offset %d in buffer %d", repeated, qualifier.layoutXfbBuffer);
|
|
||||||
if (type.isUnsizedArray())
|
|
||||||
error(loc, "unsized array", "xfb_offset", "in buffer %d", qualifier.layoutXfbBuffer);
|
error(loc, "unsized array", "xfb_offset", "in buffer %d", qualifier.layoutXfbBuffer);
|
||||||
|
} else {
|
||||||
|
int repeated = intermediate.addXfbBufferOffset(type);
|
||||||
|
if (repeated >= 0)
|
||||||
|
error(loc, "overlapping offsets at", "xfb_offset", "offset %d in buffer %d", repeated, qualifier.layoutXfbBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
// "The offset must be a multiple of the size of the first component of the first
|
// "The offset must be a multiple of the size of the first component of the first
|
||||||
// qualified variable or block member, or a compile-time error results. Further, if applied to an aggregate
|
// qualified variable or block member, or a compile-time error results. Further, if applied to an aggregate
|
||||||
|
|
@ -6493,6 +6500,8 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
|
||||||
error(loc, "can only be used with a uniform", "push_constant", "");
|
error(loc, "can only be used with a uniform", "push_constant", "");
|
||||||
if (qualifier.hasSet())
|
if (qualifier.hasSet())
|
||||||
error(loc, "cannot be used with push_constant", "set", "");
|
error(loc, "cannot be used with push_constant", "set", "");
|
||||||
|
if (qualifier.hasBinding())
|
||||||
|
error(loc, "cannot be used with push_constant", "binding", "");
|
||||||
}
|
}
|
||||||
if (qualifier.hasBufferReference()) {
|
if (qualifier.hasBufferReference()) {
|
||||||
if (qualifier.storage != EvqBuffer)
|
if (qualifier.storage != EvqBuffer)
|
||||||
|
|
@ -6647,8 +6656,10 @@ const TFunction* TParseContext::findFunction(const TSourceLoc& loc, const TFunct
|
||||||
: findFunctionExact(loc, call, builtIn));
|
: findFunctionExact(loc, call, builtIn));
|
||||||
else if (version < 120)
|
else if (version < 120)
|
||||||
function = findFunctionExact(loc, call, builtIn);
|
function = findFunctionExact(loc, call, builtIn);
|
||||||
else if (version < 400)
|
else if (version < 400) {
|
||||||
function = extensionTurnedOn(E_GL_ARB_gpu_shader_fp64) ? findFunction400(loc, call, builtIn) : findFunction120(loc, call, builtIn);
|
bool needfindFunction400 = extensionTurnedOn(E_GL_ARB_gpu_shader_fp64) || extensionTurnedOn(E_GL_ARB_gpu_shader5);
|
||||||
|
function = needfindFunction400 ? findFunction400(loc, call, builtIn) : findFunction120(loc, call, builtIn);
|
||||||
|
}
|
||||||
else if (explicitTypesEnabled)
|
else if (explicitTypesEnabled)
|
||||||
function = findFunctionExplicitTypes(loc, call, builtIn);
|
function = findFunctionExplicitTypes(loc, call, builtIn);
|
||||||
else
|
else
|
||||||
|
|
@ -7691,7 +7702,13 @@ TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode*
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
return intermediate.setAggregateOperator(aggrNode, op, type, loc);
|
TIntermTyped *ret_node = intermediate.setAggregateOperator(aggrNode, op, type, loc);
|
||||||
|
|
||||||
|
TIntermAggregate *agg_node = ret_node->getAsAggregate();
|
||||||
|
if (agg_node && (agg_node->isVector() || agg_node->isArray() || agg_node->isMatrix()))
|
||||||
|
agg_node->updatePrecision();
|
||||||
|
|
||||||
|
return ret_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function for constructor implementation. Calls addUnaryMath with appropriate EOp value
|
// Function for constructor implementation. Calls addUnaryMath with appropriate EOp value
|
||||||
|
|
@ -9237,11 +9254,14 @@ TIntermNode* TParseContext::addSwitch(const TSourceLoc& loc, TIntermTyped* expre
|
||||||
// "it is an error to have no statement between a label and the end of the switch statement."
|
// "it is an error to have no statement between a label and the end of the switch statement."
|
||||||
// The specifications were updated to remove this (being ill-defined what a "statement" was),
|
// The specifications were updated to remove this (being ill-defined what a "statement" was),
|
||||||
// so, this became a warning. However, 3.0 tests still check for the error.
|
// so, this became a warning. However, 3.0 tests still check for the error.
|
||||||
if (isEsProfile() && version <= 300 && ! relaxedErrors())
|
if (isEsProfile() && (version <= 300 || version >= 320) && ! relaxedErrors())
|
||||||
|
error(loc, "last case/default label not followed by statements", "switch", "");
|
||||||
|
else if (!isEsProfile() && (version <= 430 || version >= 460))
|
||||||
error(loc, "last case/default label not followed by statements", "switch", "");
|
error(loc, "last case/default label not followed by statements", "switch", "");
|
||||||
else
|
else
|
||||||
warn(loc, "last case/default label not followed by statements", "switch", "");
|
warn(loc, "last case/default label not followed by statements", "switch", "");
|
||||||
|
|
||||||
|
|
||||||
// emulate a break for error recovery
|
// emulate a break for error recovery
|
||||||
lastStatements = intermediate.makeAggregate(intermediate.addBranch(EOpBreak, loc));
|
lastStatements = intermediate.makeAggregate(intermediate.addBranch(EOpBreak, loc));
|
||||||
lastStatements->setOperator(EOpSequence);
|
lastStatements->setOperator(EOpSequence);
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,7 @@ protected:
|
||||||
// override this to set the language-specific name
|
// override this to set the language-specific name
|
||||||
virtual const char* getAtomicCounterBlockName() const { return ""; }
|
virtual const char* getAtomicCounterBlockName() const { return ""; }
|
||||||
virtual void setAtomicCounterBlockDefaults(TType&) const {}
|
virtual void setAtomicCounterBlockDefaults(TType&) const {}
|
||||||
virtual void setInvariant(const TSourceLoc& loc, const char* builtin) {}
|
virtual void setInvariant(const TSourceLoc&, const char*) {}
|
||||||
virtual void finalizeAtomicCounterBlockLayout(TVariable&) {}
|
virtual void finalizeAtomicCounterBlockLayout(TVariable&) {}
|
||||||
bool isAtomicCounterBlock(const TSymbol& symbol) {
|
bool isAtomicCounterBlock(const TSymbol& symbol) {
|
||||||
const TVariable* var = symbol.getAsVariable();
|
const TVariable* var = symbol.getAsVariable();
|
||||||
|
|
@ -472,7 +472,7 @@ public:
|
||||||
// Determine loop control from attributes
|
// Determine loop control from attributes
|
||||||
void handleLoopAttributes(const TAttributes& attributes, TIntermNode*);
|
void handleLoopAttributes(const TAttributes& attributes, TIntermNode*);
|
||||||
// Function attributes
|
// Function attributes
|
||||||
void handleFunctionAttributes(const TSourceLoc&, const TAttributes&, TFunction*);
|
void handleFunctionAttributes(const TSourceLoc&, const TAttributes&);
|
||||||
|
|
||||||
// GL_EXT_spirv_intrinsics
|
// GL_EXT_spirv_intrinsics
|
||||||
TSpirvRequirement* makeSpirvRequirement(const TSourceLoc& loc, const TString& name,
|
TSpirvRequirement* makeSpirvRequirement(const TSourceLoc& loc, const TString& name,
|
||||||
|
|
@ -480,7 +480,6 @@ public:
|
||||||
TSpirvRequirement* mergeSpirvRequirements(const TSourceLoc& loc, TSpirvRequirement* spirvReq1,
|
TSpirvRequirement* mergeSpirvRequirements(const TSourceLoc& loc, TSpirvRequirement* spirvReq1,
|
||||||
TSpirvRequirement* spirvReq2);
|
TSpirvRequirement* spirvReq2);
|
||||||
TSpirvTypeParameters* makeSpirvTypeParameters(const TSourceLoc& loc, const TIntermConstantUnion* constant);
|
TSpirvTypeParameters* makeSpirvTypeParameters(const TSourceLoc& loc, const TIntermConstantUnion* constant);
|
||||||
TSpirvTypeParameters* makeSpirvTypeParameters(const TPublicType& type);
|
|
||||||
TSpirvTypeParameters* mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1,
|
TSpirvTypeParameters* mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1,
|
||||||
TSpirvTypeParameters* spirvTypeParams2);
|
TSpirvTypeParameters* spirvTypeParams2);
|
||||||
TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, const TString& value);
|
TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, const TString& value);
|
||||||
|
|
|
||||||
|
|
@ -1343,7 +1343,6 @@ int ShInitialize()
|
||||||
|
|
||||||
glslang::GetGlobalLock();
|
glslang::GetGlobalLock();
|
||||||
++NumberOfClients;
|
++NumberOfClients;
|
||||||
glslang::ReleaseGlobalLock();
|
|
||||||
|
|
||||||
if (PerProcessGPA == nullptr)
|
if (PerProcessGPA == nullptr)
|
||||||
PerProcessGPA = new TPoolAllocator();
|
PerProcessGPA = new TPoolAllocator();
|
||||||
|
|
@ -1353,6 +1352,7 @@ int ShInitialize()
|
||||||
glslang::HlslScanContext::fillInKeywordMap();
|
glslang::HlslScanContext::fillInKeywordMap();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
glslang::ReleaseGlobalLock();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1415,9 +1415,10 @@ int ShFinalize()
|
||||||
--NumberOfClients;
|
--NumberOfClients;
|
||||||
assert(NumberOfClients >= 0);
|
assert(NumberOfClients >= 0);
|
||||||
bool finalize = NumberOfClients == 0;
|
bool finalize = NumberOfClients == 0;
|
||||||
glslang::ReleaseGlobalLock();
|
if (! finalize) {
|
||||||
if (! finalize)
|
glslang::ReleaseGlobalLock();
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
for (int version = 0; version < VersionCount; ++version) {
|
for (int version = 0; version < VersionCount; ++version) {
|
||||||
for (int spvVersion = 0; spvVersion < SpvVersionCount; ++spvVersion) {
|
for (int spvVersion = 0; spvVersion < SpvVersionCount; ++spvVersion) {
|
||||||
|
|
@ -1455,6 +1456,7 @@ int ShFinalize()
|
||||||
glslang::HlslScanContext::deleteKeywordMap();
|
glslang::HlslScanContext::deleteKeywordMap();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
glslang::ReleaseGlobalLock();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1827,6 +1829,7 @@ void TShader::setUniqueId(unsigned long long id)
|
||||||
}
|
}
|
||||||
|
|
||||||
void TShader::setInvertY(bool invert) { intermediate->setInvertY(invert); }
|
void TShader::setInvertY(bool invert) { intermediate->setInvertY(invert); }
|
||||||
|
void TShader::setDxPositionW(bool invert) { intermediate->setDxPositionW(invert); }
|
||||||
void TShader::setNanMinMaxClamp(bool useNonNan) { intermediate->setNanMinMaxClamp(useNonNan); }
|
void TShader::setNanMinMaxClamp(bool useNonNan) { intermediate->setNanMinMaxClamp(useNonNan); }
|
||||||
|
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
|
|
|
||||||
|
|
@ -130,11 +130,11 @@ void TIntermediate::insertSpirvExecutionModeId(int executionMode, const TIntermA
|
||||||
spirvExecutionMode = new TSpirvExecutionMode;
|
spirvExecutionMode = new TSpirvExecutionMode;
|
||||||
|
|
||||||
assert(args);
|
assert(args);
|
||||||
TVector<const TIntermConstantUnion*> extraOperands;
|
TVector<const TIntermTyped*> extraOperands;
|
||||||
|
|
||||||
for (auto arg : args->getSequence()) {
|
for (auto arg : args->getSequence()) {
|
||||||
auto extraOperand = arg->getAsConstantUnion();
|
auto extraOperand = arg->getAsTyped();
|
||||||
assert(extraOperand != nullptr);
|
assert(extraOperand != nullptr && extraOperand->getQualifier().isConstant());
|
||||||
extraOperands.push_back(extraOperand);
|
extraOperands.push_back(extraOperand);
|
||||||
}
|
}
|
||||||
spirvExecutionMode->modeIds[executionMode] = extraOperands;
|
spirvExecutionMode->modeIds[executionMode] = extraOperands;
|
||||||
|
|
@ -165,10 +165,10 @@ void TQualifier::setSpirvDecorateId(int decoration, const TIntermAggregate* args
|
||||||
spirvDecorate = new TSpirvDecorate;
|
spirvDecorate = new TSpirvDecorate;
|
||||||
|
|
||||||
assert(args);
|
assert(args);
|
||||||
TVector<const TIntermConstantUnion*> extraOperands;
|
TVector<const TIntermTyped*> extraOperands;
|
||||||
for (auto arg : args->getSequence()) {
|
for (auto arg : args->getSequence()) {
|
||||||
auto extraOperand = arg->getAsConstantUnion();
|
auto extraOperand = arg->getAsTyped();
|
||||||
assert(extraOperand != nullptr);
|
assert(extraOperand != nullptr && extraOperand->getQualifier().isConstant());
|
||||||
extraOperands.push_back(extraOperand);
|
extraOperands.push_back(extraOperand);
|
||||||
}
|
}
|
||||||
spirvDecorate->decorateIds[decoration] = extraOperands;
|
spirvDecorate->decorateIds[decoration] = extraOperands;
|
||||||
|
|
@ -201,25 +201,27 @@ TString TQualifier::getSpirvDecorateQualifierString() const
|
||||||
const auto appendBool = [&](bool b) { qualifierString.append(std::to_string(b).c_str()); };
|
const auto appendBool = [&](bool b) { qualifierString.append(std::to_string(b).c_str()); };
|
||||||
const auto appendStr = [&](const char* s) { qualifierString.append(s); };
|
const auto appendStr = [&](const char* s) { qualifierString.append(s); };
|
||||||
|
|
||||||
const auto appendDecorate = [&](const TIntermConstantUnion* constant) {
|
const auto appendDecorate = [&](const TIntermTyped* constant) {
|
||||||
|
auto& constArray = constant->getAsConstantUnion() != nullptr ? constant->getAsConstantUnion()->getConstArray()
|
||||||
|
: constant->getAsSymbolNode()->getConstArray();
|
||||||
if (constant->getBasicType() == EbtFloat) {
|
if (constant->getBasicType() == EbtFloat) {
|
||||||
float value = static_cast<float>(constant->getConstArray()[0].getDConst());
|
float value = static_cast<float>(constArray[0].getDConst());
|
||||||
appendFloat(value);
|
appendFloat(value);
|
||||||
}
|
}
|
||||||
else if (constant->getBasicType() == EbtInt) {
|
else if (constant->getBasicType() == EbtInt) {
|
||||||
int value = constant->getConstArray()[0].getIConst();
|
int value = constArray[0].getIConst();
|
||||||
appendInt(value);
|
appendInt(value);
|
||||||
}
|
}
|
||||||
else if (constant->getBasicType() == EbtUint) {
|
else if (constant->getBasicType() == EbtUint) {
|
||||||
unsigned value = constant->getConstArray()[0].getUConst();
|
unsigned value = constArray[0].getUConst();
|
||||||
appendUint(value);
|
appendUint(value);
|
||||||
}
|
}
|
||||||
else if (constant->getBasicType() == EbtBool) {
|
else if (constant->getBasicType() == EbtBool) {
|
||||||
bool value = constant->getConstArray()[0].getBConst();
|
bool value = constArray[0].getBConst();
|
||||||
appendBool(value);
|
appendBool(value);
|
||||||
}
|
}
|
||||||
else if (constant->getBasicType() == EbtString) {
|
else if (constant->getBasicType() == EbtString) {
|
||||||
const TString* value = constant->getConstArray()[0].getSConst();
|
const TString* value = constArray[0].getSConst();
|
||||||
appendStr(value->c_str());
|
appendStr(value->c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -290,13 +292,6 @@ TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TSourceLoc& l
|
||||||
return spirvTypeParams;
|
return spirvTypeParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TPublicType& type)
|
|
||||||
{
|
|
||||||
TSpirvTypeParameters* spirvTypeParams = new TSpirvTypeParameters;
|
|
||||||
spirvTypeParams->push_back(TSpirvTypeParameter(new TType(type)));
|
|
||||||
return spirvTypeParams;
|
|
||||||
}
|
|
||||||
|
|
||||||
TSpirvTypeParameters* TParseContext::mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1, TSpirvTypeParameters* spirvTypeParams2)
|
TSpirvTypeParameters* TParseContext::mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1, TSpirvTypeParameters* spirvTypeParams2)
|
||||||
{
|
{
|
||||||
// Merge SPIR-V type parameters of the second one to the first one
|
// Merge SPIR-V type parameters of the second one to the first one
|
||||||
|
|
|
||||||
|
|
@ -279,8 +279,14 @@ TFunction::~TFunction()
|
||||||
//
|
//
|
||||||
TSymbolTableLevel::~TSymbolTableLevel()
|
TSymbolTableLevel::~TSymbolTableLevel()
|
||||||
{
|
{
|
||||||
for (tLevel::iterator it = level.begin(); it != level.end(); ++it)
|
for (tLevel::iterator it = level.begin(); it != level.end(); ++it) {
|
||||||
delete (*it).second;
|
const TString& name = it->first;
|
||||||
|
auto retargetIter = std::find_if(retargetedSymbols.begin(), retargetedSymbols.end(),
|
||||||
|
[&name](const std::pair<TString, TString>& i) { return i.first == name; });
|
||||||
|
if (retargetIter == retargetedSymbols.end())
|
||||||
|
delete (*it).second;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
delete [] defaultPrecision;
|
delete [] defaultPrecision;
|
||||||
}
|
}
|
||||||
|
|
@ -418,6 +424,10 @@ TSymbolTableLevel* TSymbolTableLevel::clone() const
|
||||||
TSymbolTableLevel *symTableLevel = new TSymbolTableLevel();
|
TSymbolTableLevel *symTableLevel = new TSymbolTableLevel();
|
||||||
symTableLevel->anonId = anonId;
|
symTableLevel->anonId = anonId;
|
||||||
symTableLevel->thisLevel = thisLevel;
|
symTableLevel->thisLevel = thisLevel;
|
||||||
|
symTableLevel->retargetedSymbols.clear();
|
||||||
|
for (auto &s : retargetedSymbols) {
|
||||||
|
symTableLevel->retargetedSymbols.push_back({s.first, s.second});
|
||||||
|
}
|
||||||
std::vector<bool> containerCopied(anonId, false);
|
std::vector<bool> containerCopied(anonId, false);
|
||||||
tLevel::const_iterator iter;
|
tLevel::const_iterator iter;
|
||||||
for (iter = level.begin(); iter != level.end(); ++iter) {
|
for (iter = level.begin(); iter != level.end(); ++iter) {
|
||||||
|
|
@ -433,8 +443,21 @@ TSymbolTableLevel* TSymbolTableLevel::clone() const
|
||||||
symTableLevel->insert(*container, false);
|
symTableLevel->insert(*container, false);
|
||||||
containerCopied[anon->getAnonId()] = true;
|
containerCopied[anon->getAnonId()] = true;
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
|
const TString& name = iter->first;
|
||||||
|
auto retargetIter = std::find_if(retargetedSymbols.begin(), retargetedSymbols.end(),
|
||||||
|
[&name](const std::pair<TString, TString>& i) { return i.first == name; });
|
||||||
|
if (retargetIter != retargetedSymbols.end())
|
||||||
|
continue;
|
||||||
symTableLevel->insert(*iter->second->clone(), false);
|
symTableLevel->insert(*iter->second->clone(), false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Now point retargeted symbols to the newly created versions of them
|
||||||
|
for (auto &s : retargetedSymbols) {
|
||||||
|
TSymbol* sym = symTableLevel->find(s.second);
|
||||||
|
if (!sym)
|
||||||
|
continue;
|
||||||
|
symTableLevel->insert(s.first, sym);
|
||||||
}
|
}
|
||||||
|
|
||||||
return symTableLevel;
|
return symTableLevel;
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ typedef TVector<const char*> TExtensionList;
|
||||||
class TSymbol {
|
class TSymbol {
|
||||||
public:
|
public:
|
||||||
POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
|
POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
|
||||||
explicit TSymbol(const TString *n) : name(n), extensions(0), writable(true) { }
|
explicit TSymbol(const TString *n) : name(n), uniqueId(0), extensions(0), writable(true) { }
|
||||||
virtual TSymbol* clone() const = 0;
|
virtual TSymbol* clone() const = 0;
|
||||||
virtual ~TSymbol() { } // rely on all symbol owned memory coming from the pool
|
virtual ~TSymbol() { } // rely on all symbol owned memory coming from the pool
|
||||||
|
|
||||||
|
|
@ -413,13 +413,20 @@ public:
|
||||||
TSymbolTableLevel() : defaultPrecision(0), anonId(0), thisLevel(false) { }
|
TSymbolTableLevel() : defaultPrecision(0), anonId(0), thisLevel(false) { }
|
||||||
~TSymbolTableLevel();
|
~TSymbolTableLevel();
|
||||||
|
|
||||||
bool insert(TSymbol& symbol, bool separateNameSpaces)
|
bool insert(const TString& name, TSymbol* symbol) {
|
||||||
|
return level.insert(tLevelPair(name, symbol)).second;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool insert(TSymbol& symbol, bool separateNameSpaces, const TString& forcedKeyName = TString())
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// returning true means symbol was added to the table with no semantic errors
|
// returning true means symbol was added to the table with no semantic errors
|
||||||
//
|
//
|
||||||
const TString& name = symbol.getName();
|
const TString& name = symbol.getName();
|
||||||
if (name == "") {
|
if (forcedKeyName.length()) {
|
||||||
|
return level.insert(tLevelPair(forcedKeyName, &symbol)).second;
|
||||||
|
}
|
||||||
|
else if (name == "") {
|
||||||
symbol.getAsVariable()->setAnonId(anonId++);
|
symbol.getAsVariable()->setAnonId(anonId++);
|
||||||
// An empty name means an anonymous container, exposing its members to the external scope.
|
// An empty name means an anonymous container, exposing its members to the external scope.
|
||||||
// Give it a name and insert its members in the symbol table, pointing to the container.
|
// Give it a name and insert its members in the symbol table, pointing to the container.
|
||||||
|
|
@ -471,6 +478,16 @@ public:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void retargetSymbol(const TString& from, const TString& to) {
|
||||||
|
tLevel::const_iterator fromIt = level.find(from);
|
||||||
|
tLevel::const_iterator toIt = level.find(to);
|
||||||
|
if (fromIt == level.end() || toIt == level.end())
|
||||||
|
return;
|
||||||
|
delete fromIt->second;
|
||||||
|
level[from] = toIt->second;
|
||||||
|
retargetedSymbols.push_back({from, to});
|
||||||
|
}
|
||||||
|
|
||||||
TSymbol* find(const TString& name) const
|
TSymbol* find(const TString& name) const
|
||||||
{
|
{
|
||||||
tLevel::const_iterator it = level.find(name);
|
tLevel::const_iterator it = level.find(name);
|
||||||
|
|
@ -583,6 +600,8 @@ protected:
|
||||||
|
|
||||||
tLevel level; // named mappings
|
tLevel level; // named mappings
|
||||||
TPrecisionQualifier *defaultPrecision;
|
TPrecisionQualifier *defaultPrecision;
|
||||||
|
// pair<FromName, ToName>
|
||||||
|
TVector<std::pair<TString, TString>> retargetedSymbols;
|
||||||
int anonId;
|
int anonId;
|
||||||
bool thisLevel; // True if this level of the symbol table is a structure scope containing member function
|
bool thisLevel; // True if this level of the symbol table is a structure scope containing member function
|
||||||
// that are supposed to see anonymous access to member variables.
|
// that are supposed to see anonymous access to member variables.
|
||||||
|
|
@ -788,6 +807,12 @@ public:
|
||||||
return symbol;
|
return symbol;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void retargetSymbol(const TString& from, const TString& to) {
|
||||||
|
int level = currentLevel();
|
||||||
|
table[level]->retargetSymbol(from, to);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Find of a symbol that returns how many layers deep of nested
|
// Find of a symbol that returns how many layers deep of nested
|
||||||
// structures-with-member-functions ('this' scopes) deep the symbol was
|
// structures-with-member-functions ('this' scopes) deep the symbol was
|
||||||
// found in.
|
// found in.
|
||||||
|
|
|
||||||
|
|
@ -225,6 +225,9 @@ void TParseVersions::initializeExtensionBehavior()
|
||||||
extensionBehavior[E_GL_ARB_shading_language_packing] = EBhDisable;
|
extensionBehavior[E_GL_ARB_shading_language_packing] = EBhDisable;
|
||||||
extensionBehavior[E_GL_ARB_texture_query_lod] = EBhDisable;
|
extensionBehavior[E_GL_ARB_texture_query_lod] = EBhDisable;
|
||||||
extensionBehavior[E_GL_ARB_vertex_attrib_64bit] = EBhDisable;
|
extensionBehavior[E_GL_ARB_vertex_attrib_64bit] = EBhDisable;
|
||||||
|
extensionBehavior[E_GL_ARB_draw_instanced] = EBhDisable;
|
||||||
|
extensionBehavior[E_GL_ARB_fragment_coord_conventions] = EBhDisable;
|
||||||
|
|
||||||
|
|
||||||
extensionBehavior[E_GL_KHR_shader_subgroup_basic] = EBhDisable;
|
extensionBehavior[E_GL_KHR_shader_subgroup_basic] = EBhDisable;
|
||||||
extensionBehavior[E_GL_KHR_shader_subgroup_vote] = EBhDisable;
|
extensionBehavior[E_GL_KHR_shader_subgroup_vote] = EBhDisable;
|
||||||
|
|
@ -465,6 +468,8 @@ void TParseVersions::getPreamble(std::string& preamble)
|
||||||
"#define GL_ARB_shader_storage_buffer_object 1\n"
|
"#define GL_ARB_shader_storage_buffer_object 1\n"
|
||||||
"#define GL_ARB_texture_query_lod 1\n"
|
"#define GL_ARB_texture_query_lod 1\n"
|
||||||
"#define GL_ARB_vertex_attrib_64bit 1\n"
|
"#define GL_ARB_vertex_attrib_64bit 1\n"
|
||||||
|
"#define GL_ARB_draw_instanced 1\n"
|
||||||
|
"#define GL_ARB_fragment_coord_conventions 1\n"
|
||||||
"#define GL_EXT_shader_non_constant_global_initializers 1\n"
|
"#define GL_EXT_shader_non_constant_global_initializers 1\n"
|
||||||
"#define GL_EXT_shader_image_load_formatted 1\n"
|
"#define GL_EXT_shader_image_load_formatted 1\n"
|
||||||
"#define GL_EXT_post_depth_coverage 1\n"
|
"#define GL_EXT_post_depth_coverage 1\n"
|
||||||
|
|
@ -482,6 +487,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
||||||
"#define GL_EXT_debug_printf 1\n"
|
"#define GL_EXT_debug_printf 1\n"
|
||||||
"#define GL_EXT_fragment_shading_rate 1\n"
|
"#define GL_EXT_fragment_shading_rate 1\n"
|
||||||
"#define GL_EXT_shared_memory_block 1\n"
|
"#define GL_EXT_shared_memory_block 1\n"
|
||||||
|
"#define GL_EXT_shader_integer_mix 1\n"
|
||||||
|
|
||||||
// GL_KHR_shader_subgroup
|
// GL_KHR_shader_subgroup
|
||||||
"#define GL_KHR_shader_subgroup_basic 1\n"
|
"#define GL_KHR_shader_subgroup_basic 1\n"
|
||||||
|
|
|
||||||
|
|
@ -161,6 +161,8 @@ const char* const E_GL_ARB_shader_storage_buffer_object = "GL_ARB_shader_storage
|
||||||
const char* const E_GL_ARB_shading_language_packing = "GL_ARB_shading_language_packing";
|
const char* const E_GL_ARB_shading_language_packing = "GL_ARB_shading_language_packing";
|
||||||
const char* const E_GL_ARB_texture_query_lod = "GL_ARB_texture_query_lod";
|
const char* const E_GL_ARB_texture_query_lod = "GL_ARB_texture_query_lod";
|
||||||
const char* const E_GL_ARB_vertex_attrib_64bit = "GL_ARB_vertex_attrib_64bit";
|
const char* const E_GL_ARB_vertex_attrib_64bit = "GL_ARB_vertex_attrib_64bit";
|
||||||
|
const char* const E_GL_ARB_draw_instanced = "GL_ARB_draw_instanced";
|
||||||
|
const char* const E_GL_ARB_fragment_coord_conventions = "GL_ARB_fragment_coord_conventions";
|
||||||
|
|
||||||
const char* const E_GL_KHR_shader_subgroup_basic = "GL_KHR_shader_subgroup_basic";
|
const char* const E_GL_KHR_shader_subgroup_basic = "GL_KHR_shader_subgroup_basic";
|
||||||
const char* const E_GL_KHR_shader_subgroup_vote = "GL_KHR_shader_subgroup_vote";
|
const char* const E_GL_KHR_shader_subgroup_vote = "GL_KHR_shader_subgroup_vote";
|
||||||
|
|
|
||||||
|
|
@ -347,7 +347,7 @@ void TParseContext::handleLoopAttributes(const TAttributes& attributes, TIntermN
|
||||||
//
|
//
|
||||||
// Function attributes
|
// Function attributes
|
||||||
//
|
//
|
||||||
void TParseContext::handleFunctionAttributes(const TSourceLoc& loc, const TAttributes& attributes, TFunction* function)
|
void TParseContext::handleFunctionAttributes(const TSourceLoc& loc, const TAttributes& attributes)
|
||||||
{
|
{
|
||||||
for (auto it = attributes.begin(); it != attributes.end(); ++it) {
|
for (auto it = attributes.begin(); it != attributes.end(); ++it) {
|
||||||
if (it->size() > 0) {
|
if (it->size() > 0) {
|
||||||
|
|
|
||||||
|
|
@ -983,20 +983,20 @@ function_prototype
|
||||||
$$.function = $1;
|
$$.function = $1;
|
||||||
$$.loc = $2.loc;
|
$$.loc = $2.loc;
|
||||||
parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
|
parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
|
||||||
parseContext.handleFunctionAttributes($2.loc, *$3, $$.function);
|
parseContext.handleFunctionAttributes($2.loc, *$3);
|
||||||
}
|
}
|
||||||
| attribute function_declarator RIGHT_PAREN {
|
| attribute function_declarator RIGHT_PAREN {
|
||||||
$$.function = $2;
|
$$.function = $2;
|
||||||
$$.loc = $3.loc;
|
$$.loc = $3.loc;
|
||||||
parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
|
parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
|
||||||
parseContext.handleFunctionAttributes($3.loc, *$1, $$.function);
|
parseContext.handleFunctionAttributes($3.loc, *$1);
|
||||||
}
|
}
|
||||||
| attribute function_declarator RIGHT_PAREN attribute {
|
| attribute function_declarator RIGHT_PAREN attribute {
|
||||||
$$.function = $2;
|
$$.function = $2;
|
||||||
$$.loc = $3.loc;
|
$$.loc = $3.loc;
|
||||||
parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
|
parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
|
||||||
parseContext.handleFunctionAttributes($3.loc, *$1, $$.function);
|
parseContext.handleFunctionAttributes($3.loc, *$1);
|
||||||
parseContext.handleFunctionAttributes($3.loc, *$4, $$.function);
|
parseContext.handleFunctionAttributes($3.loc, *$4);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
@ -3926,6 +3926,7 @@ iteration_statement_nonattributed
|
||||||
--parseContext.controlFlowNestingLevel;
|
--parseContext.controlFlowNestingLevel;
|
||||||
}
|
}
|
||||||
| DO {
|
| DO {
|
||||||
|
parseContext.symbolTable.push();
|
||||||
++parseContext.loopNestingLevel;
|
++parseContext.loopNestingLevel;
|
||||||
++parseContext.statementNestingLevel;
|
++parseContext.statementNestingLevel;
|
||||||
++parseContext.controlFlowNestingLevel;
|
++parseContext.controlFlowNestingLevel;
|
||||||
|
|
@ -3937,6 +3938,7 @@ iteration_statement_nonattributed
|
||||||
parseContext.boolCheck($8.loc, $6);
|
parseContext.boolCheck($8.loc, $6);
|
||||||
|
|
||||||
$$ = parseContext.intermediate.addLoop($3, $6, 0, false, $4.loc);
|
$$ = parseContext.intermediate.addLoop($3, $6, 0, false, $4.loc);
|
||||||
|
parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
|
||||||
--parseContext.loopNestingLevel;
|
--parseContext.loopNestingLevel;
|
||||||
--parseContext.statementNestingLevel;
|
--parseContext.statementNestingLevel;
|
||||||
--parseContext.controlFlowNestingLevel;
|
--parseContext.controlFlowNestingLevel;
|
||||||
|
|
@ -4365,9 +4367,6 @@ spirv_type_parameter
|
||||||
: constant_expression {
|
: constant_expression {
|
||||||
$$ = parseContext.makeSpirvTypeParameters($1->getLoc(), $1->getAsConstantUnion());
|
$$ = parseContext.makeSpirvTypeParameters($1->getLoc(), $1->getAsConstantUnion());
|
||||||
}
|
}
|
||||||
| type_specifier {
|
|
||||||
$$ = parseContext.makeSpirvTypeParameters($1);
|
|
||||||
}
|
|
||||||
|
|
||||||
spirv_instruction_qualifier
|
spirv_instruction_qualifier
|
||||||
: SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN {
|
: SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN {
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -48,37 +48,6 @@
|
||||||
#endif
|
#endif
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
bool IsInfinity(double x) {
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
switch (_fpclass(x)) {
|
|
||||||
case _FPCLASS_NINF:
|
|
||||||
case _FPCLASS_PINF:
|
|
||||||
return true;
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
return std::isinf(x);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsNan(double x) {
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
switch (_fpclass(x)) {
|
|
||||||
case _FPCLASS_SNAN:
|
|
||||||
case _FPCLASS_QNAN:
|
|
||||||
return true;
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
return std::isnan(x);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace glslang {
|
namespace glslang {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ public:
|
||||||
target = &inputList;
|
target = &inputList;
|
||||||
else if (base->getQualifier().storage == EvqVaryingOut)
|
else if (base->getQualifier().storage == EvqVaryingOut)
|
||||||
target = &outputList;
|
target = &outputList;
|
||||||
else if (base->getQualifier().isUniformOrBuffer() && !base->getQualifier().isPushConstant())
|
else if (base->getQualifier().isUniformOrBuffer() && !base->getQualifier().isPushConstant() && !base->getQualifier().isShaderRecord())
|
||||||
target = &uniformList;
|
target = &uniformList;
|
||||||
// If a global is being visited, then we should also traverse it incase it's evaluation
|
// If a global is being visited, then we should also traverse it incase it's evaluation
|
||||||
// ends up visiting inputs we want to tag as live
|
// ends up visiting inputs we want to tag as live
|
||||||
|
|
@ -514,6 +514,24 @@ struct TSymbolValidater
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
// Deal with input/output pairs where one is a block member but the other is loose,
|
||||||
|
// e.g. with ARB_separate_shader_objects
|
||||||
|
if (type1.getBasicType() == EbtBlock &&
|
||||||
|
type1.isStruct() && !type2.isStruct()) {
|
||||||
|
// Iterate through block members tracking layout
|
||||||
|
glslang::TString name;
|
||||||
|
type1.getStruct()->begin()->type->appendMangledName(name);
|
||||||
|
if (name == mangleName2
|
||||||
|
&& type1.getQualifier().layoutLocation == type2.getQualifier().layoutLocation) return;
|
||||||
|
}
|
||||||
|
if (type2.getBasicType() == EbtBlock &&
|
||||||
|
type2.isStruct() && !type1.isStruct()) {
|
||||||
|
// Iterate through block members tracking layout
|
||||||
|
glslang::TString name;
|
||||||
|
type2.getStruct()->begin()->type->appendMangledName(name);
|
||||||
|
if (name == mangleName1
|
||||||
|
&& type1.getQualifier().layoutLocation == type2.getQualifier().layoutLocation) return;
|
||||||
|
}
|
||||||
TString err = "Invalid In/Out variable type : " + entKey.first;
|
TString err = "Invalid In/Out variable type : " + entKey.first;
|
||||||
infoSink.info.message(EPrefixInternalError, err.c_str());
|
infoSink.info.message(EPrefixInternalError, err.c_str());
|
||||||
hadError = true;
|
hadError = true;
|
||||||
|
|
@ -748,7 +766,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
TDefaultIoResolverBase::TDefaultIoResolverBase(const TIntermediate& intermediate)
|
TDefaultIoResolverBase::TDefaultIoResolverBase(const TIntermediate& intermediate)
|
||||||
: intermediate(intermediate)
|
: referenceIntermediate(intermediate)
|
||||||
, nextUniformLocation(intermediate.getUniformLocationBase())
|
, nextUniformLocation(intermediate.getUniformLocationBase())
|
||||||
, nextInputLocation(0)
|
, nextInputLocation(0)
|
||||||
, nextOutputLocation(0)
|
, nextOutputLocation(0)
|
||||||
|
|
@ -760,17 +778,17 @@ TDefaultIoResolverBase::TDefaultIoResolverBase(const TIntermediate& intermediate
|
||||||
|
|
||||||
int TDefaultIoResolverBase::getBaseBinding(EShLanguage stage, TResourceType res, unsigned int set) const {
|
int TDefaultIoResolverBase::getBaseBinding(EShLanguage stage, TResourceType res, unsigned int set) const {
|
||||||
return stageIntermediates[stage] ? selectBaseBinding(stageIntermediates[stage]->getShiftBinding(res), stageIntermediates[stage]->getShiftBindingForSet(res, set))
|
return stageIntermediates[stage] ? selectBaseBinding(stageIntermediates[stage]->getShiftBinding(res), stageIntermediates[stage]->getShiftBindingForSet(res, set))
|
||||||
: selectBaseBinding(intermediate.getShiftBinding(res), intermediate.getShiftBindingForSet(res, set));
|
: selectBaseBinding(referenceIntermediate.getShiftBinding(res), referenceIntermediate.getShiftBindingForSet(res, set));
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<std::string>& TDefaultIoResolverBase::getResourceSetBinding(EShLanguage stage) const {
|
const std::vector<std::string>& TDefaultIoResolverBase::getResourceSetBinding(EShLanguage stage) const {
|
||||||
return stageIntermediates[stage] ? stageIntermediates[stage]->getResourceSetBinding()
|
return stageIntermediates[stage] ? stageIntermediates[stage]->getResourceSetBinding()
|
||||||
: intermediate.getResourceSetBinding();
|
: referenceIntermediate.getResourceSetBinding();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TDefaultIoResolverBase::doAutoBindingMapping() const { return intermediate.getAutoMapBindings(); }
|
bool TDefaultIoResolverBase::doAutoBindingMapping() const { return referenceIntermediate.getAutoMapBindings(); }
|
||||||
|
|
||||||
bool TDefaultIoResolverBase::doAutoLocationMapping() const { return intermediate.getAutoMapLocations(); }
|
bool TDefaultIoResolverBase::doAutoLocationMapping() const { return referenceIntermediate.getAutoMapLocations(); }
|
||||||
|
|
||||||
TDefaultIoResolverBase::TSlotSet::iterator TDefaultIoResolverBase::findSlot(int set, int slot) {
|
TDefaultIoResolverBase::TSlotSet::iterator TDefaultIoResolverBase::findSlot(int set, int slot) {
|
||||||
return std::lower_bound(slots[set].begin(), slots[set].end(), slot);
|
return std::lower_bound(slots[set].begin(), slots[set].end(), slot);
|
||||||
|
|
@ -827,7 +845,7 @@ int TDefaultIoResolverBase::resolveUniformLocation(EShLanguage /*stage*/, TVarEn
|
||||||
}
|
}
|
||||||
// no locations added if already present, a built-in variable, a block, or an opaque
|
// no locations added if already present, a built-in variable, a block, or an opaque
|
||||||
if (type.getQualifier().hasLocation() || type.isBuiltIn() || type.getBasicType() == EbtBlock ||
|
if (type.getQualifier().hasLocation() || type.isBuiltIn() || type.getBasicType() == EbtBlock ||
|
||||||
type.isAtomic() || (type.containsOpaque() && intermediate.getSpv().openGl == 0)) {
|
type.isAtomic() || type.isSpirvType() || (type.containsOpaque() && referenceIntermediate.getSpv().openGl == 0)) {
|
||||||
return ent.newLocation = -1;
|
return ent.newLocation = -1;
|
||||||
}
|
}
|
||||||
// no locations on blocks of built-in variables
|
// no locations on blocks of built-in variables
|
||||||
|
|
@ -839,7 +857,7 @@ int TDefaultIoResolverBase::resolveUniformLocation(EShLanguage /*stage*/, TVarEn
|
||||||
return ent.newLocation = -1;
|
return ent.newLocation = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int location = intermediate.getUniformLocationOverride(name);
|
int location = referenceIntermediate.getUniformLocationOverride(name);
|
||||||
if (location != -1) {
|
if (location != -1) {
|
||||||
return ent.newLocation = location;
|
return ent.newLocation = location;
|
||||||
}
|
}
|
||||||
|
|
@ -855,8 +873,8 @@ int TDefaultIoResolverBase::resolveInOutLocation(EShLanguage stage, TVarEntryInf
|
||||||
return ent.newLocation = -1;
|
return ent.newLocation = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// no locations added if already present, or a built-in variable
|
// no locations added if already present, a built-in variable, or a variable with SPIR-V decorate
|
||||||
if (type.getQualifier().hasLocation() || type.isBuiltIn()) {
|
if (type.getQualifier().hasLocation() || type.isBuiltIn() || type.getQualifier().hasSprivDecorate()) {
|
||||||
return ent.newLocation = -1;
|
return ent.newLocation = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -942,8 +960,8 @@ int TDefaultGlslIoResolver::resolveInOutLocation(EShLanguage stage, TVarEntryInf
|
||||||
if (type.getQualifier().hasLocation()) {
|
if (type.getQualifier().hasLocation()) {
|
||||||
return ent.newLocation = type.getQualifier().layoutLocation;
|
return ent.newLocation = type.getQualifier().layoutLocation;
|
||||||
}
|
}
|
||||||
// no locations added if already present, or a built-in variable
|
// no locations added if already present, a built-in variable, or a variable with SPIR-V decorate
|
||||||
if (type.isBuiltIn()) {
|
if (type.isBuiltIn() || type.getQualifier().hasSprivDecorate()) {
|
||||||
return ent.newLocation = -1;
|
return ent.newLocation = -1;
|
||||||
}
|
}
|
||||||
// no locations on blocks of built-in variables
|
// no locations on blocks of built-in variables
|
||||||
|
|
@ -1024,7 +1042,8 @@ int TDefaultGlslIoResolver::resolveUniformLocation(EShLanguage /*stage*/, TVarEn
|
||||||
} else {
|
} else {
|
||||||
// no locations added if already present, a built-in variable, a block, or an opaque
|
// no locations added if already present, a built-in variable, a block, or an opaque
|
||||||
if (type.getQualifier().hasLocation() || type.isBuiltIn() || type.getBasicType() == EbtBlock ||
|
if (type.getQualifier().hasLocation() || type.isBuiltIn() || type.getBasicType() == EbtBlock ||
|
||||||
type.isAtomic() || (type.containsOpaque() && intermediate.getSpv().openGl == 0)) {
|
type.isAtomic() || type.isSpirvType() ||
|
||||||
|
(type.containsOpaque() && referenceIntermediate.getSpv().openGl == 0)) {
|
||||||
return ent.newLocation = -1;
|
return ent.newLocation = -1;
|
||||||
}
|
}
|
||||||
// no locations on blocks of built-in variables
|
// no locations on blocks of built-in variables
|
||||||
|
|
@ -1037,7 +1056,7 @@ int TDefaultGlslIoResolver::resolveUniformLocation(EShLanguage /*stage*/, TVarEn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int location = intermediate.getUniformLocationOverride(name.c_str());
|
int location = referenceIntermediate.getUniformLocationOverride(name.c_str());
|
||||||
if (location != -1) {
|
if (location != -1) {
|
||||||
return ent.newLocation = location;
|
return ent.newLocation = location;
|
||||||
}
|
}
|
||||||
|
|
@ -1086,7 +1105,7 @@ int TDefaultGlslIoResolver::resolveBinding(EShLanguage stage, TVarEntryInfo& ent
|
||||||
const TType& type = ent.symbol->getType();
|
const TType& type = ent.symbol->getType();
|
||||||
const TString& name = ent.symbol->getAccessName();
|
const TString& name = ent.symbol->getAccessName();
|
||||||
// On OpenGL arrays of opaque types take a separate binding for each element
|
// On OpenGL arrays of opaque types take a separate binding for each element
|
||||||
int numBindings = intermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1;
|
int numBindings = referenceIntermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1;
|
||||||
TResourceType resource = getResourceType(type);
|
TResourceType resource = getResourceType(type);
|
||||||
// don't need to handle uniform symbol, it will be handled in resolveUniformLocation
|
// don't need to handle uniform symbol, it will be handled in resolveUniformLocation
|
||||||
if (resource == EResUbo && type.getBasicType() != EbtBlock) {
|
if (resource == EResUbo && type.getBasicType() != EbtBlock) {
|
||||||
|
|
@ -1095,7 +1114,7 @@ int TDefaultGlslIoResolver::resolveBinding(EShLanguage stage, TVarEntryInfo& ent
|
||||||
// There is no 'set' qualifier in OpenGL shading language, each resource has its own
|
// There is no 'set' qualifier in OpenGL shading language, each resource has its own
|
||||||
// binding name space, so remap the 'set' to resource type which make each resource
|
// binding name space, so remap the 'set' to resource type which make each resource
|
||||||
// binding is valid from 0 to MAX_XXRESOURCE_BINDINGS
|
// binding is valid from 0 to MAX_XXRESOURCE_BINDINGS
|
||||||
int set = intermediate.getSpv().openGl != 0 ? resource : ent.newSet;
|
int set = referenceIntermediate.getSpv().openGl != 0 ? resource : ent.newSet;
|
||||||
int resourceKey = set;
|
int resourceKey = set;
|
||||||
if (resource < EResCount) {
|
if (resource < EResCount) {
|
||||||
if (type.getQualifier().hasBinding()) {
|
if (type.getQualifier().hasBinding()) {
|
||||||
|
|
@ -1223,7 +1242,7 @@ void TDefaultGlslIoResolver::reserverResourceSlot(TVarEntryInfo& ent, TInfoSink&
|
||||||
const TType& type = ent.symbol->getType();
|
const TType& type = ent.symbol->getType();
|
||||||
const TString& name = ent.symbol->getAccessName();
|
const TString& name = ent.symbol->getAccessName();
|
||||||
TResourceType resource = getResourceType(type);
|
TResourceType resource = getResourceType(type);
|
||||||
int set = intermediate.getSpv().openGl != 0 ? resource : resolveSet(ent.stage, ent);
|
int set = referenceIntermediate.getSpv().openGl != 0 ? resource : resolveSet(ent.stage, ent);
|
||||||
int resourceKey = set;
|
int resourceKey = set;
|
||||||
|
|
||||||
if (type.getQualifier().hasBinding()) {
|
if (type.getQualifier().hasBinding()) {
|
||||||
|
|
@ -1233,7 +1252,7 @@ void TDefaultGlslIoResolver::reserverResourceSlot(TVarEntryInfo& ent, TInfoSink&
|
||||||
|
|
||||||
if (iter == varSlotMap.end()) {
|
if (iter == varSlotMap.end()) {
|
||||||
// Reserve the slots for the ubo, ssbo and opaques who has explicit binding
|
// Reserve the slots for the ubo, ssbo and opaques who has explicit binding
|
||||||
int numBindings = intermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1;
|
int numBindings = referenceIntermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1;
|
||||||
varSlotMap[name] = binding;
|
varSlotMap[name] = binding;
|
||||||
reserveSlot(resourceKey, binding, numBindings);
|
reserveSlot(resourceKey, binding, numBindings);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1288,7 +1307,7 @@ struct TDefaultIoResolver : public TDefaultIoResolverBase {
|
||||||
const TType& type = ent.symbol->getType();
|
const TType& type = ent.symbol->getType();
|
||||||
const int set = getLayoutSet(type);
|
const int set = getLayoutSet(type);
|
||||||
// On OpenGL arrays of opaque types take a seperate binding for each element
|
// On OpenGL arrays of opaque types take a seperate binding for each element
|
||||||
int numBindings = intermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1;
|
int numBindings = referenceIntermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1;
|
||||||
TResourceType resource = getResourceType(type);
|
TResourceType resource = getResourceType(type);
|
||||||
if (resource < EResCount) {
|
if (resource < EResCount) {
|
||||||
if (type.getQualifier().hasBinding()) {
|
if (type.getQualifier().hasBinding()) {
|
||||||
|
|
@ -1633,6 +1652,37 @@ bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) {
|
||||||
return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second);
|
return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second);
|
||||||
});
|
});
|
||||||
resolver->endResolve(EShLangCount);
|
resolver->endResolve(EShLangCount);
|
||||||
|
if (autoPushConstantBlockName.length()) {
|
||||||
|
bool upgraded = false;
|
||||||
|
for (size_t stage = 0; stage < EShLangCount; stage++) {
|
||||||
|
if (intermediates[stage] != nullptr) {
|
||||||
|
TVarLiveMap** pUniformVarMap = uniformResolve.uniformVarMap;
|
||||||
|
auto at = pUniformVarMap[stage]->find(autoPushConstantBlockName);
|
||||||
|
if (at == pUniformVarMap[stage]->end())
|
||||||
|
continue;
|
||||||
|
TQualifier& qualifier = at->second.symbol->getQualifier();
|
||||||
|
if (!qualifier.isUniform())
|
||||||
|
continue;
|
||||||
|
TType& t = at->second.symbol->getWritableType();
|
||||||
|
int size, stride;
|
||||||
|
TIntermediate::getBaseAlignment(t, size, stride, autoPushConstantBlockPacking,
|
||||||
|
qualifier.layoutMatrix == ElmRowMajor);
|
||||||
|
if (size <= int(autoPushConstantMaxSize)) {
|
||||||
|
qualifier.setBlockStorage(EbsPushConstant);
|
||||||
|
qualifier.layoutPacking = autoPushConstantBlockPacking;
|
||||||
|
upgraded = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If it's been upgraded to push_constant, then remove it from the uniformVector
|
||||||
|
// so it doesn't get a set/binding assigned to it.
|
||||||
|
if (upgraded) {
|
||||||
|
auto at = std::find_if(uniformVector.begin(), uniformVector.end(),
|
||||||
|
[this](const TVarLivePair& p) { return p.first == autoPushConstantBlockName; });
|
||||||
|
if (at != uniformVector.end())
|
||||||
|
uniformVector.erase(at);
|
||||||
|
}
|
||||||
|
}
|
||||||
for (size_t stage = 0; stage < EShLangCount; stage++) {
|
for (size_t stage = 0; stage < EShLangCount; stage++) {
|
||||||
if (intermediates[stage] != nullptr) {
|
if (intermediates[stage] != nullptr) {
|
||||||
// traverse each stage, set new location to each input/output and unifom symbol, set new binding to
|
// traverse each stage, set new location to each input/output and unifom symbol, set new binding to
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
TDefaultIoResolverBase(TDefaultIoResolverBase&);
|
TDefaultIoResolverBase(TDefaultIoResolverBase&);
|
||||||
TDefaultIoResolverBase& operator=(TDefaultIoResolverBase&);
|
TDefaultIoResolverBase& operator=(TDefaultIoResolverBase&);
|
||||||
const TIntermediate& intermediate;
|
const TIntermediate& referenceIntermediate;
|
||||||
int nextUniformLocation;
|
int nextUniformLocation;
|
||||||
int nextInputLocation;
|
int nextInputLocation;
|
||||||
int nextOutputLocation;
|
int nextOutputLocation;
|
||||||
|
|
@ -291,7 +291,7 @@ public:
|
||||||
bool virtual doMap(TIoMapResolver*, TInfoSink&) { return true; }
|
bool virtual doMap(TIoMapResolver*, TInfoSink&) { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// I/O mapper for OpenGL
|
// I/O mapper for GLSL
|
||||||
class TGlslIoMapper : public TIoMapper {
|
class TGlslIoMapper : public TIoMapper {
|
||||||
public:
|
public:
|
||||||
TGlslIoMapper() {
|
TGlslIoMapper() {
|
||||||
|
|
@ -301,6 +301,8 @@ public:
|
||||||
memset(intermediates, 0, sizeof(TIntermediate*) * (EShLangCount + 1));
|
memset(intermediates, 0, sizeof(TIntermediate*) * (EShLangCount + 1));
|
||||||
profile = ENoProfile;
|
profile = ENoProfile;
|
||||||
version = 0;
|
version = 0;
|
||||||
|
autoPushConstantMaxSize = 128;
|
||||||
|
autoPushConstantBlockPacking = ElpStd430;
|
||||||
}
|
}
|
||||||
virtual ~TGlslIoMapper() {
|
virtual ~TGlslIoMapper() {
|
||||||
for (size_t stage = 0; stage < EShLangCount; stage++) {
|
for (size_t stage = 0; stage < EShLangCount; stage++) {
|
||||||
|
|
@ -320,6 +322,13 @@ public:
|
||||||
intermediates[stage] = nullptr;
|
intermediates[stage] = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// If set, the uniform block with the given name will be changed to be backed by
|
||||||
|
// push_constant if it's size is <= maxSize
|
||||||
|
void setAutoPushConstantBlock(const char* name, unsigned int maxSize, TLayoutPacking packing) {
|
||||||
|
autoPushConstantBlockName = name;
|
||||||
|
autoPushConstantMaxSize = maxSize;
|
||||||
|
autoPushConstantBlockPacking = packing;
|
||||||
|
}
|
||||||
// grow the reflection stage by stage
|
// grow the reflection stage by stage
|
||||||
bool addStage(EShLanguage, TIntermediate&, TInfoSink&, TIoMapResolver*) override;
|
bool addStage(EShLanguage, TIntermediate&, TInfoSink&, TIoMapResolver*) override;
|
||||||
bool doMap(TIoMapResolver*, TInfoSink&) override;
|
bool doMap(TIoMapResolver*, TInfoSink&) override;
|
||||||
|
|
@ -329,6 +338,11 @@ public:
|
||||||
bool hadError = false;
|
bool hadError = false;
|
||||||
EProfile profile;
|
EProfile profile;
|
||||||
int version;
|
int version;
|
||||||
|
|
||||||
|
private:
|
||||||
|
TString autoPushConstantBlockName;
|
||||||
|
unsigned int autoPushConstantMaxSize;
|
||||||
|
TLayoutPacking autoPushConstantBlockPacking;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace glslang
|
} // end namespace glslang
|
||||||
|
|
|
||||||
|
|
@ -312,6 +312,7 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
|
||||||
MERGE_TRUE(autoMapBindings);
|
MERGE_TRUE(autoMapBindings);
|
||||||
MERGE_TRUE(autoMapLocations);
|
MERGE_TRUE(autoMapLocations);
|
||||||
MERGE_TRUE(invertY);
|
MERGE_TRUE(invertY);
|
||||||
|
MERGE_TRUE(dxPositionW);
|
||||||
MERGE_TRUE(flattenUniformArrays);
|
MERGE_TRUE(flattenUniformArrays);
|
||||||
MERGE_TRUE(useUnknownFormat);
|
MERGE_TRUE(useUnknownFormat);
|
||||||
MERGE_TRUE(hlslOffsets);
|
MERGE_TRUE(hlslOffsets);
|
||||||
|
|
@ -759,7 +760,10 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin
|
||||||
|
|
||||||
auto checkName = [this, unitSymbol, &infoSink](const TString& name) {
|
auto checkName = [this, unitSymbol, &infoSink](const TString& name) {
|
||||||
for (unsigned int i = 0; i < unitSymbol->getType().getStruct()->size(); ++i) {
|
for (unsigned int i = 0; i < unitSymbol->getType().getStruct()->size(); ++i) {
|
||||||
if (name == (*unitSymbol->getType().getStruct())[i].type->getFieldName()) {
|
if (name == (*unitSymbol->getType().getStruct())[i].type->getFieldName()
|
||||||
|
&& !((*unitSymbol->getType().getStruct())[i].type->getQualifier().hasLocation()
|
||||||
|
|| unitSymbol->getType().getQualifier().hasLocation())
|
||||||
|
) {
|
||||||
error(infoSink, "Anonymous member name used for global variable or other anonymous member: ");
|
error(infoSink, "Anonymous member name used for global variable or other anonymous member: ");
|
||||||
infoSink.info << (*unitSymbol->getType().getStruct())[i].type->getCompleteString() << "\n";
|
infoSink.info << (*unitSymbol->getType().getStruct())[i].type->getCompleteString() << "\n";
|
||||||
}
|
}
|
||||||
|
|
@ -858,9 +862,19 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
|
||||||
if (symbol.getType().getBasicType() == EbtBlock && unitSymbol.getType().getBasicType() == EbtBlock &&
|
if (symbol.getType().getBasicType() == EbtBlock && unitSymbol.getType().getBasicType() == EbtBlock &&
|
||||||
symbol.getType().getStruct() && unitSymbol.getType().getStruct() &&
|
symbol.getType().getStruct() && unitSymbol.getType().getStruct() &&
|
||||||
symbol.getType().sameStructType(unitSymbol.getType())) {
|
symbol.getType().sameStructType(unitSymbol.getType())) {
|
||||||
for (unsigned int i = 0; i < symbol.getType().getStruct()->size(); ++i) {
|
unsigned int li = 0;
|
||||||
const TQualifier& qualifier = (*symbol.getType().getStruct())[i].type->getQualifier();
|
unsigned int ri = 0;
|
||||||
const TQualifier& unitQualifier = (*unitSymbol.getType().getStruct())[i].type->getQualifier();
|
while (li < symbol.getType().getStruct()->size() && ri < unitSymbol.getType().getStruct()->size()) {
|
||||||
|
if ((*symbol.getType().getStruct())[li].type->hiddenMember()) {
|
||||||
|
++li;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ((*unitSymbol.getType().getStruct())[ri].type->hiddenMember()) {
|
||||||
|
++ri;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const TQualifier& qualifier = (*symbol.getType().getStruct())[li].type->getQualifier();
|
||||||
|
const TQualifier & unitQualifier = (*unitSymbol.getType().getStruct())[ri].type->getQualifier();
|
||||||
if (qualifier.layoutMatrix != unitQualifier.layoutMatrix ||
|
if (qualifier.layoutMatrix != unitQualifier.layoutMatrix ||
|
||||||
qualifier.layoutOffset != unitQualifier.layoutOffset ||
|
qualifier.layoutOffset != unitQualifier.layoutOffset ||
|
||||||
qualifier.layoutAlign != unitQualifier.layoutAlign ||
|
qualifier.layoutAlign != unitQualifier.layoutAlign ||
|
||||||
|
|
@ -869,6 +883,8 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
|
||||||
error(infoSink, "Interface block member layout qualifiers must match:");
|
error(infoSink, "Interface block member layout qualifiers must match:");
|
||||||
writeTypeComparison = true;
|
writeTypeComparison = true;
|
||||||
}
|
}
|
||||||
|
++li;
|
||||||
|
++ri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -954,10 +970,10 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
|
||||||
// current implementation only has one offset.
|
// current implementation only has one offset.
|
||||||
if (symbol.getQualifier().layoutMatrix != unitSymbol.getQualifier().layoutMatrix ||
|
if (symbol.getQualifier().layoutMatrix != unitSymbol.getQualifier().layoutMatrix ||
|
||||||
symbol.getQualifier().layoutPacking != unitSymbol.getQualifier().layoutPacking ||
|
symbol.getQualifier().layoutPacking != unitSymbol.getQualifier().layoutPacking ||
|
||||||
symbol.getQualifier().layoutLocation != unitSymbol.getQualifier().layoutLocation ||
|
(symbol.getQualifier().hasLocation() && unitSymbol.getQualifier().hasLocation() && symbol.getQualifier().layoutLocation != unitSymbol.getQualifier().layoutLocation) ||
|
||||||
symbol.getQualifier().layoutComponent != unitSymbol.getQualifier().layoutComponent ||
|
symbol.getQualifier().layoutComponent != unitSymbol.getQualifier().layoutComponent ||
|
||||||
symbol.getQualifier().layoutIndex != unitSymbol.getQualifier().layoutIndex ||
|
symbol.getQualifier().layoutIndex != unitSymbol.getQualifier().layoutIndex ||
|
||||||
symbol.getQualifier().layoutBinding != unitSymbol.getQualifier().layoutBinding ||
|
(symbol.getQualifier().hasBinding() && unitSymbol.getQualifier().hasBinding() && symbol.getQualifier().layoutBinding != unitSymbol.getQualifier().layoutBinding) ||
|
||||||
(symbol.getQualifier().hasBinding() && (symbol.getQualifier().layoutOffset != unitSymbol.getQualifier().layoutOffset))) {
|
(symbol.getQualifier().hasBinding() && (symbol.getQualifier().layoutOffset != unitSymbol.getQualifier().layoutOffset))) {
|
||||||
error(infoSink, "Layout qualification must match:");
|
error(infoSink, "Layout qualification must match:");
|
||||||
writeTypeComparison = true;
|
writeTypeComparison = true;
|
||||||
|
|
@ -1786,7 +1802,7 @@ unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
int numComponents;
|
int numComponents {0};
|
||||||
if (type.isScalar())
|
if (type.isScalar())
|
||||||
numComponents = 1;
|
numComponents = 1;
|
||||||
else if (type.isVector())
|
else if (type.isVector())
|
||||||
|
|
@ -1934,7 +1950,7 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, T
|
||||||
}
|
}
|
||||||
|
|
||||||
// rule 9
|
// rule 9
|
||||||
if (type.getBasicType() == EbtStruct) {
|
if (type.getBasicType() == EbtStruct || type.getBasicType() == EbtBlock) {
|
||||||
const TTypeList& memberList = *type.getStruct();
|
const TTypeList& memberList = *type.getStruct();
|
||||||
|
|
||||||
size = 0;
|
size = 0;
|
||||||
|
|
@ -2159,8 +2175,9 @@ int TIntermediate::computeBufferReferenceTypeSize(const TType& type)
|
||||||
bool TIntermediate::isIoResizeArray(const TType& type, EShLanguage language) {
|
bool TIntermediate::isIoResizeArray(const TType& type, EShLanguage language) {
|
||||||
return type.isArray() &&
|
return type.isArray() &&
|
||||||
((language == EShLangGeometry && type.getQualifier().storage == EvqVaryingIn) ||
|
((language == EShLangGeometry && type.getQualifier().storage == EvqVaryingIn) ||
|
||||||
(language == EShLangTessControl && type.getQualifier().storage == EvqVaryingOut &&
|
(language == EShLangTessControl && (type.getQualifier().storage == EvqVaryingIn || type.getQualifier().storage == EvqVaryingOut) &&
|
||||||
! type.getQualifier().patch) ||
|
! type.getQualifier().patch) ||
|
||||||
|
(language == EShLangTessEvaluation && type.getQualifier().storage == EvqVaryingIn) ||
|
||||||
(language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn &&
|
(language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn &&
|
||||||
type.getQualifier().pervertexNV) ||
|
type.getQualifier().pervertexNV) ||
|
||||||
(language == EShLangMeshNV && type.getQualifier().storage == EvqVaryingOut &&
|
(language == EShLangMeshNV && type.getQualifier().storage == EvqVaryingOut &&
|
||||||
|
|
|
||||||
|
|
@ -290,6 +290,7 @@ public:
|
||||||
resources(TBuiltInResource{}),
|
resources(TBuiltInResource{}),
|
||||||
numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false),
|
numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false),
|
||||||
invertY(false),
|
invertY(false),
|
||||||
|
dxPositionW(false),
|
||||||
useStorageBuffer(false),
|
useStorageBuffer(false),
|
||||||
invariantAll(false),
|
invariantAll(false),
|
||||||
nanMinMaxClamp(false),
|
nanMinMaxClamp(false),
|
||||||
|
|
@ -397,6 +398,9 @@ public:
|
||||||
case EShTargetSpv_1_5:
|
case EShTargetSpv_1_5:
|
||||||
processes.addProcess("target-env spirv1.5");
|
processes.addProcess("target-env spirv1.5");
|
||||||
break;
|
break;
|
||||||
|
case EShTargetSpv_1_6:
|
||||||
|
processes.addProcess("target-env spirv1.6");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
processes.addProcess("target-env spirvUnknown");
|
processes.addProcess("target-env spirvUnknown");
|
||||||
break;
|
break;
|
||||||
|
|
@ -415,6 +419,9 @@ public:
|
||||||
case EShTargetVulkan_1_2:
|
case EShTargetVulkan_1_2:
|
||||||
processes.addProcess("target-env vulkan1.2");
|
processes.addProcess("target-env vulkan1.2");
|
||||||
break;
|
break;
|
||||||
|
case EShTargetVulkan_1_3:
|
||||||
|
processes.addProcess("target-env vulkan1.3");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
processes.addProcess("target-env vulkanUnknown");
|
processes.addProcess("target-env vulkanUnknown");
|
||||||
break;
|
break;
|
||||||
|
|
@ -460,6 +467,14 @@ public:
|
||||||
}
|
}
|
||||||
bool getInvertY() const { return invertY; }
|
bool getInvertY() const { return invertY; }
|
||||||
|
|
||||||
|
void setDxPositionW(bool dxPosW)
|
||||||
|
{
|
||||||
|
dxPositionW = dxPosW;
|
||||||
|
if (dxPositionW)
|
||||||
|
processes.addProcess("dx-position-w");
|
||||||
|
}
|
||||||
|
bool getDxPositionW() const { return dxPositionW; }
|
||||||
|
|
||||||
#ifdef ENABLE_HLSL
|
#ifdef ENABLE_HLSL
|
||||||
void setSource(EShSource s) { source = s; }
|
void setSource(EShSource s) { source = s; }
|
||||||
EShSource getSource() const { return source; }
|
EShSource getSource() const { return source; }
|
||||||
|
|
@ -1070,6 +1085,7 @@ protected:
|
||||||
int numPushConstants;
|
int numPushConstants;
|
||||||
bool recursive;
|
bool recursive;
|
||||||
bool invertY;
|
bool invertY;
|
||||||
|
bool dxPositionW;
|
||||||
bool useStorageBuffer;
|
bool useStorageBuffer;
|
||||||
bool invariantAll;
|
bool invariantAll;
|
||||||
bool nanMinMaxClamp; // true if desiring min/max/clamp to favor non-NaN over NaN
|
bool nanMinMaxClamp; // true if desiring min/max/clamp to favor non-NaN over NaN
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ namespace {
|
||||||
pthread_mutex_t gMutex;
|
pthread_mutex_t gMutex;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitGlobalLock()
|
static void InitMutex(void)
|
||||||
{
|
{
|
||||||
pthread_mutexattr_t mutexattr;
|
pthread_mutexattr_t mutexattr;
|
||||||
pthread_mutexattr_init(&mutexattr);
|
pthread_mutexattr_init(&mutexattr);
|
||||||
|
|
@ -180,6 +180,12 @@ void InitGlobalLock()
|
||||||
pthread_mutex_init(&gMutex, &mutexattr);
|
pthread_mutex_init(&gMutex, &mutexattr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InitGlobalLock()
|
||||||
|
{
|
||||||
|
static pthread_once_t once = PTHREAD_ONCE_INIT;
|
||||||
|
pthread_once(&once, InitMutex);
|
||||||
|
}
|
||||||
|
|
||||||
void GetGlobalLock()
|
void GetGlobalLock()
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&gMutex);
|
pthread_mutex_lock(&gMutex);
|
||||||
|
|
|
||||||
|
|
@ -150,8 +150,8 @@ typedef enum {
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
EShClientNone, // use when there is no client, e.g. for validation
|
EShClientNone, // use when there is no client, e.g. for validation
|
||||||
EShClientVulkan,
|
EShClientVulkan, // as GLSL dialect, specifies KHR_vulkan_glsl extension
|
||||||
EShClientOpenGL,
|
EShClientOpenGL, // as GLSL dialect, specifies ARB_gl_spirv extension
|
||||||
LAST_ELEMENT_MARKER(EShClientCount),
|
LAST_ELEMENT_MARKER(EShClientCount),
|
||||||
} EShClient;
|
} EShClient;
|
||||||
|
|
||||||
|
|
@ -166,8 +166,9 @@ typedef enum {
|
||||||
EShTargetVulkan_1_0 = (1 << 22), // Vulkan 1.0
|
EShTargetVulkan_1_0 = (1 << 22), // Vulkan 1.0
|
||||||
EShTargetVulkan_1_1 = (1 << 22) | (1 << 12), // Vulkan 1.1
|
EShTargetVulkan_1_1 = (1 << 22) | (1 << 12), // Vulkan 1.1
|
||||||
EShTargetVulkan_1_2 = (1 << 22) | (2 << 12), // Vulkan 1.2
|
EShTargetVulkan_1_2 = (1 << 22) | (2 << 12), // Vulkan 1.2
|
||||||
|
EShTargetVulkan_1_3 = (1 << 22) | (3 << 12), // Vulkan 1.3
|
||||||
EShTargetOpenGL_450 = 450, // OpenGL
|
EShTargetOpenGL_450 = 450, // OpenGL
|
||||||
LAST_ELEMENT_MARKER(EShTargetClientVersionCount = 4),
|
LAST_ELEMENT_MARKER(EShTargetClientVersionCount = 5),
|
||||||
} EShTargetClientVersion;
|
} EShTargetClientVersion;
|
||||||
|
|
||||||
typedef EShTargetClientVersion EshTargetClientVersion;
|
typedef EShTargetClientVersion EshTargetClientVersion;
|
||||||
|
|
@ -179,7 +180,8 @@ typedef enum {
|
||||||
EShTargetSpv_1_3 = (1 << 16) | (3 << 8), // SPIR-V 1.3
|
EShTargetSpv_1_3 = (1 << 16) | (3 << 8), // SPIR-V 1.3
|
||||||
EShTargetSpv_1_4 = (1 << 16) | (4 << 8), // SPIR-V 1.4
|
EShTargetSpv_1_4 = (1 << 16) | (4 << 8), // SPIR-V 1.4
|
||||||
EShTargetSpv_1_5 = (1 << 16) | (5 << 8), // SPIR-V 1.5
|
EShTargetSpv_1_5 = (1 << 16) | (5 << 8), // SPIR-V 1.5
|
||||||
LAST_ELEMENT_MARKER(EShTargetLanguageVersionCount = 6),
|
EShTargetSpv_1_6 = (1 << 16) | (6 << 8), // SPIR-V 1.6
|
||||||
|
LAST_ELEMENT_MARKER(EShTargetLanguageVersionCount = 7),
|
||||||
} EShTargetLanguageVersion;
|
} EShTargetLanguageVersion;
|
||||||
|
|
||||||
struct TInputLanguage {
|
struct TInputLanguage {
|
||||||
|
|
@ -485,6 +487,7 @@ public:
|
||||||
GLSLANG_EXPORT void addUniformLocationOverride(const char* name, int loc);
|
GLSLANG_EXPORT void addUniformLocationOverride(const char* name, int loc);
|
||||||
GLSLANG_EXPORT void setUniformLocationBase(int base);
|
GLSLANG_EXPORT void setUniformLocationBase(int base);
|
||||||
GLSLANG_EXPORT void setInvertY(bool invert);
|
GLSLANG_EXPORT void setInvertY(bool invert);
|
||||||
|
GLSLANG_EXPORT void setDxPositionW(bool dxPosW);
|
||||||
#ifdef ENABLE_HLSL
|
#ifdef ENABLE_HLSL
|
||||||
GLSLANG_EXPORT void setHlslIoMapping(bool hlslIoMap);
|
GLSLANG_EXPORT void setHlslIoMapping(bool hlslIoMap);
|
||||||
GLSLANG_EXPORT void setFlattenUniformArrays(bool flatten);
|
GLSLANG_EXPORT void setFlattenUniformArrays(bool flatten);
|
||||||
|
|
@ -512,6 +515,9 @@ public:
|
||||||
// use EShClientNone and version of 0, e.g. for validation mode.
|
// use EShClientNone and version of 0, e.g. for validation mode.
|
||||||
// Note 'version' does not describe the target environment,
|
// Note 'version' does not describe the target environment,
|
||||||
// just the version of the source dialect to compile under.
|
// just the version of the source dialect to compile under.
|
||||||
|
// For example, to choose the Vulkan dialect of GLSL defined by
|
||||||
|
// version 100 of the KHR_vulkan_glsl extension: lang = EShSourceGlsl,
|
||||||
|
// dialect = EShClientVulkan, and version = 100.
|
||||||
//
|
//
|
||||||
// See the definitions of TEnvironment, EShSource, EShLanguage,
|
// See the definitions of TEnvironment, EShSource, EShLanguage,
|
||||||
// and EShClient for choices and more detail.
|
// and EShClient for choices and more detail.
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
#define GLSLANG_BUILD_INFO
|
#define GLSLANG_BUILD_INFO
|
||||||
|
|
||||||
#define GLSLANG_VERSION_MAJOR 11
|
#define GLSLANG_VERSION_MAJOR 11
|
||||||
#define GLSLANG_VERSION_MINOR 6
|
#define GLSLANG_VERSION_MINOR 8
|
||||||
#define GLSLANG_VERSION_PATCH 0
|
#define GLSLANG_VERSION_PATCH 0
|
||||||
#define GLSLANG_VERSION_FLAVOR ""
|
#define GLSLANG_VERSION_FLAVOR ""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,12 +53,12 @@
|
||||||
|
|
||||||
typedef unsigned int SpvId;
|
typedef unsigned int SpvId;
|
||||||
|
|
||||||
#define SPV_VERSION 0x10500
|
#define SPV_VERSION 0x10600
|
||||||
#define SPV_REVISION 4
|
#define SPV_REVISION 1
|
||||||
|
|
||||||
static const unsigned int SpvMagicNumber = 0x07230203;
|
static const unsigned int SpvMagicNumber = 0x07230203;
|
||||||
static const unsigned int SpvVersion = 0x00010500;
|
static const unsigned int SpvVersion = 0x00010600;
|
||||||
static const unsigned int SpvRevision = 4;
|
static const unsigned int SpvRevision = 1;
|
||||||
static const unsigned int SpvOpCodeMask = 0xffff;
|
static const unsigned int SpvOpCodeMask = 0xffff;
|
||||||
static const unsigned int SpvWordCountShift = 16;
|
static const unsigned int SpvWordCountShift = 16;
|
||||||
|
|
||||||
|
|
@ -69,6 +69,7 @@ typedef enum SpvSourceLanguage_ {
|
||||||
SpvSourceLanguageOpenCL_C = 3,
|
SpvSourceLanguageOpenCL_C = 3,
|
||||||
SpvSourceLanguageOpenCL_CPP = 4,
|
SpvSourceLanguageOpenCL_CPP = 4,
|
||||||
SpvSourceLanguageHLSL = 5,
|
SpvSourceLanguageHLSL = 5,
|
||||||
|
SpvSourceLanguageCPP_for_OpenCL = 6,
|
||||||
SpvSourceLanguageMax = 0x7fffffff,
|
SpvSourceLanguageMax = 0x7fffffff,
|
||||||
} SpvSourceLanguage;
|
} SpvSourceLanguage;
|
||||||
|
|
||||||
|
|
@ -154,6 +155,7 @@ typedef enum SpvExecutionMode_ {
|
||||||
SpvExecutionModeSubgroupsPerWorkgroupId = 37,
|
SpvExecutionModeSubgroupsPerWorkgroupId = 37,
|
||||||
SpvExecutionModeLocalSizeId = 38,
|
SpvExecutionModeLocalSizeId = 38,
|
||||||
SpvExecutionModeLocalSizeHintId = 39,
|
SpvExecutionModeLocalSizeHintId = 39,
|
||||||
|
SpvExecutionModeSubgroupUniformControlFlowKHR = 4421,
|
||||||
SpvExecutionModePostDepthCoverage = 4446,
|
SpvExecutionModePostDepthCoverage = 4446,
|
||||||
SpvExecutionModeDenormPreserve = 4459,
|
SpvExecutionModeDenormPreserve = 4459,
|
||||||
SpvExecutionModeDenormFlushToZero = 4460,
|
SpvExecutionModeDenormFlushToZero = 4460,
|
||||||
|
|
@ -172,10 +174,16 @@ typedef enum SpvExecutionMode_ {
|
||||||
SpvExecutionModeSampleInterlockUnorderedEXT = 5369,
|
SpvExecutionModeSampleInterlockUnorderedEXT = 5369,
|
||||||
SpvExecutionModeShadingRateInterlockOrderedEXT = 5370,
|
SpvExecutionModeShadingRateInterlockOrderedEXT = 5370,
|
||||||
SpvExecutionModeShadingRateInterlockUnorderedEXT = 5371,
|
SpvExecutionModeShadingRateInterlockUnorderedEXT = 5371,
|
||||||
|
SpvExecutionModeSharedLocalMemorySizeINTEL = 5618,
|
||||||
|
SpvExecutionModeRoundingModeRTPINTEL = 5620,
|
||||||
|
SpvExecutionModeRoundingModeRTNINTEL = 5621,
|
||||||
|
SpvExecutionModeFloatingPointModeALTINTEL = 5622,
|
||||||
|
SpvExecutionModeFloatingPointModeIEEEINTEL = 5623,
|
||||||
SpvExecutionModeMaxWorkgroupSizeINTEL = 5893,
|
SpvExecutionModeMaxWorkgroupSizeINTEL = 5893,
|
||||||
SpvExecutionModeMaxWorkDimINTEL = 5894,
|
SpvExecutionModeMaxWorkDimINTEL = 5894,
|
||||||
SpvExecutionModeNoGlobalOffsetINTEL = 5895,
|
SpvExecutionModeNoGlobalOffsetINTEL = 5895,
|
||||||
SpvExecutionModeNumSIMDWorkitemsINTEL = 5896,
|
SpvExecutionModeNumSIMDWorkitemsINTEL = 5896,
|
||||||
|
SpvExecutionModeSchedulerTargetFmaxMhzINTEL = 5903,
|
||||||
SpvExecutionModeMax = 0x7fffffff,
|
SpvExecutionModeMax = 0x7fffffff,
|
||||||
} SpvExecutionMode;
|
} SpvExecutionMode;
|
||||||
|
|
||||||
|
|
@ -208,6 +216,8 @@ typedef enum SpvStorageClass_ {
|
||||||
SpvStorageClassPhysicalStorageBuffer = 5349,
|
SpvStorageClassPhysicalStorageBuffer = 5349,
|
||||||
SpvStorageClassPhysicalStorageBufferEXT = 5349,
|
SpvStorageClassPhysicalStorageBufferEXT = 5349,
|
||||||
SpvStorageClassCodeSectionINTEL = 5605,
|
SpvStorageClassCodeSectionINTEL = 5605,
|
||||||
|
SpvStorageClassDeviceOnlyINTEL = 5936,
|
||||||
|
SpvStorageClassHostOnlyINTEL = 5937,
|
||||||
SpvStorageClassMax = 0x7fffffff,
|
SpvStorageClassMax = 0x7fffffff,
|
||||||
} SpvStorageClass;
|
} SpvStorageClass;
|
||||||
|
|
||||||
|
|
@ -347,6 +357,8 @@ typedef enum SpvImageOperandsShift_ {
|
||||||
SpvImageOperandsVolatileTexelKHRShift = 11,
|
SpvImageOperandsVolatileTexelKHRShift = 11,
|
||||||
SpvImageOperandsSignExtendShift = 12,
|
SpvImageOperandsSignExtendShift = 12,
|
||||||
SpvImageOperandsZeroExtendShift = 13,
|
SpvImageOperandsZeroExtendShift = 13,
|
||||||
|
SpvImageOperandsNontemporalShift = 14,
|
||||||
|
SpvImageOperandsOffsetsShift = 16,
|
||||||
SpvImageOperandsMax = 0x7fffffff,
|
SpvImageOperandsMax = 0x7fffffff,
|
||||||
} SpvImageOperandsShift;
|
} SpvImageOperandsShift;
|
||||||
|
|
||||||
|
|
@ -370,6 +382,8 @@ typedef enum SpvImageOperandsMask_ {
|
||||||
SpvImageOperandsVolatileTexelKHRMask = 0x00000800,
|
SpvImageOperandsVolatileTexelKHRMask = 0x00000800,
|
||||||
SpvImageOperandsSignExtendMask = 0x00001000,
|
SpvImageOperandsSignExtendMask = 0x00001000,
|
||||||
SpvImageOperandsZeroExtendMask = 0x00002000,
|
SpvImageOperandsZeroExtendMask = 0x00002000,
|
||||||
|
SpvImageOperandsNontemporalMask = 0x00004000,
|
||||||
|
SpvImageOperandsOffsetsMask = 0x00010000,
|
||||||
} SpvImageOperandsMask;
|
} SpvImageOperandsMask;
|
||||||
|
|
||||||
typedef enum SpvFPFastMathModeShift_ {
|
typedef enum SpvFPFastMathModeShift_ {
|
||||||
|
|
@ -378,6 +392,8 @@ typedef enum SpvFPFastMathModeShift_ {
|
||||||
SpvFPFastMathModeNSZShift = 2,
|
SpvFPFastMathModeNSZShift = 2,
|
||||||
SpvFPFastMathModeAllowRecipShift = 3,
|
SpvFPFastMathModeAllowRecipShift = 3,
|
||||||
SpvFPFastMathModeFastShift = 4,
|
SpvFPFastMathModeFastShift = 4,
|
||||||
|
SpvFPFastMathModeAllowContractFastINTELShift = 16,
|
||||||
|
SpvFPFastMathModeAllowReassocINTELShift = 17,
|
||||||
SpvFPFastMathModeMax = 0x7fffffff,
|
SpvFPFastMathModeMax = 0x7fffffff,
|
||||||
} SpvFPFastMathModeShift;
|
} SpvFPFastMathModeShift;
|
||||||
|
|
||||||
|
|
@ -388,6 +404,8 @@ typedef enum SpvFPFastMathModeMask_ {
|
||||||
SpvFPFastMathModeNSZMask = 0x00000004,
|
SpvFPFastMathModeNSZMask = 0x00000004,
|
||||||
SpvFPFastMathModeAllowRecipMask = 0x00000008,
|
SpvFPFastMathModeAllowRecipMask = 0x00000008,
|
||||||
SpvFPFastMathModeFastMask = 0x00000010,
|
SpvFPFastMathModeFastMask = 0x00000010,
|
||||||
|
SpvFPFastMathModeAllowContractFastINTELMask = 0x00010000,
|
||||||
|
SpvFPFastMathModeAllowReassocINTELMask = 0x00020000,
|
||||||
} SpvFPFastMathModeMask;
|
} SpvFPFastMathModeMask;
|
||||||
|
|
||||||
typedef enum SpvFPRoundingMode_ {
|
typedef enum SpvFPRoundingMode_ {
|
||||||
|
|
@ -401,6 +419,7 @@ typedef enum SpvFPRoundingMode_ {
|
||||||
typedef enum SpvLinkageType_ {
|
typedef enum SpvLinkageType_ {
|
||||||
SpvLinkageTypeExport = 0,
|
SpvLinkageTypeExport = 0,
|
||||||
SpvLinkageTypeImport = 1,
|
SpvLinkageTypeImport = 1,
|
||||||
|
SpvLinkageTypeLinkOnceODR = 2,
|
||||||
SpvLinkageTypeMax = 0x7fffffff,
|
SpvLinkageTypeMax = 0x7fffffff,
|
||||||
} SpvLinkageType;
|
} SpvLinkageType;
|
||||||
|
|
||||||
|
|
@ -481,6 +500,7 @@ typedef enum SpvDecoration_ {
|
||||||
SpvDecorationPerPrimitiveNV = 5271,
|
SpvDecorationPerPrimitiveNV = 5271,
|
||||||
SpvDecorationPerViewNV = 5272,
|
SpvDecorationPerViewNV = 5272,
|
||||||
SpvDecorationPerTaskNV = 5273,
|
SpvDecorationPerTaskNV = 5273,
|
||||||
|
SpvDecorationPerVertexKHR = 5285,
|
||||||
SpvDecorationPerVertexNV = 5285,
|
SpvDecorationPerVertexNV = 5285,
|
||||||
SpvDecorationNonUniform = 5300,
|
SpvDecorationNonUniform = 5300,
|
||||||
SpvDecorationNonUniformEXT = 5300,
|
SpvDecorationNonUniformEXT = 5300,
|
||||||
|
|
@ -488,12 +508,26 @@ typedef enum SpvDecoration_ {
|
||||||
SpvDecorationRestrictPointerEXT = 5355,
|
SpvDecorationRestrictPointerEXT = 5355,
|
||||||
SpvDecorationAliasedPointer = 5356,
|
SpvDecorationAliasedPointer = 5356,
|
||||||
SpvDecorationAliasedPointerEXT = 5356,
|
SpvDecorationAliasedPointerEXT = 5356,
|
||||||
|
SpvDecorationBindlessSamplerNV = 5398,
|
||||||
|
SpvDecorationBindlessImageNV = 5399,
|
||||||
|
SpvDecorationBoundSamplerNV = 5400,
|
||||||
|
SpvDecorationBoundImageNV = 5401,
|
||||||
|
SpvDecorationSIMTCallINTEL = 5599,
|
||||||
SpvDecorationReferencedIndirectlyINTEL = 5602,
|
SpvDecorationReferencedIndirectlyINTEL = 5602,
|
||||||
|
SpvDecorationClobberINTEL = 5607,
|
||||||
|
SpvDecorationSideEffectsINTEL = 5608,
|
||||||
|
SpvDecorationVectorComputeVariableINTEL = 5624,
|
||||||
|
SpvDecorationFuncParamIOKindINTEL = 5625,
|
||||||
|
SpvDecorationVectorComputeFunctionINTEL = 5626,
|
||||||
|
SpvDecorationStackCallINTEL = 5627,
|
||||||
|
SpvDecorationGlobalVariableOffsetINTEL = 5628,
|
||||||
SpvDecorationCounterBuffer = 5634,
|
SpvDecorationCounterBuffer = 5634,
|
||||||
SpvDecorationHlslCounterBufferGOOGLE = 5634,
|
SpvDecorationHlslCounterBufferGOOGLE = 5634,
|
||||||
SpvDecorationHlslSemanticGOOGLE = 5635,
|
SpvDecorationHlslSemanticGOOGLE = 5635,
|
||||||
SpvDecorationUserSemantic = 5635,
|
SpvDecorationUserSemantic = 5635,
|
||||||
SpvDecorationUserTypeGOOGLE = 5636,
|
SpvDecorationUserTypeGOOGLE = 5636,
|
||||||
|
SpvDecorationFunctionRoundingModeINTEL = 5822,
|
||||||
|
SpvDecorationFunctionDenormModeINTEL = 5823,
|
||||||
SpvDecorationRegisterINTEL = 5825,
|
SpvDecorationRegisterINTEL = 5825,
|
||||||
SpvDecorationMemoryINTEL = 5826,
|
SpvDecorationMemoryINTEL = 5826,
|
||||||
SpvDecorationNumbanksINTEL = 5827,
|
SpvDecorationNumbanksINTEL = 5827,
|
||||||
|
|
@ -506,6 +540,18 @@ typedef enum SpvDecoration_ {
|
||||||
SpvDecorationMergeINTEL = 5834,
|
SpvDecorationMergeINTEL = 5834,
|
||||||
SpvDecorationBankBitsINTEL = 5835,
|
SpvDecorationBankBitsINTEL = 5835,
|
||||||
SpvDecorationForcePow2DepthINTEL = 5836,
|
SpvDecorationForcePow2DepthINTEL = 5836,
|
||||||
|
SpvDecorationBurstCoalesceINTEL = 5899,
|
||||||
|
SpvDecorationCacheSizeINTEL = 5900,
|
||||||
|
SpvDecorationDontStaticallyCoalesceINTEL = 5901,
|
||||||
|
SpvDecorationPrefetchINTEL = 5902,
|
||||||
|
SpvDecorationStallEnableINTEL = 5905,
|
||||||
|
SpvDecorationFuseLoopsInFunctionINTEL = 5907,
|
||||||
|
SpvDecorationBufferLocationINTEL = 5921,
|
||||||
|
SpvDecorationIOPipeStorageINTEL = 5944,
|
||||||
|
SpvDecorationFunctionFloatingPointModeINTEL = 6080,
|
||||||
|
SpvDecorationSingleElementVectorINTEL = 6085,
|
||||||
|
SpvDecorationVectorComputeCallableFunctionINTEL = 6087,
|
||||||
|
SpvDecorationMediaBlockIOINTEL = 6140,
|
||||||
SpvDecorationMax = 0x7fffffff,
|
SpvDecorationMax = 0x7fffffff,
|
||||||
} SpvDecoration;
|
} SpvDecoration;
|
||||||
|
|
||||||
|
|
@ -590,7 +636,9 @@ typedef enum SpvBuiltIn_ {
|
||||||
SpvBuiltInLayerPerViewNV = 5279,
|
SpvBuiltInLayerPerViewNV = 5279,
|
||||||
SpvBuiltInMeshViewCountNV = 5280,
|
SpvBuiltInMeshViewCountNV = 5280,
|
||||||
SpvBuiltInMeshViewIndicesNV = 5281,
|
SpvBuiltInMeshViewIndicesNV = 5281,
|
||||||
|
SpvBuiltInBaryCoordKHR = 5286,
|
||||||
SpvBuiltInBaryCoordNV = 5286,
|
SpvBuiltInBaryCoordNV = 5286,
|
||||||
|
SpvBuiltInBaryCoordNoPerspKHR = 5287,
|
||||||
SpvBuiltInBaryCoordNoPerspNV = 5287,
|
SpvBuiltInBaryCoordNoPerspNV = 5287,
|
||||||
SpvBuiltInFragSizeEXT = 5292,
|
SpvBuiltInFragSizeEXT = 5292,
|
||||||
SpvBuiltInFragmentSizeNV = 5292,
|
SpvBuiltInFragmentSizeNV = 5292,
|
||||||
|
|
@ -621,6 +669,7 @@ typedef enum SpvBuiltIn_ {
|
||||||
SpvBuiltInHitTNV = 5332,
|
SpvBuiltInHitTNV = 5332,
|
||||||
SpvBuiltInHitKindKHR = 5333,
|
SpvBuiltInHitKindKHR = 5333,
|
||||||
SpvBuiltInHitKindNV = 5333,
|
SpvBuiltInHitKindNV = 5333,
|
||||||
|
SpvBuiltInCurrentRayTimeNV = 5334,
|
||||||
SpvBuiltInIncomingRayFlagsKHR = 5351,
|
SpvBuiltInIncomingRayFlagsKHR = 5351,
|
||||||
SpvBuiltInIncomingRayFlagsNV = 5351,
|
SpvBuiltInIncomingRayFlagsNV = 5351,
|
||||||
SpvBuiltInRayGeometryIndexKHR = 5352,
|
SpvBuiltInRayGeometryIndexKHR = 5352,
|
||||||
|
|
@ -660,6 +709,7 @@ typedef enum SpvLoopControlShift_ {
|
||||||
SpvLoopControlLoopCoalesceINTELShift = 20,
|
SpvLoopControlLoopCoalesceINTELShift = 20,
|
||||||
SpvLoopControlMaxInterleavingINTELShift = 21,
|
SpvLoopControlMaxInterleavingINTELShift = 21,
|
||||||
SpvLoopControlSpeculatedIterationsINTELShift = 22,
|
SpvLoopControlSpeculatedIterationsINTELShift = 22,
|
||||||
|
SpvLoopControlNoFusionINTELShift = 23,
|
||||||
SpvLoopControlMax = 0x7fffffff,
|
SpvLoopControlMax = 0x7fffffff,
|
||||||
} SpvLoopControlShift;
|
} SpvLoopControlShift;
|
||||||
|
|
||||||
|
|
@ -681,6 +731,7 @@ typedef enum SpvLoopControlMask_ {
|
||||||
SpvLoopControlLoopCoalesceINTELMask = 0x00100000,
|
SpvLoopControlLoopCoalesceINTELMask = 0x00100000,
|
||||||
SpvLoopControlMaxInterleavingINTELMask = 0x00200000,
|
SpvLoopControlMaxInterleavingINTELMask = 0x00200000,
|
||||||
SpvLoopControlSpeculatedIterationsINTELMask = 0x00400000,
|
SpvLoopControlSpeculatedIterationsINTELMask = 0x00400000,
|
||||||
|
SpvLoopControlNoFusionINTELMask = 0x00800000,
|
||||||
} SpvLoopControlMask;
|
} SpvLoopControlMask;
|
||||||
|
|
||||||
typedef enum SpvFunctionControlShift_ {
|
typedef enum SpvFunctionControlShift_ {
|
||||||
|
|
@ -688,6 +739,7 @@ typedef enum SpvFunctionControlShift_ {
|
||||||
SpvFunctionControlDontInlineShift = 1,
|
SpvFunctionControlDontInlineShift = 1,
|
||||||
SpvFunctionControlPureShift = 2,
|
SpvFunctionControlPureShift = 2,
|
||||||
SpvFunctionControlConstShift = 3,
|
SpvFunctionControlConstShift = 3,
|
||||||
|
SpvFunctionControlOptNoneINTELShift = 16,
|
||||||
SpvFunctionControlMax = 0x7fffffff,
|
SpvFunctionControlMax = 0x7fffffff,
|
||||||
} SpvFunctionControlShift;
|
} SpvFunctionControlShift;
|
||||||
|
|
||||||
|
|
@ -697,6 +749,7 @@ typedef enum SpvFunctionControlMask_ {
|
||||||
SpvFunctionControlDontInlineMask = 0x00000002,
|
SpvFunctionControlDontInlineMask = 0x00000002,
|
||||||
SpvFunctionControlPureMask = 0x00000004,
|
SpvFunctionControlPureMask = 0x00000004,
|
||||||
SpvFunctionControlConstMask = 0x00000008,
|
SpvFunctionControlConstMask = 0x00000008,
|
||||||
|
SpvFunctionControlOptNoneINTELMask = 0x00010000,
|
||||||
} SpvFunctionControlMask;
|
} SpvFunctionControlMask;
|
||||||
|
|
||||||
typedef enum SpvMemorySemanticsShift_ {
|
typedef enum SpvMemorySemanticsShift_ {
|
||||||
|
|
@ -877,9 +930,13 @@ typedef enum SpvCapability_ {
|
||||||
SpvCapabilityGroupNonUniformQuad = 68,
|
SpvCapabilityGroupNonUniformQuad = 68,
|
||||||
SpvCapabilityShaderLayer = 69,
|
SpvCapabilityShaderLayer = 69,
|
||||||
SpvCapabilityShaderViewportIndex = 70,
|
SpvCapabilityShaderViewportIndex = 70,
|
||||||
|
SpvCapabilityUniformDecoration = 71,
|
||||||
SpvCapabilityFragmentShadingRateKHR = 4422,
|
SpvCapabilityFragmentShadingRateKHR = 4422,
|
||||||
SpvCapabilitySubgroupBallotKHR = 4423,
|
SpvCapabilitySubgroupBallotKHR = 4423,
|
||||||
SpvCapabilityDrawParameters = 4427,
|
SpvCapabilityDrawParameters = 4427,
|
||||||
|
SpvCapabilityWorkgroupMemoryExplicitLayoutKHR = 4428,
|
||||||
|
SpvCapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR = 4429,
|
||||||
|
SpvCapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR = 4430,
|
||||||
SpvCapabilitySubgroupVoteKHR = 4431,
|
SpvCapabilitySubgroupVoteKHR = 4431,
|
||||||
SpvCapabilityStorageBuffer16BitAccess = 4433,
|
SpvCapabilityStorageBuffer16BitAccess = 4433,
|
||||||
SpvCapabilityStorageUniformBufferBlock16 = 4433,
|
SpvCapabilityStorageUniformBufferBlock16 = 4433,
|
||||||
|
|
@ -922,6 +979,7 @@ typedef enum SpvCapability_ {
|
||||||
SpvCapabilityFragmentFullyCoveredEXT = 5265,
|
SpvCapabilityFragmentFullyCoveredEXT = 5265,
|
||||||
SpvCapabilityMeshShadingNV = 5266,
|
SpvCapabilityMeshShadingNV = 5266,
|
||||||
SpvCapabilityImageFootprintNV = 5282,
|
SpvCapabilityImageFootprintNV = 5282,
|
||||||
|
SpvCapabilityFragmentBarycentricKHR = 5284,
|
||||||
SpvCapabilityFragmentBarycentricNV = 5284,
|
SpvCapabilityFragmentBarycentricNV = 5284,
|
||||||
SpvCapabilityComputeDerivativeGroupQuadsNV = 5288,
|
SpvCapabilityComputeDerivativeGroupQuadsNV = 5288,
|
||||||
SpvCapabilityFragmentDensityEXT = 5291,
|
SpvCapabilityFragmentDensityEXT = 5291,
|
||||||
|
|
@ -952,6 +1010,7 @@ typedef enum SpvCapability_ {
|
||||||
SpvCapabilityStorageTexelBufferArrayNonUniformIndexing = 5312,
|
SpvCapabilityStorageTexelBufferArrayNonUniformIndexing = 5312,
|
||||||
SpvCapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
|
SpvCapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
|
||||||
SpvCapabilityRayTracingNV = 5340,
|
SpvCapabilityRayTracingNV = 5340,
|
||||||
|
SpvCapabilityRayTracingMotionBlurNV = 5341,
|
||||||
SpvCapabilityVulkanMemoryModel = 5345,
|
SpvCapabilityVulkanMemoryModel = 5345,
|
||||||
SpvCapabilityVulkanMemoryModelKHR = 5345,
|
SpvCapabilityVulkanMemoryModelKHR = 5345,
|
||||||
SpvCapabilityVulkanMemoryModelDeviceScope = 5346,
|
SpvCapabilityVulkanMemoryModelDeviceScope = 5346,
|
||||||
|
|
@ -965,26 +1024,62 @@ typedef enum SpvCapability_ {
|
||||||
SpvCapabilityFragmentShaderShadingRateInterlockEXT = 5372,
|
SpvCapabilityFragmentShaderShadingRateInterlockEXT = 5372,
|
||||||
SpvCapabilityShaderSMBuiltinsNV = 5373,
|
SpvCapabilityShaderSMBuiltinsNV = 5373,
|
||||||
SpvCapabilityFragmentShaderPixelInterlockEXT = 5378,
|
SpvCapabilityFragmentShaderPixelInterlockEXT = 5378,
|
||||||
|
SpvCapabilityDemoteToHelperInvocation = 5379,
|
||||||
SpvCapabilityDemoteToHelperInvocationEXT = 5379,
|
SpvCapabilityDemoteToHelperInvocationEXT = 5379,
|
||||||
|
SpvCapabilityBindlessTextureNV = 5390,
|
||||||
SpvCapabilitySubgroupShuffleINTEL = 5568,
|
SpvCapabilitySubgroupShuffleINTEL = 5568,
|
||||||
SpvCapabilitySubgroupBufferBlockIOINTEL = 5569,
|
SpvCapabilitySubgroupBufferBlockIOINTEL = 5569,
|
||||||
SpvCapabilitySubgroupImageBlockIOINTEL = 5570,
|
SpvCapabilitySubgroupImageBlockIOINTEL = 5570,
|
||||||
SpvCapabilitySubgroupImageMediaBlockIOINTEL = 5579,
|
SpvCapabilitySubgroupImageMediaBlockIOINTEL = 5579,
|
||||||
|
SpvCapabilityRoundToInfinityINTEL = 5582,
|
||||||
|
SpvCapabilityFloatingPointModeINTEL = 5583,
|
||||||
SpvCapabilityIntegerFunctions2INTEL = 5584,
|
SpvCapabilityIntegerFunctions2INTEL = 5584,
|
||||||
SpvCapabilityFunctionPointersINTEL = 5603,
|
SpvCapabilityFunctionPointersINTEL = 5603,
|
||||||
SpvCapabilityIndirectReferencesINTEL = 5604,
|
SpvCapabilityIndirectReferencesINTEL = 5604,
|
||||||
|
SpvCapabilityAsmINTEL = 5606,
|
||||||
|
SpvCapabilityAtomicFloat32MinMaxEXT = 5612,
|
||||||
|
SpvCapabilityAtomicFloat64MinMaxEXT = 5613,
|
||||||
|
SpvCapabilityAtomicFloat16MinMaxEXT = 5616,
|
||||||
|
SpvCapabilityVectorComputeINTEL = 5617,
|
||||||
|
SpvCapabilityVectorAnyINTEL = 5619,
|
||||||
|
SpvCapabilityExpectAssumeKHR = 5629,
|
||||||
SpvCapabilitySubgroupAvcMotionEstimationINTEL = 5696,
|
SpvCapabilitySubgroupAvcMotionEstimationINTEL = 5696,
|
||||||
SpvCapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697,
|
SpvCapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697,
|
||||||
SpvCapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698,
|
SpvCapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698,
|
||||||
|
SpvCapabilityVariableLengthArrayINTEL = 5817,
|
||||||
|
SpvCapabilityFunctionFloatControlINTEL = 5821,
|
||||||
SpvCapabilityFPGAMemoryAttributesINTEL = 5824,
|
SpvCapabilityFPGAMemoryAttributesINTEL = 5824,
|
||||||
|
SpvCapabilityFPFastMathModeINTEL = 5837,
|
||||||
|
SpvCapabilityArbitraryPrecisionIntegersINTEL = 5844,
|
||||||
|
SpvCapabilityArbitraryPrecisionFloatingPointINTEL = 5845,
|
||||||
SpvCapabilityUnstructuredLoopControlsINTEL = 5886,
|
SpvCapabilityUnstructuredLoopControlsINTEL = 5886,
|
||||||
SpvCapabilityFPGALoopControlsINTEL = 5888,
|
SpvCapabilityFPGALoopControlsINTEL = 5888,
|
||||||
SpvCapabilityKernelAttributesINTEL = 5892,
|
SpvCapabilityKernelAttributesINTEL = 5892,
|
||||||
SpvCapabilityFPGAKernelAttributesINTEL = 5897,
|
SpvCapabilityFPGAKernelAttributesINTEL = 5897,
|
||||||
|
SpvCapabilityFPGAMemoryAccessesINTEL = 5898,
|
||||||
|
SpvCapabilityFPGAClusterAttributesINTEL = 5904,
|
||||||
|
SpvCapabilityLoopFuseINTEL = 5906,
|
||||||
|
SpvCapabilityFPGABufferLocationINTEL = 5920,
|
||||||
|
SpvCapabilityArbitraryPrecisionFixedPointINTEL = 5922,
|
||||||
|
SpvCapabilityUSMStorageClassesINTEL = 5935,
|
||||||
|
SpvCapabilityIOPipesINTEL = 5943,
|
||||||
SpvCapabilityBlockingPipesINTEL = 5945,
|
SpvCapabilityBlockingPipesINTEL = 5945,
|
||||||
SpvCapabilityFPGARegINTEL = 5948,
|
SpvCapabilityFPGARegINTEL = 5948,
|
||||||
|
SpvCapabilityDotProductInputAll = 6016,
|
||||||
|
SpvCapabilityDotProductInputAllKHR = 6016,
|
||||||
|
SpvCapabilityDotProductInput4x8Bit = 6017,
|
||||||
|
SpvCapabilityDotProductInput4x8BitKHR = 6017,
|
||||||
|
SpvCapabilityDotProductInput4x8BitPacked = 6018,
|
||||||
|
SpvCapabilityDotProductInput4x8BitPackedKHR = 6018,
|
||||||
|
SpvCapabilityDotProduct = 6019,
|
||||||
|
SpvCapabilityDotProductKHR = 6019,
|
||||||
|
SpvCapabilityBitInstructions = 6025,
|
||||||
SpvCapabilityAtomicFloat32AddEXT = 6033,
|
SpvCapabilityAtomicFloat32AddEXT = 6033,
|
||||||
SpvCapabilityAtomicFloat64AddEXT = 6034,
|
SpvCapabilityAtomicFloat64AddEXT = 6034,
|
||||||
|
SpvCapabilityLongConstantCompositeINTEL = 6089,
|
||||||
|
SpvCapabilityOptNoneINTEL = 6094,
|
||||||
|
SpvCapabilityAtomicFloat16AddEXT = 6095,
|
||||||
|
SpvCapabilityDebugInfoModuleINTEL = 6114,
|
||||||
SpvCapabilityMax = 0x7fffffff,
|
SpvCapabilityMax = 0x7fffffff,
|
||||||
} SpvCapability;
|
} SpvCapability;
|
||||||
|
|
||||||
|
|
@ -1051,6 +1146,44 @@ typedef enum SpvFragmentShadingRateMask_ {
|
||||||
SpvFragmentShadingRateHorizontal4PixelsMask = 0x00000008,
|
SpvFragmentShadingRateHorizontal4PixelsMask = 0x00000008,
|
||||||
} SpvFragmentShadingRateMask;
|
} SpvFragmentShadingRateMask;
|
||||||
|
|
||||||
|
typedef enum SpvFPDenormMode_ {
|
||||||
|
SpvFPDenormModePreserve = 0,
|
||||||
|
SpvFPDenormModeFlushToZero = 1,
|
||||||
|
SpvFPDenormModeMax = 0x7fffffff,
|
||||||
|
} SpvFPDenormMode;
|
||||||
|
|
||||||
|
typedef enum SpvFPOperationMode_ {
|
||||||
|
SpvFPOperationModeIEEE = 0,
|
||||||
|
SpvFPOperationModeALT = 1,
|
||||||
|
SpvFPOperationModeMax = 0x7fffffff,
|
||||||
|
} SpvFPOperationMode;
|
||||||
|
|
||||||
|
typedef enum SpvQuantizationModes_ {
|
||||||
|
SpvQuantizationModesTRN = 0,
|
||||||
|
SpvQuantizationModesTRN_ZERO = 1,
|
||||||
|
SpvQuantizationModesRND = 2,
|
||||||
|
SpvQuantizationModesRND_ZERO = 3,
|
||||||
|
SpvQuantizationModesRND_INF = 4,
|
||||||
|
SpvQuantizationModesRND_MIN_INF = 5,
|
||||||
|
SpvQuantizationModesRND_CONV = 6,
|
||||||
|
SpvQuantizationModesRND_CONV_ODD = 7,
|
||||||
|
SpvQuantizationModesMax = 0x7fffffff,
|
||||||
|
} SpvQuantizationModes;
|
||||||
|
|
||||||
|
typedef enum SpvOverflowModes_ {
|
||||||
|
SpvOverflowModesWRAP = 0,
|
||||||
|
SpvOverflowModesSAT = 1,
|
||||||
|
SpvOverflowModesSAT_ZERO = 2,
|
||||||
|
SpvOverflowModesSAT_SYM = 3,
|
||||||
|
SpvOverflowModesMax = 0x7fffffff,
|
||||||
|
} SpvOverflowModes;
|
||||||
|
|
||||||
|
typedef enum SpvPackedVectorFormat_ {
|
||||||
|
SpvPackedVectorFormatPackedVectorFormat4x8Bit = 0,
|
||||||
|
SpvPackedVectorFormatPackedVectorFormat4x8BitKHR = 0,
|
||||||
|
SpvPackedVectorFormatMax = 0x7fffffff,
|
||||||
|
} SpvPackedVectorFormat;
|
||||||
|
|
||||||
typedef enum SpvOp_ {
|
typedef enum SpvOp_ {
|
||||||
SpvOpNop = 0,
|
SpvOpNop = 0,
|
||||||
SpvOpUndef = 1,
|
SpvOpUndef = 1,
|
||||||
|
|
@ -1408,6 +1541,18 @@ typedef enum SpvOp_ {
|
||||||
SpvOpConvertUToAccelerationStructureKHR = 4447,
|
SpvOpConvertUToAccelerationStructureKHR = 4447,
|
||||||
SpvOpIgnoreIntersectionKHR = 4448,
|
SpvOpIgnoreIntersectionKHR = 4448,
|
||||||
SpvOpTerminateRayKHR = 4449,
|
SpvOpTerminateRayKHR = 4449,
|
||||||
|
SpvOpSDot = 4450,
|
||||||
|
SpvOpSDotKHR = 4450,
|
||||||
|
SpvOpUDot = 4451,
|
||||||
|
SpvOpUDotKHR = 4451,
|
||||||
|
SpvOpSUDot = 4452,
|
||||||
|
SpvOpSUDotKHR = 4452,
|
||||||
|
SpvOpSDotAccSat = 4453,
|
||||||
|
SpvOpSDotAccSatKHR = 4453,
|
||||||
|
SpvOpUDotAccSat = 4454,
|
||||||
|
SpvOpUDotAccSatKHR = 4454,
|
||||||
|
SpvOpSUDotAccSat = 4455,
|
||||||
|
SpvOpSUDotAccSatKHR = 4455,
|
||||||
SpvOpTypeRayQueryKHR = 4472,
|
SpvOpTypeRayQueryKHR = 4472,
|
||||||
SpvOpRayQueryInitializeKHR = 4473,
|
SpvOpRayQueryInitializeKHR = 4473,
|
||||||
SpvOpRayQueryTerminateKHR = 4474,
|
SpvOpRayQueryTerminateKHR = 4474,
|
||||||
|
|
@ -1434,6 +1579,8 @@ typedef enum SpvOp_ {
|
||||||
SpvOpIgnoreIntersectionNV = 5335,
|
SpvOpIgnoreIntersectionNV = 5335,
|
||||||
SpvOpTerminateRayNV = 5336,
|
SpvOpTerminateRayNV = 5336,
|
||||||
SpvOpTraceNV = 5337,
|
SpvOpTraceNV = 5337,
|
||||||
|
SpvOpTraceMotionNV = 5338,
|
||||||
|
SpvOpTraceRayMotionNV = 5339,
|
||||||
SpvOpTypeAccelerationStructureKHR = 5341,
|
SpvOpTypeAccelerationStructureKHR = 5341,
|
||||||
SpvOpTypeAccelerationStructureNV = 5341,
|
SpvOpTypeAccelerationStructureNV = 5341,
|
||||||
SpvOpExecuteCallableNV = 5344,
|
SpvOpExecuteCallableNV = 5344,
|
||||||
|
|
@ -1444,8 +1591,16 @@ typedef enum SpvOp_ {
|
||||||
SpvOpCooperativeMatrixLengthNV = 5362,
|
SpvOpCooperativeMatrixLengthNV = 5362,
|
||||||
SpvOpBeginInvocationInterlockEXT = 5364,
|
SpvOpBeginInvocationInterlockEXT = 5364,
|
||||||
SpvOpEndInvocationInterlockEXT = 5365,
|
SpvOpEndInvocationInterlockEXT = 5365,
|
||||||
|
SpvOpDemoteToHelperInvocation = 5380,
|
||||||
SpvOpDemoteToHelperInvocationEXT = 5380,
|
SpvOpDemoteToHelperInvocationEXT = 5380,
|
||||||
SpvOpIsHelperInvocationEXT = 5381,
|
SpvOpIsHelperInvocationEXT = 5381,
|
||||||
|
SpvOpConvertUToImageNV = 5391,
|
||||||
|
SpvOpConvertUToSamplerNV = 5392,
|
||||||
|
SpvOpConvertImageToUNV = 5393,
|
||||||
|
SpvOpConvertSamplerToUNV = 5394,
|
||||||
|
SpvOpConvertUToSampledImageNV = 5395,
|
||||||
|
SpvOpConvertSampledImageToUNV = 5396,
|
||||||
|
SpvOpSamplerImageAddressingModeNV = 5397,
|
||||||
SpvOpSubgroupShuffleINTEL = 5571,
|
SpvOpSubgroupShuffleINTEL = 5571,
|
||||||
SpvOpSubgroupShuffleDownINTEL = 5572,
|
SpvOpSubgroupShuffleDownINTEL = 5572,
|
||||||
SpvOpSubgroupShuffleUpINTEL = 5573,
|
SpvOpSubgroupShuffleUpINTEL = 5573,
|
||||||
|
|
@ -1470,8 +1625,15 @@ typedef enum SpvOp_ {
|
||||||
SpvOpUSubSatINTEL = 5596,
|
SpvOpUSubSatINTEL = 5596,
|
||||||
SpvOpIMul32x16INTEL = 5597,
|
SpvOpIMul32x16INTEL = 5597,
|
||||||
SpvOpUMul32x16INTEL = 5598,
|
SpvOpUMul32x16INTEL = 5598,
|
||||||
SpvOpFunctionPointerINTEL = 5600,
|
SpvOpConstantFunctionPointerINTEL = 5600,
|
||||||
SpvOpFunctionPointerCallINTEL = 5601,
|
SpvOpFunctionPointerCallINTEL = 5601,
|
||||||
|
SpvOpAsmTargetINTEL = 5609,
|
||||||
|
SpvOpAsmINTEL = 5610,
|
||||||
|
SpvOpAsmCallINTEL = 5611,
|
||||||
|
SpvOpAtomicFMinEXT = 5614,
|
||||||
|
SpvOpAtomicFMaxEXT = 5615,
|
||||||
|
SpvOpAssumeTrueKHR = 5630,
|
||||||
|
SpvOpExpectKHR = 5631,
|
||||||
SpvOpDecorateString = 5632,
|
SpvOpDecorateString = 5632,
|
||||||
SpvOpDecorateStringGOOGLE = 5632,
|
SpvOpDecorateStringGOOGLE = 5632,
|
||||||
SpvOpMemberDecorateString = 5633,
|
SpvOpMemberDecorateString = 5633,
|
||||||
|
|
@ -1594,7 +1756,64 @@ typedef enum SpvOp_ {
|
||||||
SpvOpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814,
|
SpvOpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814,
|
||||||
SpvOpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815,
|
SpvOpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815,
|
||||||
SpvOpSubgroupAvcSicGetInterRawSadsINTEL = 5816,
|
SpvOpSubgroupAvcSicGetInterRawSadsINTEL = 5816,
|
||||||
|
SpvOpVariableLengthArrayINTEL = 5818,
|
||||||
|
SpvOpSaveMemoryINTEL = 5819,
|
||||||
|
SpvOpRestoreMemoryINTEL = 5820,
|
||||||
|
SpvOpArbitraryFloatSinCosPiINTEL = 5840,
|
||||||
|
SpvOpArbitraryFloatCastINTEL = 5841,
|
||||||
|
SpvOpArbitraryFloatCastFromIntINTEL = 5842,
|
||||||
|
SpvOpArbitraryFloatCastToIntINTEL = 5843,
|
||||||
|
SpvOpArbitraryFloatAddINTEL = 5846,
|
||||||
|
SpvOpArbitraryFloatSubINTEL = 5847,
|
||||||
|
SpvOpArbitraryFloatMulINTEL = 5848,
|
||||||
|
SpvOpArbitraryFloatDivINTEL = 5849,
|
||||||
|
SpvOpArbitraryFloatGTINTEL = 5850,
|
||||||
|
SpvOpArbitraryFloatGEINTEL = 5851,
|
||||||
|
SpvOpArbitraryFloatLTINTEL = 5852,
|
||||||
|
SpvOpArbitraryFloatLEINTEL = 5853,
|
||||||
|
SpvOpArbitraryFloatEQINTEL = 5854,
|
||||||
|
SpvOpArbitraryFloatRecipINTEL = 5855,
|
||||||
|
SpvOpArbitraryFloatRSqrtINTEL = 5856,
|
||||||
|
SpvOpArbitraryFloatCbrtINTEL = 5857,
|
||||||
|
SpvOpArbitraryFloatHypotINTEL = 5858,
|
||||||
|
SpvOpArbitraryFloatSqrtINTEL = 5859,
|
||||||
|
SpvOpArbitraryFloatLogINTEL = 5860,
|
||||||
|
SpvOpArbitraryFloatLog2INTEL = 5861,
|
||||||
|
SpvOpArbitraryFloatLog10INTEL = 5862,
|
||||||
|
SpvOpArbitraryFloatLog1pINTEL = 5863,
|
||||||
|
SpvOpArbitraryFloatExpINTEL = 5864,
|
||||||
|
SpvOpArbitraryFloatExp2INTEL = 5865,
|
||||||
|
SpvOpArbitraryFloatExp10INTEL = 5866,
|
||||||
|
SpvOpArbitraryFloatExpm1INTEL = 5867,
|
||||||
|
SpvOpArbitraryFloatSinINTEL = 5868,
|
||||||
|
SpvOpArbitraryFloatCosINTEL = 5869,
|
||||||
|
SpvOpArbitraryFloatSinCosINTEL = 5870,
|
||||||
|
SpvOpArbitraryFloatSinPiINTEL = 5871,
|
||||||
|
SpvOpArbitraryFloatCosPiINTEL = 5872,
|
||||||
|
SpvOpArbitraryFloatASinINTEL = 5873,
|
||||||
|
SpvOpArbitraryFloatASinPiINTEL = 5874,
|
||||||
|
SpvOpArbitraryFloatACosINTEL = 5875,
|
||||||
|
SpvOpArbitraryFloatACosPiINTEL = 5876,
|
||||||
|
SpvOpArbitraryFloatATanINTEL = 5877,
|
||||||
|
SpvOpArbitraryFloatATanPiINTEL = 5878,
|
||||||
|
SpvOpArbitraryFloatATan2INTEL = 5879,
|
||||||
|
SpvOpArbitraryFloatPowINTEL = 5880,
|
||||||
|
SpvOpArbitraryFloatPowRINTEL = 5881,
|
||||||
|
SpvOpArbitraryFloatPowNINTEL = 5882,
|
||||||
SpvOpLoopControlINTEL = 5887,
|
SpvOpLoopControlINTEL = 5887,
|
||||||
|
SpvOpFixedSqrtINTEL = 5923,
|
||||||
|
SpvOpFixedRecipINTEL = 5924,
|
||||||
|
SpvOpFixedRsqrtINTEL = 5925,
|
||||||
|
SpvOpFixedSinINTEL = 5926,
|
||||||
|
SpvOpFixedCosINTEL = 5927,
|
||||||
|
SpvOpFixedSinCosINTEL = 5928,
|
||||||
|
SpvOpFixedSinPiINTEL = 5929,
|
||||||
|
SpvOpFixedCosPiINTEL = 5930,
|
||||||
|
SpvOpFixedSinCosPiINTEL = 5931,
|
||||||
|
SpvOpFixedLogINTEL = 5932,
|
||||||
|
SpvOpFixedExpINTEL = 5933,
|
||||||
|
SpvOpPtrCastToCrossWorkgroupINTEL = 5934,
|
||||||
|
SpvOpCrossWorkgroupCastToPtrINTEL = 5938,
|
||||||
SpvOpReadPipeBlockingINTEL = 5946,
|
SpvOpReadPipeBlockingINTEL = 5946,
|
||||||
SpvOpWritePipeBlockingINTEL = 5947,
|
SpvOpWritePipeBlockingINTEL = 5947,
|
||||||
SpvOpFPGARegINTEL = 5949,
|
SpvOpFPGARegINTEL = 5949,
|
||||||
|
|
@ -1616,6 +1835,10 @@ typedef enum SpvOp_ {
|
||||||
SpvOpRayQueryGetIntersectionObjectToWorldKHR = 6031,
|
SpvOpRayQueryGetIntersectionObjectToWorldKHR = 6031,
|
||||||
SpvOpRayQueryGetIntersectionWorldToObjectKHR = 6032,
|
SpvOpRayQueryGetIntersectionWorldToObjectKHR = 6032,
|
||||||
SpvOpAtomicFAddEXT = 6035,
|
SpvOpAtomicFAddEXT = 6035,
|
||||||
|
SpvOpTypeBufferSurfaceINTEL = 6086,
|
||||||
|
SpvOpTypeStructContinuedINTEL = 6090,
|
||||||
|
SpvOpConstantCompositeContinuedINTEL = 6091,
|
||||||
|
SpvOpSpecConstantCompositeContinuedINTEL = 6092,
|
||||||
SpvOpMax = 0x7fffffff,
|
SpvOpMax = 0x7fffffff,
|
||||||
} SpvOp;
|
} SpvOp;
|
||||||
|
|
||||||
|
|
@ -1980,6 +2203,12 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
|
||||||
case SpvOpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break;
|
case SpvOpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpIgnoreIntersectionKHR: *hasResult = false; *hasResultType = false; break;
|
case SpvOpIgnoreIntersectionKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
case SpvOpTerminateRayKHR: *hasResult = false; *hasResultType = false; break;
|
case SpvOpTerminateRayKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case SpvOpSDot: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpUDot: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpSUDot: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpSDotAccSat: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpUDotAccSat: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpSUDotAccSat: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break;
|
case SpvOpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break;
|
||||||
case SpvOpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
|
case SpvOpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
case SpvOpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
|
case SpvOpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
|
|
@ -2005,6 +2234,8 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
|
||||||
case SpvOpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break;
|
case SpvOpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break;
|
||||||
case SpvOpTerminateRayNV: *hasResult = false; *hasResultType = false; break;
|
case SpvOpTerminateRayNV: *hasResult = false; *hasResultType = false; break;
|
||||||
case SpvOpTraceNV: *hasResult = false; *hasResultType = false; break;
|
case SpvOpTraceNV: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case SpvOpTraceMotionNV: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case SpvOpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
|
||||||
case SpvOpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
|
case SpvOpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
|
||||||
case SpvOpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
|
case SpvOpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
|
||||||
case SpvOpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
|
case SpvOpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
|
||||||
|
|
@ -2014,8 +2245,15 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
|
||||||
case SpvOpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break;
|
case SpvOpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpBeginInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break;
|
case SpvOpBeginInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break;
|
||||||
case SpvOpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break;
|
case SpvOpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break;
|
||||||
case SpvOpDemoteToHelperInvocationEXT: *hasResult = false; *hasResultType = false; break;
|
case SpvOpDemoteToHelperInvocation: *hasResult = false; *hasResultType = false; break;
|
||||||
case SpvOpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break;
|
case SpvOpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpConvertUToImageNV: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpConvertUToSamplerNV: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpConvertImageToUNV: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpConvertSamplerToUNV: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break;
|
||||||
case SpvOpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break;
|
case SpvOpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break;
|
case SpvOpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break;
|
case SpvOpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
|
@ -2040,8 +2278,15 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
|
||||||
case SpvOpUSubSatINTEL: *hasResult = true; *hasResultType = true; break;
|
case SpvOpUSubSatINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
|
case SpvOpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
|
case SpvOpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break;
|
case SpvOpConstantFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break;
|
case SpvOpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpAsmINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpAsmCallINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpAtomicFMinEXT: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpAtomicFMaxEXT: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpAssumeTrueKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case SpvOpExpectKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpDecorateString: *hasResult = false; *hasResultType = false; break;
|
case SpvOpDecorateString: *hasResult = false; *hasResultType = false; break;
|
||||||
case SpvOpMemberDecorateString: *hasResult = false; *hasResultType = false; break;
|
case SpvOpMemberDecorateString: *hasResult = false; *hasResultType = false; break;
|
||||||
case SpvOpVmeImageINTEL: *hasResult = true; *hasResultType = true; break;
|
case SpvOpVmeImageINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
|
@ -2162,7 +2407,64 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
|
||||||
case SpvOpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: *hasResult = true; *hasResultType = true; break;
|
case SpvOpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: *hasResult = true; *hasResultType = true; break;
|
case SpvOpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpSubgroupAvcSicGetInterRawSadsINTEL: *hasResult = true; *hasResultType = true; break;
|
case SpvOpSubgroupAvcSicGetInterRawSadsINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpVariableLengthArrayINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpSaveMemoryINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpRestoreMemoryINTEL: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case SpvOpArbitraryFloatSinCosPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatCastINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatCastFromIntINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatCastToIntINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatAddINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatSubINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatMulINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatDivINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatGTINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatGEINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatLTINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatLEINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatEQINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatRecipINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatRSqrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatCbrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatHypotINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatSqrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatLogINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatLog2INTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatLog10INTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatLog1pINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatExpINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatExp2INTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatExp10INTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatExpm1INTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatSinINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatCosINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatSinCosINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatSinPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatCosPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatASinINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatASinPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatACosINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatACosPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatATanINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatATanPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatATan2INTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatPowINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpLoopControlINTEL: *hasResult = false; *hasResultType = false; break;
|
case SpvOpLoopControlINTEL: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case SpvOpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpFixedSinINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpFixedCosINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpFixedSinCosINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpFixedSinPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpFixedCosPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpFixedSinCosPiINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpFixedLogINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpFixedExpINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpPtrCastToCrossWorkgroupINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpCrossWorkgroupCastToPtrINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpReadPipeBlockingINTEL: *hasResult = true; *hasResultType = true; break;
|
case SpvOpReadPipeBlockingINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpWritePipeBlockingINTEL: *hasResult = true; *hasResultType = true; break;
|
case SpvOpWritePipeBlockingINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpFPGARegINTEL: *hasResult = true; *hasResultType = true; break;
|
case SpvOpFPGARegINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
|
@ -2184,6 +2486,10 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
|
||||||
case SpvOpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break;
|
case SpvOpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break;
|
case SpvOpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case SpvOpAtomicFAddEXT: *hasResult = true; *hasResultType = true; break;
|
case SpvOpAtomicFAddEXT: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case SpvOpTypeBufferSurfaceINTEL: *hasResult = true; *hasResultType = false; break;
|
||||||
|
case SpvOpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case SpvOpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case SpvOpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* SPV_ENABLE_UTILITY_CODE */
|
#endif /* SPV_ENABLE_UTILITY_CODE */
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
diff --git a/thirdparty/spirv-reflect/spirv_reflect.c b/thirdparty/spirv-reflect/spirv_reflect.c
|
diff --git a/thirdparty/spirv-reflect/spirv_reflect.c b/thirdparty/spirv-reflect/spirv_reflect.c
|
||||||
index 1c94a2e00e..2786a7f3ad 100644
|
index e9b11bf495..f181df5fa2 100644
|
||||||
--- a/thirdparty/spirv-reflect/spirv_reflect.c
|
--- a/thirdparty/spirv-reflect/spirv_reflect.c
|
||||||
+++ b/thirdparty/spirv-reflect/spirv_reflect.c
|
+++ b/thirdparty/spirv-reflect/spirv_reflect.c
|
||||||
@@ -124,6 +124,9 @@ typedef struct SpvReflectPrvDecorations {
|
@@ -125,6 +125,9 @@ typedef struct SpvReflectPrvDecorations {
|
||||||
SpvReflectPrvNumberDecoration location;
|
SpvReflectPrvNumberDecoration location;
|
||||||
SpvReflectPrvNumberDecoration offset;
|
SpvReflectPrvNumberDecoration offset;
|
||||||
SpvReflectPrvNumberDecoration uav_counter_buffer;
|
SpvReflectPrvNumberDecoration uav_counter_buffer;
|
||||||
|
|
@ -12,7 +12,7 @@ index 1c94a2e00e..2786a7f3ad 100644
|
||||||
SpvReflectPrvStringDecoration semantic;
|
SpvReflectPrvStringDecoration semantic;
|
||||||
uint32_t array_stride;
|
uint32_t array_stride;
|
||||||
uint32_t matrix_stride;
|
uint32_t matrix_stride;
|
||||||
@@ -629,6 +632,9 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
|
@@ -631,6 +634,9 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
|
||||||
p_parser->nodes[i].decorations.offset.value = (uint32_t)INVALID_VALUE;
|
p_parser->nodes[i].decorations.offset.value = (uint32_t)INVALID_VALUE;
|
||||||
p_parser->nodes[i].decorations.uav_counter_buffer.value = (uint32_t)INVALID_VALUE;
|
p_parser->nodes[i].decorations.uav_counter_buffer.value = (uint32_t)INVALID_VALUE;
|
||||||
p_parser->nodes[i].decorations.built_in = (SpvBuiltIn)INVALID_VALUE;
|
p_parser->nodes[i].decorations.built_in = (SpvBuiltIn)INVALID_VALUE;
|
||||||
|
|
@ -22,7 +22,7 @@ index 1c94a2e00e..2786a7f3ad 100644
|
||||||
}
|
}
|
||||||
// Mark source file id node
|
// Mark source file id node
|
||||||
p_parser->source_file_id = (uint32_t)INVALID_VALUE;
|
p_parser->source_file_id = (uint32_t)INVALID_VALUE;
|
||||||
@@ -819,10 +825,16 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
|
@@ -821,10 +827,16 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
|
||||||
CHECKED_READU32(p_parser, p_node->word_offset + 2, p_node->result_id);
|
CHECKED_READU32(p_parser, p_node->word_offset + 2, p_node->result_id);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -41,7 +41,7 @@ index 1c94a2e00e..2786a7f3ad 100644
|
||||||
case SpvOpSpecConstantComposite:
|
case SpvOpSpecConstantComposite:
|
||||||
case SpvOpSpecConstantOp: {
|
case SpvOpSpecConstantOp: {
|
||||||
CHECKED_READU32(p_parser, p_node->word_offset + 1, p_node->result_type_id);
|
CHECKED_READU32(p_parser, p_node->word_offset + 1, p_node->result_type_id);
|
||||||
@@ -854,7 +866,7 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
|
@@ -856,7 +868,7 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
|
||||||
CHECKED_READU32(p_parser, p_node->word_offset + 3, p_access_chain->base_id);
|
CHECKED_READU32(p_parser, p_node->word_offset + 3, p_access_chain->base_id);
|
||||||
//
|
//
|
||||||
// SPIRV_ACCESS_CHAIN_INDEX_OFFSET (4) is the number of words up until the first index:
|
// SPIRV_ACCESS_CHAIN_INDEX_OFFSET (4) is the number of words up until the first index:
|
||||||
|
|
@ -50,17 +50,17 @@ index 1c94a2e00e..2786a7f3ad 100644
|
||||||
//
|
//
|
||||||
p_access_chain->index_count = (node_word_count - SPIRV_ACCESS_CHAIN_INDEX_OFFSET);
|
p_access_chain->index_count = (node_word_count - SPIRV_ACCESS_CHAIN_INDEX_OFFSET);
|
||||||
if (p_access_chain->index_count > 0) {
|
if (p_access_chain->index_count > 0) {
|
||||||
@@ -1334,6 +1346,9 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser)
|
@@ -1338,6 +1350,9 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser)
|
||||||
skip = true;
|
skip = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
+// -- GODOT begin --
|
+// -- GODOT begin --
|
||||||
+ case SpvDecorationSpecId:
|
+ case SpvDecorationSpecId:
|
||||||
+// -- GODOT end --
|
+// -- GODOT end --
|
||||||
|
case SpvDecorationRelaxedPrecision:
|
||||||
case SpvDecorationBlock:
|
case SpvDecorationBlock:
|
||||||
case SpvDecorationBufferBlock:
|
case SpvDecorationBufferBlock:
|
||||||
case SpvDecorationColMajor:
|
@@ -1481,7 +1496,14 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser)
|
||||||
@@ -1466,7 +1481,14 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser)
|
|
||||||
p_target_decorations->input_attachment_index.word_offset = word_offset;
|
p_target_decorations->input_attachment_index.word_offset = word_offset;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -76,7 +76,7 @@ index 1c94a2e00e..2786a7f3ad 100644
|
||||||
case SpvReflectDecorationHlslCounterBufferGOOGLE: {
|
case SpvReflectDecorationHlslCounterBufferGOOGLE: {
|
||||||
uint32_t word_offset = p_node->word_offset + member_offset+ 3;
|
uint32_t word_offset = p_node->word_offset + member_offset+ 3;
|
||||||
CHECKED_READU32(p_parser, word_offset, p_target_decorations->uav_counter_buffer.value);
|
CHECKED_READU32(p_parser, word_offset, p_target_decorations->uav_counter_buffer.value);
|
||||||
@@ -1766,6 +1788,13 @@ static SpvReflectResult ParseType(
|
@@ -1789,6 +1811,13 @@ static SpvReflectResult ParseType(
|
||||||
p_type->type_flags |= SPV_REFLECT_TYPE_FLAG_EXTERNAL_ACCELERATION_STRUCTURE;
|
p_type->type_flags |= SPV_REFLECT_TYPE_FLAG_EXTERNAL_ACCELERATION_STRUCTURE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -90,7 +90,7 @@ index 1c94a2e00e..2786a7f3ad 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == SPV_REFLECT_RESULT_SUCCESS) {
|
if (result == SPV_REFLECT_RESULT_SUCCESS) {
|
||||||
@@ -3236,6 +3265,69 @@ static SpvReflectResult ParseExecutionModes(
|
@@ -3269,6 +3298,69 @@ static SpvReflectResult ParseExecutionModes(
|
||||||
return SPV_REFLECT_RESULT_SUCCESS;
|
return SPV_REFLECT_RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -160,7 +160,7 @@ index 1c94a2e00e..2786a7f3ad 100644
|
||||||
static SpvReflectResult ParsePushConstantBlocks(
|
static SpvReflectResult ParsePushConstantBlocks(
|
||||||
SpvReflectPrvParser* p_parser,
|
SpvReflectPrvParser* p_parser,
|
||||||
SpvReflectShaderModule* p_module)
|
SpvReflectShaderModule* p_module)
|
||||||
@@ -3613,6 +3705,12 @@ SpvReflectResult spvReflectCreateShaderModule(
|
@@ -3650,6 +3742,12 @@ static SpvReflectResult CreateShaderModule(
|
||||||
result = ParsePushConstantBlocks(&parser, p_module);
|
result = ParsePushConstantBlocks(&parser, p_module);
|
||||||
SPV_REFLECT_ASSERT(result == SPV_REFLECT_RESULT_SUCCESS);
|
SPV_REFLECT_ASSERT(result == SPV_REFLECT_RESULT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
@ -173,7 +173,7 @@ index 1c94a2e00e..2786a7f3ad 100644
|
||||||
if (result == SPV_REFLECT_RESULT_SUCCESS) {
|
if (result == SPV_REFLECT_RESULT_SUCCESS) {
|
||||||
result = ParseEntryPoints(&parser, p_module);
|
result = ParseEntryPoints(&parser, p_module);
|
||||||
SPV_REFLECT_ASSERT(result == SPV_REFLECT_RESULT_SUCCESS);
|
SPV_REFLECT_ASSERT(result == SPV_REFLECT_RESULT_SUCCESS);
|
||||||
@@ -3742,6 +3840,9 @@ void spvReflectDestroyShaderModule(SpvReflectShaderModule* p_module)
|
@@ -3807,6 +3905,9 @@ void spvReflectDestroyShaderModule(SpvReflectShaderModule* p_module)
|
||||||
SafeFree(p_entry->used_push_constants);
|
SafeFree(p_entry->used_push_constants);
|
||||||
}
|
}
|
||||||
SafeFree(p_module->entry_points);
|
SafeFree(p_module->entry_points);
|
||||||
|
|
@ -183,7 +183,7 @@ index 1c94a2e00e..2786a7f3ad 100644
|
||||||
|
|
||||||
// Push constants
|
// Push constants
|
||||||
for (size_t i = 0; i < p_module->push_constant_block_count; ++i) {
|
for (size_t i = 0; i < p_module->push_constant_block_count; ++i) {
|
||||||
@@ -4010,6 +4111,38 @@ SpvReflectResult spvReflectEnumerateEntryPointInterfaceVariables(
|
@@ -4077,6 +4178,38 @@ SpvReflectResult spvReflectEnumerateEntryPointInterfaceVariables(
|
||||||
return SPV_REFLECT_RESULT_SUCCESS;
|
return SPV_REFLECT_RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -223,10 +223,10 @@ index 1c94a2e00e..2786a7f3ad 100644
|
||||||
const SpvReflectShaderModule* p_module,
|
const SpvReflectShaderModule* p_module,
|
||||||
uint32_t* p_count,
|
uint32_t* p_count,
|
||||||
diff --git a/thirdparty/spirv-reflect/spirv_reflect.h b/thirdparty/spirv-reflect/spirv_reflect.h
|
diff --git a/thirdparty/spirv-reflect/spirv_reflect.h b/thirdparty/spirv-reflect/spirv_reflect.h
|
||||||
index da05400973..50cc65222b 100644
|
index e9e4c40755..948533d3c0 100644
|
||||||
--- a/thirdparty/spirv-reflect/spirv_reflect.h
|
--- a/thirdparty/spirv-reflect/spirv_reflect.h
|
||||||
+++ b/thirdparty/spirv-reflect/spirv_reflect.h
|
+++ b/thirdparty/spirv-reflect/spirv_reflect.h
|
||||||
@@ -292,6 +292,28 @@ typedef struct SpvReflectTypeDescription {
|
@@ -323,6 +323,28 @@ typedef struct SpvReflectTypeDescription {
|
||||||
struct SpvReflectTypeDescription* members;
|
struct SpvReflectTypeDescription* members;
|
||||||
} SpvReflectTypeDescription;
|
} SpvReflectTypeDescription;
|
||||||
|
|
||||||
|
|
@ -255,7 +255,7 @@ index da05400973..50cc65222b 100644
|
||||||
|
|
||||||
/*! @struct SpvReflectInterfaceVariable
|
/*! @struct SpvReflectInterfaceVariable
|
||||||
|
|
||||||
@@ -439,6 +461,10 @@ typedef struct SpvReflectShaderModule {
|
@@ -472,6 +494,10 @@ typedef struct SpvReflectShaderModule {
|
||||||
SpvReflectInterfaceVariable* interface_variables; // Uses value(s) from first entry point
|
SpvReflectInterfaceVariable* interface_variables; // Uses value(s) from first entry point
|
||||||
uint32_t push_constant_block_count; // Uses value(s) from first entry point
|
uint32_t push_constant_block_count; // Uses value(s) from first entry point
|
||||||
SpvReflectBlockVariable* push_constant_blocks; // Uses value(s) from first entry point
|
SpvReflectBlockVariable* push_constant_blocks; // Uses value(s) from first entry point
|
||||||
|
|
@ -265,8 +265,8 @@ index da05400973..50cc65222b 100644
|
||||||
+ // -- GODOT end --
|
+ // -- GODOT end --
|
||||||
|
|
||||||
struct Internal {
|
struct Internal {
|
||||||
size_t spirv_size;
|
SpvReflectModuleFlags module_flags;
|
||||||
@@ -694,6 +720,33 @@ SpvReflectResult spvReflectEnumerateInputVariables(
|
@@ -744,6 +770,33 @@ SpvReflectResult spvReflectEnumerateInputVariables(
|
||||||
SpvReflectInterfaceVariable** pp_variables
|
SpvReflectInterfaceVariable** pp_variables
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2017-2018 Google Inc.
|
Copyright 2017-2022 Google Inc.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
|
@ -110,6 +110,7 @@ typedef struct SpvReflectPrvStringDecoration {
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
typedef struct SpvReflectPrvDecorations {
|
typedef struct SpvReflectPrvDecorations {
|
||||||
|
bool is_relaxed_precision;
|
||||||
bool is_block;
|
bool is_block;
|
||||||
bool is_buffer_block;
|
bool is_buffer_block;
|
||||||
bool is_row_major;
|
bool is_row_major;
|
||||||
|
|
@ -238,12 +239,10 @@ static uint32_t RoundUp(
|
||||||
#define IsNotNull(ptr) \
|
#define IsNotNull(ptr) \
|
||||||
(ptr != NULL)
|
(ptr != NULL)
|
||||||
|
|
||||||
#define SafeFree(ptr) \
|
#define SafeFree(ptr) \
|
||||||
{ \
|
{ \
|
||||||
if (ptr != NULL) { \
|
free((void*)ptr); \
|
||||||
free((void*)ptr); \
|
ptr = NULL; \
|
||||||
ptr = NULL; \
|
|
||||||
} \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SortCompareUint32(
|
static int SortCompareUint32(
|
||||||
|
|
@ -462,6 +461,9 @@ static SpvReflectResult ReadStr(
|
||||||
static SpvReflectDecorationFlags ApplyDecorations(const SpvReflectPrvDecorations* p_decoration_fields)
|
static SpvReflectDecorationFlags ApplyDecorations(const SpvReflectPrvDecorations* p_decoration_fields)
|
||||||
{
|
{
|
||||||
SpvReflectDecorationFlags decorations = SPV_REFLECT_DECORATION_NONE;
|
SpvReflectDecorationFlags decorations = SPV_REFLECT_DECORATION_NONE;
|
||||||
|
if (p_decoration_fields->is_relaxed_precision) {
|
||||||
|
decorations |= SPV_REFLECT_DECORATION_RELAXED_PRECISION;
|
||||||
|
}
|
||||||
if (p_decoration_fields->is_block) {
|
if (p_decoration_fields->is_block) {
|
||||||
decorations |= SPV_REFLECT_DECORATION_BLOCK;
|
decorations |= SPV_REFLECT_DECORATION_BLOCK;
|
||||||
}
|
}
|
||||||
|
|
@ -1046,6 +1048,7 @@ static SpvReflectResult ParseFunction(
|
||||||
case SpvOpGenericPtrMemSemantics:
|
case SpvOpGenericPtrMemSemantics:
|
||||||
case SpvOpInBoundsPtrAccessChain:
|
case SpvOpInBoundsPtrAccessChain:
|
||||||
case SpvOpStore:
|
case SpvOpStore:
|
||||||
|
case SpvOpImageTexelPointer:
|
||||||
{
|
{
|
||||||
++(p_func->accessed_ptr_count);
|
++(p_func->accessed_ptr_count);
|
||||||
}
|
}
|
||||||
|
|
@ -1097,6 +1100,7 @@ static SpvReflectResult ParseFunction(
|
||||||
case SpvOpArrayLength:
|
case SpvOpArrayLength:
|
||||||
case SpvOpGenericPtrMemSemantics:
|
case SpvOpGenericPtrMemSemantics:
|
||||||
case SpvOpInBoundsPtrAccessChain:
|
case SpvOpInBoundsPtrAccessChain:
|
||||||
|
case SpvOpImageTexelPointer:
|
||||||
{
|
{
|
||||||
CHECKED_READU32(p_parser, p_node->word_offset + 3,
|
CHECKED_READU32(p_parser, p_node->word_offset + 3,
|
||||||
p_func->accessed_ptrs[p_func->accessed_ptr_count]);
|
p_func->accessed_ptrs[p_func->accessed_ptr_count]);
|
||||||
|
|
@ -1345,10 +1349,11 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser)
|
||||||
default: {
|
default: {
|
||||||
skip = true;
|
skip = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
// -- GODOT begin --
|
// -- GODOT begin --
|
||||||
case SpvDecorationSpecId:
|
case SpvDecorationSpecId:
|
||||||
// -- GODOT end --
|
// -- GODOT end --
|
||||||
|
case SpvDecorationRelaxedPrecision:
|
||||||
case SpvDecorationBlock:
|
case SpvDecorationBlock:
|
||||||
case SpvDecorationBufferBlock:
|
case SpvDecorationBufferBlock:
|
||||||
case SpvDecorationColMajor:
|
case SpvDecorationColMajor:
|
||||||
|
|
@ -1379,6 +1384,11 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser)
|
||||||
CHECKED_READU32(p_parser, p_node->word_offset + 1, target_id);
|
CHECKED_READU32(p_parser, p_node->word_offset + 1, target_id);
|
||||||
SpvReflectPrvNode* p_target_node = FindNode(p_parser, target_id);
|
SpvReflectPrvNode* p_target_node = FindNode(p_parser, target_id);
|
||||||
if (IsNull(p_target_node)) {
|
if (IsNull(p_target_node)) {
|
||||||
|
if ((p_node->op == (uint32_t)SpvOpDecorate) && (decoration == SpvDecorationRelaxedPrecision)) {
|
||||||
|
// Many OPs can be decorated that we don't care about. Ignore those.
|
||||||
|
// See https://github.com/KhronosGroup/SPIRV-Reflect/issues/134
|
||||||
|
continue;
|
||||||
|
}
|
||||||
return SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE;
|
return SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE;
|
||||||
}
|
}
|
||||||
// Get decorations
|
// Get decorations
|
||||||
|
|
@ -1393,6 +1403,11 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser)
|
||||||
switch (decoration) {
|
switch (decoration) {
|
||||||
default: break;
|
default: break;
|
||||||
|
|
||||||
|
case SpvDecorationRelaxedPrecision: {
|
||||||
|
p_target_decorations->is_relaxed_precision = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case SpvDecorationBlock: {
|
case SpvDecorationBlock: {
|
||||||
p_target_decorations->is_block = true;
|
p_target_decorations->is_block = true;
|
||||||
}
|
}
|
||||||
|
|
@ -1685,16 +1700,19 @@ static SpvReflectResult ParseType(
|
||||||
// Get length for current dimension
|
// Get length for current dimension
|
||||||
SpvReflectPrvNode* p_length_node = FindNode(p_parser, length_id);
|
SpvReflectPrvNode* p_length_node = FindNode(p_parser, length_id);
|
||||||
if (IsNotNull(p_length_node)) {
|
if (IsNotNull(p_length_node)) {
|
||||||
|
uint32_t dim_index = p_type->traits.array.dims_count;
|
||||||
if (p_length_node->op == SpvOpSpecConstant ||
|
if (p_length_node->op == SpvOpSpecConstant ||
|
||||||
p_length_node->op == SpvOpSpecConstantOp) {
|
p_length_node->op == SpvOpSpecConstantOp) {
|
||||||
p_type->traits.array.dims[p_type->traits.array.dims_count] = 0xFFFFFFFF;
|
p_type->traits.array.dims[dim_index] = 0xFFFFFFFF;
|
||||||
|
p_type->traits.array.spec_constant_op_ids[dim_index] = length_id;
|
||||||
p_type->traits.array.dims_count += 1;
|
p_type->traits.array.dims_count += 1;
|
||||||
} else {
|
} else {
|
||||||
uint32_t length = 0;
|
uint32_t length = 0;
|
||||||
IF_READU32(result, p_parser, p_length_node->word_offset + 3, length);
|
IF_READU32(result, p_parser, p_length_node->word_offset + 3, length);
|
||||||
if (result == SPV_REFLECT_RESULT_SUCCESS) {
|
if (result == SPV_REFLECT_RESULT_SUCCESS) {
|
||||||
// Write the array dim and increment the count and offset
|
// Write the array dim and increment the count and offset
|
||||||
p_type->traits.array.dims[p_type->traits.array.dims_count] = length;
|
p_type->traits.array.dims[dim_index] = length;
|
||||||
|
p_type->traits.array.spec_constant_op_ids[dim_index] = 0xFFFFFFFF;
|
||||||
p_type->traits.array.dims_count += 1;
|
p_type->traits.array.dims_count += 1;
|
||||||
} else {
|
} else {
|
||||||
result = SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE;
|
result = SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE;
|
||||||
|
|
@ -1719,6 +1737,11 @@ static SpvReflectResult ParseType(
|
||||||
p_type->type_flags |= SPV_REFLECT_TYPE_FLAG_ARRAY;
|
p_type->type_flags |= SPV_REFLECT_TYPE_FLAG_ARRAY;
|
||||||
uint32_t element_type_id = (uint32_t)INVALID_VALUE;
|
uint32_t element_type_id = (uint32_t)INVALID_VALUE;
|
||||||
IF_READU32(result, p_parser, p_node->word_offset + 2, element_type_id);
|
IF_READU32(result, p_parser, p_node->word_offset + 2, element_type_id);
|
||||||
|
p_type->traits.array.stride = p_node->decorations.array_stride;
|
||||||
|
uint32_t dim_index = p_type->traits.array.dims_count;
|
||||||
|
p_type->traits.array.dims[dim_index] = 0;
|
||||||
|
p_type->traits.array.spec_constant_op_ids[dim_index] = 0;
|
||||||
|
p_type->traits.array.dims_count += 1;
|
||||||
// Parse next dimension or element type
|
// Parse next dimension or element type
|
||||||
SpvReflectPrvNode* p_next_node = FindNode(p_parser, element_type_id);
|
SpvReflectPrvNode* p_next_node = FindNode(p_parser, element_type_id);
|
||||||
if (IsNotNull(p_next_node)) {
|
if (IsNotNull(p_next_node)) {
|
||||||
|
|
@ -2175,22 +2198,19 @@ static SpvReflectResult ParseDescriptorBlockVariable(
|
||||||
return SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE;
|
return SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE;
|
||||||
}
|
}
|
||||||
// Resolve to element type if current type is array or run time array
|
// Resolve to element type if current type is array or run time array
|
||||||
if (p_type_node->op == SpvOpTypeArray) {
|
while (p_type_node->op == SpvOpTypeArray || p_type_node->op == SpvOpTypeRuntimeArray) {
|
||||||
while (p_type_node->op == SpvOpTypeArray) {
|
if (p_type_node->op == SpvOpTypeArray) {
|
||||||
p_type_node = FindNode(p_parser, p_type_node->array_traits.element_type_id);
|
p_type_node = FindNode(p_parser, p_type_node->array_traits.element_type_id);
|
||||||
if (IsNull(p_type_node)) {
|
}
|
||||||
|
else {
|
||||||
|
// Element type description
|
||||||
|
SpvReflectTypeDescription* p_type_temp = FindType(p_module, p_type_node->array_traits.element_type_id);
|
||||||
|
if (IsNull(p_type_temp)) {
|
||||||
return SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE;
|
return SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE;
|
||||||
}
|
}
|
||||||
|
// Element type node
|
||||||
|
p_type_node = FindNode(p_parser, p_type_temp->id);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if(p_type_node->op == SpvOpTypeRuntimeArray) {
|
|
||||||
// Element type description
|
|
||||||
p_type = FindType(p_module, p_type_node->array_traits.element_type_id);
|
|
||||||
if (IsNull(p_type)) {
|
|
||||||
return SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE;
|
|
||||||
}
|
|
||||||
// Element type node
|
|
||||||
p_type_node = FindNode(p_parser, p_type->id);
|
|
||||||
if (IsNull(p_type_node)) {
|
if (IsNull(p_type_node)) {
|
||||||
return SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE;
|
return SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE;
|
||||||
}
|
}
|
||||||
|
|
@ -2662,6 +2682,7 @@ static SpvReflectResult ParseFormat(
|
||||||
|
|
||||||
static SpvReflectResult ParseInterfaceVariable(
|
static SpvReflectResult ParseInterfaceVariable(
|
||||||
SpvReflectPrvParser* p_parser,
|
SpvReflectPrvParser* p_parser,
|
||||||
|
const SpvReflectPrvDecorations* p_var_node_decorations,
|
||||||
const SpvReflectPrvDecorations* p_type_node_decorations,
|
const SpvReflectPrvDecorations* p_type_node_decorations,
|
||||||
SpvReflectShaderModule* p_module,
|
SpvReflectShaderModule* p_module,
|
||||||
SpvReflectTypeDescription* p_type,
|
SpvReflectTypeDescription* p_type,
|
||||||
|
|
@ -2685,7 +2706,7 @@ static SpvReflectResult ParseInterfaceVariable(
|
||||||
SpvReflectPrvDecorations* p_member_decorations = &p_type_node->member_decorations[member_index];
|
SpvReflectPrvDecorations* p_member_decorations = &p_type_node->member_decorations[member_index];
|
||||||
SpvReflectTypeDescription* p_member_type = &p_type->members[member_index];
|
SpvReflectTypeDescription* p_member_type = &p_type->members[member_index];
|
||||||
SpvReflectInterfaceVariable* p_member_var = &p_var->members[member_index];
|
SpvReflectInterfaceVariable* p_member_var = &p_var->members[member_index];
|
||||||
SpvReflectResult result = ParseInterfaceVariable(p_parser, p_member_decorations, p_module, p_member_type, p_member_var, p_has_built_in);
|
SpvReflectResult result = ParseInterfaceVariable(p_parser, NULL, p_member_decorations, p_module, p_member_type, p_member_var, p_has_built_in);
|
||||||
if (result != SPV_REFLECT_RESULT_SUCCESS) {
|
if (result != SPV_REFLECT_RESULT_SUCCESS) {
|
||||||
SPV_REFLECT_ASSERT(false);
|
SPV_REFLECT_ASSERT(false);
|
||||||
return result;
|
return result;
|
||||||
|
|
@ -2695,6 +2716,9 @@ static SpvReflectResult ParseInterfaceVariable(
|
||||||
|
|
||||||
p_var->name = p_type_node->name;
|
p_var->name = p_type_node->name;
|
||||||
p_var->decoration_flags = ApplyDecorations(p_type_node_decorations);
|
p_var->decoration_flags = ApplyDecorations(p_type_node_decorations);
|
||||||
|
if (p_var_node_decorations != NULL) {
|
||||||
|
p_var->decoration_flags |= ApplyDecorations(p_var_node_decorations);
|
||||||
|
}
|
||||||
p_var->built_in = p_type_node_decorations->built_in;
|
p_var->built_in = p_type_node_decorations->built_in;
|
||||||
ApplyNumericTraits(p_type, &p_var->numeric);
|
ApplyNumericTraits(p_type, &p_var->numeric);
|
||||||
if (p_type->op == SpvOpTypeArray) {
|
if (p_type->op == SpvOpTypeArray) {
|
||||||
|
|
@ -2730,21 +2754,21 @@ static SpvReflectResult ParseInterfaceVariables(
|
||||||
}
|
}
|
||||||
|
|
||||||
p_entry->interface_variable_count = interface_variable_count;
|
p_entry->interface_variable_count = interface_variable_count;
|
||||||
p_entry->input_variable_count = 0;
|
p_entry->input_variable_count = 0;
|
||||||
p_entry->output_variable_count = 0;
|
p_entry->output_variable_count = 0;
|
||||||
for (size_t i = 0; i < interface_variable_count; ++i) {
|
for (size_t i = 0; i < interface_variable_count; ++i) {
|
||||||
uint32_t var_result_id = *(p_interface_variable_ids + i);
|
uint32_t var_result_id = *(p_interface_variable_ids + i);
|
||||||
SpvReflectPrvNode* p_node = FindNode(p_parser, var_result_id);
|
SpvReflectPrvNode* p_node = FindNode(p_parser, var_result_id);
|
||||||
if (IsNull(p_node)) {
|
if (IsNull(p_node)) {
|
||||||
return SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE;
|
return SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_node->storage_class == SpvStorageClassInput) {
|
if (p_node->storage_class == SpvStorageClassInput) {
|
||||||
p_entry->input_variable_count += 1;
|
p_entry->input_variable_count += 1;
|
||||||
}
|
}
|
||||||
else if (p_node->storage_class == SpvStorageClassOutput) {
|
else if (p_node->storage_class == SpvStorageClassOutput) {
|
||||||
p_entry->output_variable_count += 1;
|
p_entry->output_variable_count += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_entry->input_variable_count > 0) {
|
if (p_entry->input_variable_count > 0) {
|
||||||
|
|
@ -2806,6 +2830,7 @@ static SpvReflectResult ParseInterfaceVariables(
|
||||||
bool has_built_in = p_node->decorations.is_built_in;
|
bool has_built_in = p_node->decorations.is_built_in;
|
||||||
SpvReflectResult result = ParseInterfaceVariable(
|
SpvReflectResult result = ParseInterfaceVariable(
|
||||||
p_parser,
|
p_parser,
|
||||||
|
&p_node->decorations,
|
||||||
&p_type_node->decorations,
|
&p_type_node->decorations,
|
||||||
p_module,
|
p_module,
|
||||||
p_type,
|
p_type,
|
||||||
|
|
@ -3208,7 +3233,11 @@ static SpvReflectResult ParseExecutionModes(
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SpvExecutionModeInvocations:
|
case SpvExecutionModeInvocations: {
|
||||||
|
CHECKED_READU32(p_parser, p_node->word_offset + 3, p_entry_point->invocations);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case SpvExecutionModeSpacingEqual:
|
case SpvExecutionModeSpacingEqual:
|
||||||
case SpvExecutionModeSpacingFractionalEven:
|
case SpvExecutionModeSpacingFractionalEven:
|
||||||
case SpvExecutionModeSpacingFractionalOdd:
|
case SpvExecutionModeSpacingFractionalOdd:
|
||||||
|
|
@ -3231,7 +3260,7 @@ static SpvReflectResult ParseExecutionModes(
|
||||||
CHECKED_READU32(p_parser, p_node->word_offset + 4, p_entry_point->local_size.y);
|
CHECKED_READU32(p_parser, p_node->word_offset + 4, p_entry_point->local_size.y);
|
||||||
CHECKED_READU32(p_parser, p_node->word_offset + 5, p_entry_point->local_size.z);
|
CHECKED_READU32(p_parser, p_node->word_offset + 5, p_entry_point->local_size.z);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SpvExecutionModeLocalSizeHint:
|
case SpvExecutionModeLocalSizeHint:
|
||||||
case SpvExecutionModeInputPoints:
|
case SpvExecutionModeInputPoints:
|
||||||
|
|
@ -3241,7 +3270,11 @@ static SpvReflectResult ParseExecutionModes(
|
||||||
case SpvExecutionModeInputTrianglesAdjacency:
|
case SpvExecutionModeInputTrianglesAdjacency:
|
||||||
case SpvExecutionModeQuads:
|
case SpvExecutionModeQuads:
|
||||||
case SpvExecutionModeIsolines:
|
case SpvExecutionModeIsolines:
|
||||||
case SpvExecutionModeOutputVertices:
|
case SpvExecutionModeOutputVertices: {
|
||||||
|
CHECKED_READU32(p_parser, p_node->word_offset + 3, p_entry_point->output_vertices);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case SpvExecutionModeOutputPoints:
|
case SpvExecutionModeOutputPoints:
|
||||||
case SpvExecutionModeOutputLineStrip:
|
case SpvExecutionModeOutputLineStrip:
|
||||||
case SpvExecutionModeOutputTriangleStrip:
|
case SpvExecutionModeOutputTriangleStrip:
|
||||||
|
|
@ -3591,16 +3624,8 @@ static SpvReflectResult SynchronizeDescriptorSets(SpvReflectShaderModule* p_modu
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
SpvReflectResult spvReflectGetShaderModule(
|
static SpvReflectResult CreateShaderModule(
|
||||||
size_t size,
|
uint32_t flags,
|
||||||
const void* p_code,
|
|
||||||
SpvReflectShaderModule* p_module
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return spvReflectCreateShaderModule(size, p_code, p_module);
|
|
||||||
}
|
|
||||||
|
|
||||||
SpvReflectResult spvReflectCreateShaderModule(
|
|
||||||
size_t size,
|
size_t size,
|
||||||
const void* p_code,
|
const void* p_code,
|
||||||
SpvReflectShaderModule* p_module
|
SpvReflectShaderModule* p_module
|
||||||
|
|
@ -3618,15 +3643,27 @@ SpvReflectResult spvReflectCreateShaderModule(
|
||||||
if (IsNull(p_module->_internal)) {
|
if (IsNull(p_module->_internal)) {
|
||||||
return SPV_REFLECT_RESULT_ERROR_ALLOC_FAILED;
|
return SPV_REFLECT_RESULT_ERROR_ALLOC_FAILED;
|
||||||
}
|
}
|
||||||
// Allocate SPIR-V code storage
|
// Copy flags
|
||||||
p_module->_internal->spirv_size = size;
|
p_module->_internal->module_flags = flags;
|
||||||
p_module->_internal->spirv_code = (uint32_t*)calloc(1, p_module->_internal->spirv_size);
|
// Figure out if we need to copy the SPIR-V code or not
|
||||||
p_module->_internal->spirv_word_count = (uint32_t)(size / SPIRV_WORD_SIZE);
|
if (flags & SPV_REFLECT_MODULE_FLAG_NO_COPY) {
|
||||||
if (IsNull(p_module->_internal->spirv_code)) {
|
// Set internal size and pointer to args passed in
|
||||||
SafeFree(p_module->_internal);
|
p_module->_internal->spirv_size = size;
|
||||||
return SPV_REFLECT_RESULT_ERROR_ALLOC_FAILED;
|
p_module->_internal->spirv_code = (void*)p_code; // cast that const away
|
||||||
|
p_module->_internal->spirv_word_count = (uint32_t)(size / SPIRV_WORD_SIZE);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Allocate SPIR-V code storage
|
||||||
|
p_module->_internal->spirv_size = size;
|
||||||
|
p_module->_internal->spirv_code = (uint32_t*)calloc(1, p_module->_internal->spirv_size);
|
||||||
|
p_module->_internal->spirv_word_count = (uint32_t)(size / SPIRV_WORD_SIZE);
|
||||||
|
if (IsNull(p_module->_internal->spirv_code)) {
|
||||||
|
SafeFree(p_module->_internal);
|
||||||
|
return SPV_REFLECT_RESULT_ERROR_ALLOC_FAILED;
|
||||||
|
}
|
||||||
|
// Copy SPIR-V to code storage
|
||||||
|
memcpy(p_module->_internal->spirv_code, p_code, size);
|
||||||
}
|
}
|
||||||
memcpy(p_module->_internal->spirv_code, p_code, size);
|
|
||||||
|
|
||||||
SpvReflectPrvParser parser = { 0 };
|
SpvReflectPrvParser parser = { 0 };
|
||||||
SpvReflectResult result = CreateParser(p_module->_internal->spirv_size,
|
SpvReflectResult result = CreateParser(p_module->_internal->spirv_size,
|
||||||
|
|
@ -3751,6 +3788,34 @@ SpvReflectResult spvReflectCreateShaderModule(
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SpvReflectResult spvReflectCreateShaderModule(
|
||||||
|
size_t size,
|
||||||
|
const void* p_code,
|
||||||
|
SpvReflectShaderModule* p_module
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return CreateShaderModule(0, size, p_code, p_module);
|
||||||
|
}
|
||||||
|
|
||||||
|
SpvReflectResult spvReflectCreateShaderModule2(
|
||||||
|
uint32_t flags,
|
||||||
|
size_t size,
|
||||||
|
const void* p_code,
|
||||||
|
SpvReflectShaderModule* p_module
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return CreateShaderModule(flags, size, p_code, p_module);
|
||||||
|
}
|
||||||
|
|
||||||
|
SpvReflectResult spvReflectGetShaderModule(
|
||||||
|
size_t size,
|
||||||
|
const void* p_code,
|
||||||
|
SpvReflectShaderModule* p_module
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return spvReflectCreateShaderModule(size, p_code, p_module);
|
||||||
|
}
|
||||||
|
|
||||||
static void SafeFreeTypes(SpvReflectTypeDescription* p_type)
|
static void SafeFreeTypes(SpvReflectTypeDescription* p_type)
|
||||||
{
|
{
|
||||||
if (IsNull(p_type)) {
|
if (IsNull(p_type)) {
|
||||||
|
|
@ -3860,8 +3925,10 @@ void spvReflectDestroyShaderModule(SpvReflectShaderModule* p_module)
|
||||||
}
|
}
|
||||||
SafeFree(p_module->_internal->type_descriptions);
|
SafeFree(p_module->_internal->type_descriptions);
|
||||||
|
|
||||||
// Free SPIR-V code
|
// Free SPIR-V code if there was a copy
|
||||||
SafeFree(p_module->_internal->spirv_code);
|
if ((p_module->_internal->module_flags & SPV_REFLECT_MODULE_FLAG_NO_COPY) == 0) {
|
||||||
|
SafeFree(p_module->_internal->spirv_code);
|
||||||
|
}
|
||||||
// Free internal
|
// Free internal
|
||||||
SafeFree(p_module->_internal);
|
SafeFree(p_module->_internal);
|
||||||
}
|
}
|
||||||
|
|
@ -5019,15 +5086,25 @@ SpvReflectResult spvReflectChangeOutputVariableLocation(
|
||||||
const char* spvReflectSourceLanguage(SpvSourceLanguage source_lang)
|
const char* spvReflectSourceLanguage(SpvSourceLanguage source_lang)
|
||||||
{
|
{
|
||||||
switch (source_lang) {
|
switch (source_lang) {
|
||||||
case SpvSourceLanguageUnknown : return "Unknown";
|
case SpvSourceLanguageUnknown : return "Unknown";
|
||||||
case SpvSourceLanguageESSL : return "ESSL";
|
case SpvSourceLanguageESSL : return "ESSL";
|
||||||
case SpvSourceLanguageGLSL : return "GLSL";
|
case SpvSourceLanguageGLSL : return "GLSL";
|
||||||
case SpvSourceLanguageOpenCL_C : return "OpenCL_C";
|
case SpvSourceLanguageOpenCL_C : return "OpenCL_C";
|
||||||
case SpvSourceLanguageOpenCL_CPP : return "OpenCL_CPP";
|
case SpvSourceLanguageOpenCL_CPP : return "OpenCL_CPP";
|
||||||
case SpvSourceLanguageHLSL : return "HLSL";
|
case SpvSourceLanguageHLSL : return "HLSL";
|
||||||
|
case SpvSourceLanguageCPP_for_OpenCL : return "CPP_for_OpenCL";
|
||||||
case SpvSourceLanguageMax:
|
case SpvSourceLanguageMax:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* spvReflectBlockVariableTypeName(
|
||||||
|
const SpvReflectBlockVariable* p_var
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (p_var == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return p_var->type_description->type_name;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2017-2018 Google Inc.
|
Copyright 2017-2022 Google Inc.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
|
@ -76,6 +76,25 @@ typedef enum SpvReflectResult {
|
||||||
SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_EXECUTION_MODE,
|
SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_EXECUTION_MODE,
|
||||||
} SpvReflectResult;
|
} SpvReflectResult;
|
||||||
|
|
||||||
|
/*! @enum SpvReflectModuleFlagBits
|
||||||
|
|
||||||
|
SPV_REFLECT_MODULE_FLAG_NO_COPY - Disables copying of SPIR-V code
|
||||||
|
when a SPIRV-Reflect shader module is created. It is the
|
||||||
|
responsibility of the calling program to ensure that the pointer
|
||||||
|
remains valid and the memory it's pointing to is not freed while
|
||||||
|
SPIRV-Reflect operations are taking place. Freeing the backing
|
||||||
|
memory will cause undefined behavior or most likely a crash.
|
||||||
|
This is flag is intended for cases where the memory overhead of
|
||||||
|
storing the copied SPIR-V is undesirable.
|
||||||
|
|
||||||
|
*/
|
||||||
|
typedef enum SpvReflectModuleFlagBits {
|
||||||
|
SPV_REFLECT_MODULE_FLAG_NONE = 0x00000000,
|
||||||
|
SPV_REFLECT_MODULE_FLAG_NO_COPY = 0x00000001,
|
||||||
|
} SpvReflectModuleFlagBits;
|
||||||
|
|
||||||
|
typedef uint32_t SpvReflectModuleFlags;
|
||||||
|
|
||||||
/*! @enum SpvReflectTypeFlagBits
|
/*! @enum SpvReflectTypeFlagBits
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
@ -101,6 +120,13 @@ typedef uint32_t SpvReflectTypeFlags;
|
||||||
|
|
||||||
/*! @enum SpvReflectDecorationBits
|
/*! @enum SpvReflectDecorationBits
|
||||||
|
|
||||||
|
NOTE: HLSL row_major and column_major decorations are reversed
|
||||||
|
in SPIR-V. Meaning that matrices declrations with row_major
|
||||||
|
will get reflected as column_major and vice versa. The
|
||||||
|
row and column decorations get appied during the compilation.
|
||||||
|
SPIRV-Reflect reads the data as is and does not make any
|
||||||
|
attempt to correct it to match what's in the source.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
typedef enum SpvReflectDecorationFlagBits {
|
typedef enum SpvReflectDecorationFlagBits {
|
||||||
SPV_REFLECT_DECORATION_NONE = 0x00000000,
|
SPV_REFLECT_DECORATION_NONE = 0x00000000,
|
||||||
|
|
@ -112,6 +138,7 @@ typedef enum SpvReflectDecorationFlagBits {
|
||||||
SPV_REFLECT_DECORATION_NOPERSPECTIVE = 0x00000020,
|
SPV_REFLECT_DECORATION_NOPERSPECTIVE = 0x00000020,
|
||||||
SPV_REFLECT_DECORATION_FLAT = 0x00000040,
|
SPV_REFLECT_DECORATION_FLAT = 0x00000040,
|
||||||
SPV_REFLECT_DECORATION_NON_WRITABLE = 0x00000080,
|
SPV_REFLECT_DECORATION_NON_WRITABLE = 0x00000080,
|
||||||
|
SPV_REFLECT_DECORATION_RELAXED_PRECISION = 0x00000100,
|
||||||
} SpvReflectDecorationFlagBits;
|
} SpvReflectDecorationFlagBits;
|
||||||
|
|
||||||
typedef uint32_t SpvReflectDecorationFlags;
|
typedef uint32_t SpvReflectDecorationFlags;
|
||||||
|
|
@ -198,12 +225,12 @@ typedef enum SpvReflectShaderStageFlagBits {
|
||||||
SPV_REFLECT_SHADER_STAGE_COMPUTE_BIT = 0x00000020, // = VK_SHADER_STAGE_COMPUTE_BIT
|
SPV_REFLECT_SHADER_STAGE_COMPUTE_BIT = 0x00000020, // = VK_SHADER_STAGE_COMPUTE_BIT
|
||||||
SPV_REFLECT_SHADER_STAGE_TASK_BIT_NV = 0x00000040, // = VK_SHADER_STAGE_TASK_BIT_NV
|
SPV_REFLECT_SHADER_STAGE_TASK_BIT_NV = 0x00000040, // = VK_SHADER_STAGE_TASK_BIT_NV
|
||||||
SPV_REFLECT_SHADER_STAGE_MESH_BIT_NV = 0x00000080, // = VK_SHADER_STAGE_MESH_BIT_NV
|
SPV_REFLECT_SHADER_STAGE_MESH_BIT_NV = 0x00000080, // = VK_SHADER_STAGE_MESH_BIT_NV
|
||||||
SPV_REFLECT_SHADER_STAGE_RAYGEN_BIT_KHR = 0x00000100, // VK_SHADER_STAGE_RAYGEN_BIT_KHR
|
SPV_REFLECT_SHADER_STAGE_RAYGEN_BIT_KHR = 0x00000100, // = VK_SHADER_STAGE_RAYGEN_BIT_KHR
|
||||||
SPV_REFLECT_SHADER_STAGE_ANY_HIT_BIT_KHR = 0x00000200, // VK_SHADER_STAGE_ANY_HIT_BIT_KHR
|
SPV_REFLECT_SHADER_STAGE_ANY_HIT_BIT_KHR = 0x00000200, // = VK_SHADER_STAGE_ANY_HIT_BIT_KHR
|
||||||
SPV_REFLECT_SHADER_STAGE_CLOSEST_HIT_BIT_KHR = 0x00000400, // VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR
|
SPV_REFLECT_SHADER_STAGE_CLOSEST_HIT_BIT_KHR = 0x00000400, // = VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR
|
||||||
SPV_REFLECT_SHADER_STAGE_MISS_BIT_KHR = 0x00000800, // VK_SHADER_STAGE_MISS_BIT_KHR
|
SPV_REFLECT_SHADER_STAGE_MISS_BIT_KHR = 0x00000800, // = VK_SHADER_STAGE_MISS_BIT_KHR
|
||||||
SPV_REFLECT_SHADER_STAGE_INTERSECTION_BIT_KHR = 0x00001000, // VK_SHADER_STAGE_INTERSECTION_BIT_KHR
|
SPV_REFLECT_SHADER_STAGE_INTERSECTION_BIT_KHR = 0x00001000, // = VK_SHADER_STAGE_INTERSECTION_BIT_KHR
|
||||||
SPV_REFLECT_SHADER_STAGE_CALLABLE_BIT_KHR = 0x00002000, // VK_SHADER_STAGE_CALLABLE_BIT_KHR
|
SPV_REFLECT_SHADER_STAGE_CALLABLE_BIT_KHR = 0x00002000, // = VK_SHADER_STAGE_CALLABLE_BIT_KHR
|
||||||
|
|
||||||
} SpvReflectShaderStageFlagBits;
|
} SpvReflectShaderStageFlagBits;
|
||||||
|
|
||||||
|
|
@ -261,7 +288,11 @@ typedef struct SpvReflectImageTraits {
|
||||||
|
|
||||||
typedef struct SpvReflectArrayTraits {
|
typedef struct SpvReflectArrayTraits {
|
||||||
uint32_t dims_count;
|
uint32_t dims_count;
|
||||||
|
// Each entry is: 0xFFFFFFFF for a specialization constant dimension,
|
||||||
|
// 0 for a runtime array dimension, and the array length otherwise.
|
||||||
uint32_t dims[SPV_REFLECT_MAX_ARRAY_DIMS];
|
uint32_t dims[SPV_REFLECT_MAX_ARRAY_DIMS];
|
||||||
|
// Stores Ids for dimensions that are specialization constants
|
||||||
|
uint32_t spec_constant_op_ids[SPV_REFLECT_MAX_ARRAY_DIMS];
|
||||||
uint32_t stride; // Measured in bytes
|
uint32_t stride; // Measured in bytes
|
||||||
} SpvReflectArrayTraits;
|
} SpvReflectArrayTraits;
|
||||||
|
|
||||||
|
|
@ -432,6 +463,8 @@ typedef struct SpvReflectEntryPoint {
|
||||||
uint32_t y;
|
uint32_t y;
|
||||||
uint32_t z;
|
uint32_t z;
|
||||||
} local_size;
|
} local_size;
|
||||||
|
uint32_t invocations; // valid for geometry
|
||||||
|
uint32_t output_vertices; // valid for geometry, tesselation
|
||||||
} SpvReflectEntryPoint;
|
} SpvReflectEntryPoint;
|
||||||
|
|
||||||
/*! @struct SpvReflectShaderModule
|
/*! @struct SpvReflectShaderModule
|
||||||
|
|
@ -467,6 +500,7 @@ typedef struct SpvReflectShaderModule {
|
||||||
// -- GODOT end --
|
// -- GODOT end --
|
||||||
|
|
||||||
struct Internal {
|
struct Internal {
|
||||||
|
SpvReflectModuleFlags module_flags;
|
||||||
size_t spirv_size;
|
size_t spirv_size;
|
||||||
uint32_t* spirv_code;
|
uint32_t* spirv_code;
|
||||||
uint32_t spirv_word_count;
|
uint32_t spirv_word_count;
|
||||||
|
|
@ -495,6 +529,22 @@ SpvReflectResult spvReflectCreateShaderModule(
|
||||||
SpvReflectShaderModule* p_module
|
SpvReflectShaderModule* p_module
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*! @fn spvReflectCreateShaderModule2
|
||||||
|
|
||||||
|
@param flags Flags for module creations.
|
||||||
|
@param size Size in bytes of SPIR-V code.
|
||||||
|
@param p_code Pointer to SPIR-V code.
|
||||||
|
@param p_module Pointer to an instance of SpvReflectShaderModule.
|
||||||
|
@return SPV_REFLECT_RESULT_SUCCESS on success.
|
||||||
|
|
||||||
|
*/
|
||||||
|
SpvReflectResult spvReflectCreateShaderModule2(
|
||||||
|
SpvReflectModuleFlags flags,
|
||||||
|
size_t size,
|
||||||
|
const void* p_code,
|
||||||
|
SpvReflectShaderModule* p_module
|
||||||
|
);
|
||||||
|
|
||||||
SPV_REFLECT_DEPRECATED("renamed to spvReflectCreateShaderModule")
|
SPV_REFLECT_DEPRECATED("renamed to spvReflectCreateShaderModule")
|
||||||
SpvReflectResult spvReflectGetShaderModule(
|
SpvReflectResult spvReflectGetShaderModule(
|
||||||
size_t size,
|
size_t size,
|
||||||
|
|
@ -1382,7 +1432,7 @@ SpvReflectResult spvReflectChangeInputVariableLocation(
|
||||||
by multiple entry points in the module, it will be changed in all of
|
by multiple entry points in the module, it will be changed in all of
|
||||||
them.
|
them.
|
||||||
@param p_module Pointer to an instance of SpvReflectShaderModule.
|
@param p_module Pointer to an instance of SpvReflectShaderModule.
|
||||||
@param p_output_variable Pointer to the output variable to update.
|
@param p_output_variable Pointer to the output variable to update.
|
||||||
@param new_location The new location to assign to p_output_variable.
|
@param new_location The new location to assign to p_output_variable.
|
||||||
@return If successful, returns SPV_REFLECT_RESULT_SUCCESS.
|
@return If successful, returns SPV_REFLECT_RESULT_SUCCESS.
|
||||||
Otherwise, the error code indicates the cause of
|
Otherwise, the error code indicates the cause of
|
||||||
|
|
@ -1404,6 +1454,16 @@ SpvReflectResult spvReflectChangeOutputVariableLocation(
|
||||||
*/
|
*/
|
||||||
const char* spvReflectSourceLanguage(SpvSourceLanguage source_lang);
|
const char* spvReflectSourceLanguage(SpvSourceLanguage source_lang);
|
||||||
|
|
||||||
|
/*! @fn spvReflectBlockVariableTypeName
|
||||||
|
|
||||||
|
@param p_var Pointer to block variable.
|
||||||
|
@return Returns string of block variable's type description type name
|
||||||
|
or NULL if p_var is NULL.
|
||||||
|
*/
|
||||||
|
const char* spvReflectBlockVariableTypeName(
|
||||||
|
const SpvReflectBlockVariable* p_var
|
||||||
|
);
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1421,9 +1481,9 @@ namespace spv_reflect {
|
||||||
class ShaderModule {
|
class ShaderModule {
|
||||||
public:
|
public:
|
||||||
ShaderModule();
|
ShaderModule();
|
||||||
ShaderModule(size_t size, const void* p_code);
|
ShaderModule(size_t size, const void* p_code, SpvReflectModuleFlags flags = SPV_REFLECT_MODULE_FLAG_NONE);
|
||||||
ShaderModule(const std::vector<uint8_t>& code);
|
ShaderModule(const std::vector<uint8_t>& code, SpvReflectModuleFlags flags = SPV_REFLECT_MODULE_FLAG_NONE);
|
||||||
ShaderModule(const std::vector<uint32_t>& code);
|
ShaderModule(const std::vector<uint32_t>& code, SpvReflectModuleFlags flags = SPV_REFLECT_MODULE_FLAG_NONE);
|
||||||
~ShaderModule();
|
~ShaderModule();
|
||||||
|
|
||||||
ShaderModule(ShaderModule&& other);
|
ShaderModule(ShaderModule&& other);
|
||||||
|
|
@ -1533,8 +1593,9 @@ inline ShaderModule::ShaderModule() {}
|
||||||
@param p_code
|
@param p_code
|
||||||
|
|
||||||
*/
|
*/
|
||||||
inline ShaderModule::ShaderModule(size_t size, const void* p_code) {
|
inline ShaderModule::ShaderModule(size_t size, const void* p_code, SpvReflectModuleFlags flags) {
|
||||||
m_result = spvReflectCreateShaderModule(
|
m_result = spvReflectCreateShaderModule2(
|
||||||
|
flags,
|
||||||
size,
|
size,
|
||||||
p_code,
|
p_code,
|
||||||
&m_module);
|
&m_module);
|
||||||
|
|
@ -1545,8 +1606,9 @@ inline ShaderModule::ShaderModule(size_t size, const void* p_code) {
|
||||||
@param code
|
@param code
|
||||||
|
|
||||||
*/
|
*/
|
||||||
inline ShaderModule::ShaderModule(const std::vector<uint8_t>& code) {
|
inline ShaderModule::ShaderModule(const std::vector<uint8_t>& code, SpvReflectModuleFlags flags) {
|
||||||
m_result = spvReflectCreateShaderModule(
|
m_result = spvReflectCreateShaderModule2(
|
||||||
|
flags,
|
||||||
code.size(),
|
code.size(),
|
||||||
code.data(),
|
code.data(),
|
||||||
&m_module);
|
&m_module);
|
||||||
|
|
@ -1557,8 +1619,9 @@ inline ShaderModule::ShaderModule(const std::vector<uint8_t>& code) {
|
||||||
@param code
|
@param code
|
||||||
|
|
||||||
*/
|
*/
|
||||||
inline ShaderModule::ShaderModule(const std::vector<uint32_t>& code) {
|
inline ShaderModule::ShaderModule(const std::vector<uint32_t>& code, SpvReflectModuleFlags flags) {
|
||||||
m_result = spvReflectCreateShaderModule(
|
m_result = spvReflectCreateShaderModule2(
|
||||||
|
flags,
|
||||||
code.size() * sizeof(uint32_t),
|
code.size() * sizeof(uint32_t),
|
||||||
code.data(),
|
code.data(),
|
||||||
&m_module);
|
&m_module);
|
||||||
|
|
|
||||||
|
|
@ -1,299 +1,308 @@
|
||||||
|
#ifndef VULKAN_VIDEO_CODEC_H264STD_H_
|
||||||
|
#define VULKAN_VIDEO_CODEC_H264STD_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright (c) 2019-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef VULKAN_VIDEO_CODEC_H264STD_H_
|
/*
|
||||||
#define VULKAN_VIDEO_CODEC_H264STD_H_ 1
|
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "vk_video/vulkan_video_codecs_common.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
#define vulkan_video_codec_h264std 1
|
||||||
|
#include <stdint.h>
|
||||||
// Vulkan 0.9 provisional Vulkan video H.264 encode and decode std specification version number
|
// Vulkan 0.9 provisional Vulkan video H.264 encode and decode std specification version number
|
||||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_API_VERSION_0_9 VK_MAKE_VIDEO_STD_VERSION(0, 9, 0) // Patch version should always be set to 0
|
#define VK_STD_VULKAN_VIDEO_CODEC_H264_API_VERSION_0_9_5 VK_MAKE_VIDEO_STD_VERSION(0, 9, 5) // Patch version should always be set to 0
|
||||||
|
|
||||||
// Format must be in the form XX.XX where the first two digits are the major and the second two, the minor.
|
#define STD_VIDEO_H264_CPB_CNT_LIST_SIZE 32
|
||||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_API_VERSION_0_9
|
#define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS 6
|
||||||
|
#define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS 16
|
||||||
|
#define STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS 2
|
||||||
|
#define STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS 64
|
||||||
|
#define VK_STD_VULKAN_VIDEO_CODEC_H264_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_API_VERSION_0_9_5
|
||||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264"
|
#define VK_STD_VULKAN_VIDEO_CODEC_H264_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264"
|
||||||
|
|
||||||
// *************************************************
|
|
||||||
// Video H.264 common definitions:
|
|
||||||
// *************************************************
|
|
||||||
|
|
||||||
typedef enum StdVideoH264ChromaFormatIdc {
|
typedef enum StdVideoH264ChromaFormatIdc {
|
||||||
std_video_h264_chroma_format_idc_monochrome = 0,
|
STD_VIDEO_H264_CHROMA_FORMAT_IDC_MONOCHROME = 0,
|
||||||
std_video_h264_chroma_format_idc_420 = 1,
|
STD_VIDEO_H264_CHROMA_FORMAT_IDC_420 = 1,
|
||||||
std_video_h264_chroma_format_idc_422 = 2,
|
STD_VIDEO_H264_CHROMA_FORMAT_IDC_422 = 2,
|
||||||
std_video_h264_chroma_format_idc_444 = 3,
|
STD_VIDEO_H264_CHROMA_FORMAT_IDC_444 = 3,
|
||||||
|
STD_VIDEO_H264_CHROMA_FORMAT_IDC_INVALID = 0x7FFFFFFF,
|
||||||
|
STD_VIDEO_H264_CHROMA_FORMAT_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||||
} StdVideoH264ChromaFormatIdc;
|
} StdVideoH264ChromaFormatIdc;
|
||||||
|
|
||||||
typedef enum StdVideoH264ProfileIdc {
|
typedef enum StdVideoH264ProfileIdc {
|
||||||
std_video_h264_profile_idc_baseline = 66, /* Only constrained baseline is supported */
|
STD_VIDEO_H264_PROFILE_IDC_BASELINE = 66,
|
||||||
std_video_h264_profile_idc_main = 77,
|
STD_VIDEO_H264_PROFILE_IDC_MAIN = 77,
|
||||||
std_video_h264_profile_idc_high = 100,
|
STD_VIDEO_H264_PROFILE_IDC_HIGH = 100,
|
||||||
std_video_h264_profile_idc_high_444_predictive = 244,
|
STD_VIDEO_H264_PROFILE_IDC_HIGH_444_PREDICTIVE = 244,
|
||||||
std_video_h264_profile_idc_invalid = 0x7FFFFFFF
|
STD_VIDEO_H264_PROFILE_IDC_INVALID = 0x7FFFFFFF,
|
||||||
|
STD_VIDEO_H264_PROFILE_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||||
} StdVideoH264ProfileIdc;
|
} StdVideoH264ProfileIdc;
|
||||||
|
|
||||||
typedef enum StdVideoH264Level {
|
typedef enum StdVideoH264Level {
|
||||||
std_video_h264_level_1_0 = 0,
|
STD_VIDEO_H264_LEVEL_1_0 = 0,
|
||||||
std_video_h264_level_1_1 = 1,
|
STD_VIDEO_H264_LEVEL_1_1 = 1,
|
||||||
std_video_h264_level_1_2 = 2,
|
STD_VIDEO_H264_LEVEL_1_2 = 2,
|
||||||
std_video_h264_level_1_3 = 3,
|
STD_VIDEO_H264_LEVEL_1_3 = 3,
|
||||||
std_video_h264_level_2_0 = 4,
|
STD_VIDEO_H264_LEVEL_2_0 = 4,
|
||||||
std_video_h264_level_2_1 = 5,
|
STD_VIDEO_H264_LEVEL_2_1 = 5,
|
||||||
std_video_h264_level_2_2 = 6,
|
STD_VIDEO_H264_LEVEL_2_2 = 6,
|
||||||
std_video_h264_level_3_0 = 7,
|
STD_VIDEO_H264_LEVEL_3_0 = 7,
|
||||||
std_video_h264_level_3_1 = 8,
|
STD_VIDEO_H264_LEVEL_3_1 = 8,
|
||||||
std_video_h264_level_3_2 = 9,
|
STD_VIDEO_H264_LEVEL_3_2 = 9,
|
||||||
std_video_h264_level_4_0 = 10,
|
STD_VIDEO_H264_LEVEL_4_0 = 10,
|
||||||
std_video_h264_level_4_1 = 11,
|
STD_VIDEO_H264_LEVEL_4_1 = 11,
|
||||||
std_video_h264_level_4_2 = 12,
|
STD_VIDEO_H264_LEVEL_4_2 = 12,
|
||||||
std_video_h264_level_5_0 = 13,
|
STD_VIDEO_H264_LEVEL_5_0 = 13,
|
||||||
std_video_h264_level_5_1 = 14,
|
STD_VIDEO_H264_LEVEL_5_1 = 14,
|
||||||
std_video_h264_level_5_2 = 15,
|
STD_VIDEO_H264_LEVEL_5_2 = 15,
|
||||||
std_video_h264_level_6_0 = 16,
|
STD_VIDEO_H264_LEVEL_6_0 = 16,
|
||||||
std_video_h264_level_6_1 = 17,
|
STD_VIDEO_H264_LEVEL_6_1 = 17,
|
||||||
std_video_h264_level_6_2 = 18,
|
STD_VIDEO_H264_LEVEL_6_2 = 18,
|
||||||
std_video_h264_level_invalid = 0x7FFFFFFF
|
STD_VIDEO_H264_LEVEL_INVALID = 0x7FFFFFFF,
|
||||||
|
STD_VIDEO_H264_LEVEL_MAX_ENUM = 0x7FFFFFFF
|
||||||
} StdVideoH264Level;
|
} StdVideoH264Level;
|
||||||
|
|
||||||
typedef enum StdVideoH264PocType {
|
typedef enum StdVideoH264PocType {
|
||||||
std_video_h264_poc_type_0 = 0,
|
STD_VIDEO_H264_POC_TYPE_0 = 0,
|
||||||
std_video_h264_poc_type_1 = 1,
|
STD_VIDEO_H264_POC_TYPE_1 = 1,
|
||||||
std_video_h264_poc_type_2 = 2,
|
STD_VIDEO_H264_POC_TYPE_2 = 2,
|
||||||
std_video_h264_poc_type_invalid = 0x7FFFFFFF
|
STD_VIDEO_H264_POC_TYPE_INVALID = 0x7FFFFFFF,
|
||||||
|
STD_VIDEO_H264_POC_TYPE_MAX_ENUM = 0x7FFFFFFF
|
||||||
} StdVideoH264PocType;
|
} StdVideoH264PocType;
|
||||||
|
|
||||||
typedef enum StdVideoH264AspectRatioIdc {
|
typedef enum StdVideoH264AspectRatioIdc {
|
||||||
std_video_h264_aspect_ratio_idc_unspecified = 0,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_UNSPECIFIED = 0,
|
||||||
std_video_h264_aspect_ratio_idc_square = 1,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_SQUARE = 1,
|
||||||
std_video_h264_aspect_ratio_idc_12_11 = 2,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_12_11 = 2,
|
||||||
std_video_h264_aspect_ratio_idc_10_11 = 3,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_10_11 = 3,
|
||||||
std_video_h264_aspect_ratio_idc_16_11 = 4,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_16_11 = 4,
|
||||||
std_video_h264_aspect_ratio_idc_40_33 = 5,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_40_33 = 5,
|
||||||
std_video_h264_aspect_ratio_idc_24_11 = 6,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_24_11 = 6,
|
||||||
std_video_h264_aspect_ratio_idc_20_11 = 7,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_20_11 = 7,
|
||||||
std_video_h264_aspect_ratio_idc_32_11 = 8,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_32_11 = 8,
|
||||||
std_video_h264_aspect_ratio_idc_80_33 = 9,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_80_33 = 9,
|
||||||
std_video_h264_aspect_ratio_idc_18_11 = 10,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_18_11 = 10,
|
||||||
std_video_h264_aspect_ratio_idc_15_11 = 11,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_15_11 = 11,
|
||||||
std_video_h264_aspect_ratio_idc_64_33 = 12,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_64_33 = 12,
|
||||||
std_video_h264_aspect_ratio_idc_160_99 = 13,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_160_99 = 13,
|
||||||
std_video_h264_aspect_ratio_idc_4_3 = 14,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_4_3 = 14,
|
||||||
std_video_h264_aspect_ratio_idc_3_2 = 15,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_3_2 = 15,
|
||||||
std_video_h264_aspect_ratio_idc_2_1 = 16,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_2_1 = 16,
|
||||||
std_video_h264_aspect_ratio_idc_extended_sar = 255,
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_EXTENDED_SAR = 255,
|
||||||
std_video_h264_aspect_ratio_idc_invalid = 0x7FFFFFFF
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_INVALID = 0x7FFFFFFF,
|
||||||
|
STD_VIDEO_H264_ASPECT_RATIO_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||||
} StdVideoH264AspectRatioIdc;
|
} StdVideoH264AspectRatioIdc;
|
||||||
|
|
||||||
typedef enum StdVideoH264WeightedBiPredIdc {
|
typedef enum StdVideoH264WeightedBipredIdc {
|
||||||
std_video_h264_default_weighted_b_slices_prediction_idc = 0,
|
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_DEFAULT = 0,
|
||||||
std_video_h264_explicit_weighted_b_slices_prediction_idc = 1,
|
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT = 1,
|
||||||
std_video_h264_implicit_weighted_b_slices_prediction_idc = 2,
|
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_IMPLICIT = 2,
|
||||||
std_video_h264_invalid_weighted_b_slices_prediction_idc = 0x7FFFFFFF
|
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_INVALID = 0x7FFFFFFF,
|
||||||
} StdVideoH264WeightedBiPredIdc;
|
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||||
|
} StdVideoH264WeightedBipredIdc;
|
||||||
|
|
||||||
typedef enum StdVideoH264ModificationOfPicNumsIdc {
|
typedef enum StdVideoH264ModificationOfPicNumsIdc {
|
||||||
std_video_h264_modification_of_pic_nums_idc_short_term_subtract = 0,
|
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_SUBTRACT = 0,
|
||||||
std_video_h264_modification_of_pic_nums_idc_short_term_add = 1,
|
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_ADD = 1,
|
||||||
std_video_h264_modification_of_pic_nums_idc_long_term = 2,
|
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_LONG_TERM = 2,
|
||||||
std_video_h264_modification_of_pic_nums_idc_end = 3,
|
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_END = 3,
|
||||||
std_video_h264_modification_of_pic_nums_idc_invalid = 0x7FFFFFFF
|
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_INVALID = 0x7FFFFFFF,
|
||||||
|
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||||
} StdVideoH264ModificationOfPicNumsIdc;
|
} StdVideoH264ModificationOfPicNumsIdc;
|
||||||
|
|
||||||
typedef enum StdVideoH264MemMgmtControlOp {
|
typedef enum StdVideoH264MemMgmtControlOp {
|
||||||
std_video_h264_mem_mgmt_control_op_end = 0,
|
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_END = 0,
|
||||||
std_video_h264_mem_mgmt_control_op_unmark_short_term = 1,
|
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_SHORT_TERM = 1,
|
||||||
std_video_h264_mem_mgmt_control_op_unmark_long_term = 2,
|
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_LONG_TERM = 2,
|
||||||
std_video_h264_mem_mgmt_control_op_mark_long_term = 3,
|
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_LONG_TERM = 3,
|
||||||
std_video_h264_mem_mgmt_control_op_set_max_long_term_index = 4,
|
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_SET_MAX_LONG_TERM_INDEX = 4,
|
||||||
std_video_h264_mem_mgmt_control_op_unmark_all = 5,
|
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_ALL = 5,
|
||||||
std_video_h264_mem_mgmt_control_op_mark_current_as_long_term = 6,
|
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_CURRENT_AS_LONG_TERM = 6,
|
||||||
std_video_h264_mem_mgmt_control_op_invalid = 0x7FFFFFFF
|
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_INVALID = 0x7FFFFFFF,
|
||||||
|
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MAX_ENUM = 0x7FFFFFFF
|
||||||
} StdVideoH264MemMgmtControlOp;
|
} StdVideoH264MemMgmtControlOp;
|
||||||
|
|
||||||
typedef enum StdVideoH264CabacInitIdc {
|
typedef enum StdVideoH264CabacInitIdc {
|
||||||
std_video_h264_cabac_init_idc_0 = 0,
|
STD_VIDEO_H264_CABAC_INIT_IDC_0 = 0,
|
||||||
std_video_h264_cabac_init_idc_1 = 1,
|
STD_VIDEO_H264_CABAC_INIT_IDC_1 = 1,
|
||||||
std_video_h264_cabac_init_idc_2 = 2,
|
STD_VIDEO_H264_CABAC_INIT_IDC_2 = 2,
|
||||||
std_video_h264_cabac_init_idc_invalid = 0x7FFFFFFF
|
STD_VIDEO_H264_CABAC_INIT_IDC_INVALID = 0x7FFFFFFF,
|
||||||
|
STD_VIDEO_H264_CABAC_INIT_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||||
} StdVideoH264CabacInitIdc;
|
} StdVideoH264CabacInitIdc;
|
||||||
|
|
||||||
typedef enum StdVideoH264DisableDeblockingFilterIdc {
|
typedef enum StdVideoH264DisableDeblockingFilterIdc {
|
||||||
std_video_h264_disable_deblocking_filter_idc_disabled = 0,
|
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_DISABLED = 0,
|
||||||
std_video_h264_disable_deblocking_filter_idc_enabled = 1,
|
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_ENABLED = 1,
|
||||||
std_video_h264_disable_deblocking_filter_idc_partial = 2,
|
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_PARTIAL = 2,
|
||||||
std_video_h264_disable_deblocking_filter_idc_invalid = 0x7FFFFFFF
|
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_INVALID = 0x7FFFFFFF,
|
||||||
|
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||||
} StdVideoH264DisableDeblockingFilterIdc;
|
} StdVideoH264DisableDeblockingFilterIdc;
|
||||||
|
|
||||||
typedef enum StdVideoH264PictureType {
|
|
||||||
std_video_h264_picture_type_i = 0,
|
|
||||||
std_video_h264_picture_type_p = 1,
|
|
||||||
std_video_h264_picture_type_b = 2,
|
|
||||||
std_video_h264_picture_type_invalid = 0x7FFFFFFF
|
|
||||||
} StdVideoH264PictureType;
|
|
||||||
|
|
||||||
typedef enum StdVideoH264SliceType {
|
typedef enum StdVideoH264SliceType {
|
||||||
std_video_h264_slice_type_i = 0,
|
STD_VIDEO_H264_SLICE_TYPE_P = 0,
|
||||||
std_video_h264_slice_type_p = 1,
|
STD_VIDEO_H264_SLICE_TYPE_B = 1,
|
||||||
std_video_h264_slice_type_b = 2,
|
STD_VIDEO_H264_SLICE_TYPE_I = 2,
|
||||||
std_video_h264_slice_type_invalid = 0x7FFFFFFF
|
STD_VIDEO_H264_SLICE_TYPE_INVALID = 0x7FFFFFFF,
|
||||||
|
STD_VIDEO_H264_SLICE_TYPE_MAX_ENUM = 0x7FFFFFFF
|
||||||
} StdVideoH264SliceType;
|
} StdVideoH264SliceType;
|
||||||
|
|
||||||
typedef enum StdVideoH264NonVclNaluType {
|
typedef enum StdVideoH264PictureType {
|
||||||
std_video_h264_non_vcl_nalu_type_sps = 0,
|
STD_VIDEO_H264_PICTURE_TYPE_P = 0,
|
||||||
std_video_h264_non_vcl_nalu_type_pps = 1,
|
STD_VIDEO_H264_PICTURE_TYPE_B = 1,
|
||||||
std_video_h264_non_vcl_nalu_type_aud = 2,
|
STD_VIDEO_H264_PICTURE_TYPE_I = 2,
|
||||||
std_video_h264_non_vcl_nalu_type_prefix = 3,
|
STD_VIDEO_H264_PICTURE_TYPE_IDR = 5,
|
||||||
std_video_h264_non_vcl_nalu_type_end_of_sequence = 4,
|
STD_VIDEO_H264_PICTURE_TYPE_INVALID = 0x7FFFFFFF,
|
||||||
std_video_h264_non_vcl_nalu_type_end_of_stream = 5,
|
STD_VIDEO_H264_PICTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
|
||||||
std_video_h264_non_vcl_nalu_type_precoded = 6,
|
} StdVideoH264PictureType;
|
||||||
std_video_h264_non_vcl_nalu_type_invalid = 0x7FFFFFFF
|
|
||||||
} StdVideoH264NonVclNaluType;
|
|
||||||
|
|
||||||
|
typedef enum StdVideoH264NonVclNaluType {
|
||||||
|
STD_VIDEO_H264_NON_VCL_NALU_TYPE_SPS = 0,
|
||||||
|
STD_VIDEO_H264_NON_VCL_NALU_TYPE_PPS = 1,
|
||||||
|
STD_VIDEO_H264_NON_VCL_NALU_TYPE_AUD = 2,
|
||||||
|
STD_VIDEO_H264_NON_VCL_NALU_TYPE_PREFIX = 3,
|
||||||
|
STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_SEQUENCE = 4,
|
||||||
|
STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_STREAM = 5,
|
||||||
|
STD_VIDEO_H264_NON_VCL_NALU_TYPE_PRECODED = 6,
|
||||||
|
STD_VIDEO_H264_NON_VCL_NALU_TYPE_INVALID = 0x7FFFFFFF,
|
||||||
|
STD_VIDEO_H264_NON_VCL_NALU_TYPE_MAX_ENUM = 0x7FFFFFFF
|
||||||
|
} StdVideoH264NonVclNaluType;
|
||||||
typedef struct StdVideoH264SpsVuiFlags {
|
typedef struct StdVideoH264SpsVuiFlags {
|
||||||
uint32_t aspect_ratio_info_present_flag:1;
|
uint32_t aspect_ratio_info_present_flag : 1;
|
||||||
uint32_t overscan_info_present_flag:1;
|
uint32_t overscan_info_present_flag : 1;
|
||||||
uint32_t overscan_appropriate_flag:1;
|
uint32_t overscan_appropriate_flag : 1;
|
||||||
uint32_t video_signal_type_present_flag:1;
|
uint32_t video_signal_type_present_flag : 1;
|
||||||
uint32_t video_full_range_flag:1;
|
uint32_t video_full_range_flag : 1;
|
||||||
uint32_t color_description_present_flag:1;
|
uint32_t color_description_present_flag : 1;
|
||||||
uint32_t chroma_loc_info_present_flag:1;
|
uint32_t chroma_loc_info_present_flag : 1;
|
||||||
uint32_t timing_info_present_flag:1;
|
uint32_t timing_info_present_flag : 1;
|
||||||
uint32_t fixed_frame_rate_flag:1;
|
uint32_t fixed_frame_rate_flag : 1;
|
||||||
uint32_t bitstream_restriction_flag:1;
|
uint32_t bitstream_restriction_flag : 1;
|
||||||
uint32_t nal_hrd_parameters_present_flag:1;
|
uint32_t nal_hrd_parameters_present_flag : 1;
|
||||||
uint32_t vcl_hrd_parameters_present_flag:1;
|
uint32_t vcl_hrd_parameters_present_flag : 1;
|
||||||
} StdVideoH264SpsVuiFlags;
|
} StdVideoH264SpsVuiFlags;
|
||||||
|
|
||||||
typedef struct StdVideoH264HrdParameters {
|
typedef struct StdVideoH264HrdParameters {
|
||||||
uint8_t cpb_cnt_minus1;
|
uint8_t cpb_cnt_minus1;
|
||||||
uint8_t bit_rate_scale;
|
uint8_t bit_rate_scale;
|
||||||
uint8_t cpb_size_scale;
|
uint8_t cpb_size_scale;
|
||||||
uint32_t bit_rate_value_minus1[32];
|
uint32_t bit_rate_value_minus1[STD_VIDEO_H264_CPB_CNT_LIST_SIZE];
|
||||||
uint32_t cpb_size_value_minus1[32];
|
uint32_t cpb_size_value_minus1[STD_VIDEO_H264_CPB_CNT_LIST_SIZE];
|
||||||
uint8_t cbr_flag[32];
|
uint8_t cbr_flag[STD_VIDEO_H264_CPB_CNT_LIST_SIZE];
|
||||||
uint32_t initial_cpb_removal_delay_length_minus1;
|
uint32_t initial_cpb_removal_delay_length_minus1;
|
||||||
uint32_t cpb_removal_delay_length_minus1;
|
uint32_t cpb_removal_delay_length_minus1;
|
||||||
uint32_t dpb_output_delay_length_minus1;
|
uint32_t dpb_output_delay_length_minus1;
|
||||||
uint32_t time_offset_length;
|
uint32_t time_offset_length;
|
||||||
} StdVideoH264HrdParameters;
|
} StdVideoH264HrdParameters;
|
||||||
|
|
||||||
typedef struct StdVideoH264SequenceParameterSetVui {
|
typedef struct StdVideoH264SequenceParameterSetVui {
|
||||||
StdVideoH264AspectRatioIdc aspect_ratio_idc;
|
StdVideoH264AspectRatioIdc aspect_ratio_idc;
|
||||||
uint16_t sar_width;
|
uint16_t sar_width;
|
||||||
uint16_t sar_height;
|
uint16_t sar_height;
|
||||||
uint8_t video_format;
|
uint8_t video_format;
|
||||||
uint8_t color_primaries;
|
uint8_t color_primaries;
|
||||||
uint8_t transfer_characteristics;
|
uint8_t transfer_characteristics;
|
||||||
uint8_t matrix_coefficients;
|
uint8_t matrix_coefficients;
|
||||||
uint32_t num_units_in_tick;
|
uint32_t num_units_in_tick;
|
||||||
uint32_t time_scale;
|
uint32_t time_scale;
|
||||||
StdVideoH264HrdParameters hrd_parameters;
|
StdVideoH264HrdParameters* pHrdParameters;
|
||||||
uint8_t num_reorder_frames;
|
uint8_t max_num_reorder_frames;
|
||||||
uint8_t max_dec_frame_buffering;
|
uint8_t max_dec_frame_buffering;
|
||||||
StdVideoH264SpsVuiFlags flags;
|
StdVideoH264SpsVuiFlags flags;
|
||||||
} StdVideoH264SequenceParameterSetVui;
|
} StdVideoH264SequenceParameterSetVui;
|
||||||
|
|
||||||
typedef struct StdVideoH264SpsFlags {
|
typedef struct StdVideoH264SpsFlags {
|
||||||
uint32_t constraint_set0_flag:1;
|
uint32_t constraint_set0_flag : 1;
|
||||||
uint32_t constraint_set1_flag:1;
|
uint32_t constraint_set1_flag : 1;
|
||||||
uint32_t constraint_set2_flag:1;
|
uint32_t constraint_set2_flag : 1;
|
||||||
uint32_t constraint_set3_flag:1;
|
uint32_t constraint_set3_flag : 1;
|
||||||
uint32_t constraint_set4_flag:1;
|
uint32_t constraint_set4_flag : 1;
|
||||||
uint32_t constraint_set5_flag:1;
|
uint32_t constraint_set5_flag : 1;
|
||||||
uint32_t direct_8x8_inference_flag:1;
|
uint32_t direct_8x8_inference_flag : 1;
|
||||||
uint32_t mb_adaptive_frame_field_flag:1;
|
uint32_t mb_adaptive_frame_field_flag : 1;
|
||||||
uint32_t frame_mbs_only_flag:1;
|
uint32_t frame_mbs_only_flag : 1;
|
||||||
uint32_t delta_pic_order_always_zero_flag:1;
|
uint32_t delta_pic_order_always_zero_flag : 1;
|
||||||
uint32_t residual_colour_transform_flag:1;
|
uint32_t separate_colour_plane_flag : 1;
|
||||||
uint32_t gaps_in_frame_num_value_allowed_flag:1;
|
uint32_t gaps_in_frame_num_value_allowed_flag : 1;
|
||||||
uint32_t first_picture_after_seek_flag:1; // where is this being documented?
|
uint32_t qpprime_y_zero_transform_bypass_flag : 1;
|
||||||
uint32_t qpprime_y_zero_transform_bypass_flag:1;
|
uint32_t frame_cropping_flag : 1;
|
||||||
uint32_t frame_cropping_flag:1;
|
uint32_t seq_scaling_matrix_present_flag : 1;
|
||||||
uint32_t scaling_matrix_present_flag:1;
|
uint32_t vui_parameters_present_flag : 1;
|
||||||
uint32_t vui_parameters_present_flag:1;
|
|
||||||
} StdVideoH264SpsFlags;
|
} StdVideoH264SpsFlags;
|
||||||
|
|
||||||
typedef struct StdVideoH264ScalingLists
|
typedef struct StdVideoH264ScalingLists {
|
||||||
{
|
uint8_t scaling_list_present_mask;
|
||||||
// scaling_list_present_mask has one bit for each
|
uint8_t use_default_scaling_matrix_mask;
|
||||||
// seq_scaling_list_present_flag[i] for SPS OR
|
uint8_t ScalingList4x4[STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS][STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS];
|
||||||
// pic_scaling_list_present_flag[i] for PPS,
|
uint8_t ScalingList8x8[STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS][STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS];
|
||||||
// bit 0 - 5 are for each entry of ScalingList4x4
|
|
||||||
// bit 6 - 7 are for each entry plus 6 for ScalingList8x8
|
|
||||||
uint8_t scaling_list_present_mask;
|
|
||||||
// use_default_scaling_matrix_mask has one bit for each
|
|
||||||
// UseDefaultScalingMatrix4x4Flag[ i ] and
|
|
||||||
// UseDefaultScalingMatrix8x8Flag[ i - 6 ] for SPS OR PPS
|
|
||||||
// bit 0 - 5 are for each entry of ScalingList4x4
|
|
||||||
// bit 6 - 7 are for each entry plus 6 for ScalingList8x8
|
|
||||||
uint8_t use_default_scaling_matrix_mask;
|
|
||||||
uint8_t ScalingList4x4[6][16];
|
|
||||||
uint8_t ScalingList8x8[2][64];
|
|
||||||
} StdVideoH264ScalingLists;
|
} StdVideoH264ScalingLists;
|
||||||
|
|
||||||
typedef struct StdVideoH264SequenceParameterSet
|
typedef struct StdVideoH264SequenceParameterSet {
|
||||||
{
|
StdVideoH264ProfileIdc profile_idc;
|
||||||
StdVideoH264ProfileIdc profile_idc;
|
StdVideoH264Level level_idc;
|
||||||
StdVideoH264Level level_idc;
|
uint8_t seq_parameter_set_id;
|
||||||
uint8_t seq_parameter_set_id;
|
StdVideoH264ChromaFormatIdc chroma_format_idc;
|
||||||
StdVideoH264ChromaFormatIdc chroma_format_idc;
|
uint8_t bit_depth_luma_minus8;
|
||||||
uint8_t bit_depth_luma_minus8;
|
uint8_t bit_depth_chroma_minus8;
|
||||||
uint8_t bit_depth_chroma_minus8;
|
uint8_t log2_max_frame_num_minus4;
|
||||||
uint8_t log2_max_frame_num_minus4;
|
StdVideoH264PocType pic_order_cnt_type;
|
||||||
StdVideoH264PocType pic_order_cnt_type;
|
uint8_t log2_max_pic_order_cnt_lsb_minus4;
|
||||||
uint8_t log2_max_pic_order_cnt_lsb_minus4;
|
int32_t offset_for_non_ref_pic;
|
||||||
int32_t offset_for_non_ref_pic;
|
int32_t offset_for_top_to_bottom_field;
|
||||||
int32_t offset_for_top_to_bottom_field;
|
uint8_t num_ref_frames_in_pic_order_cnt_cycle;
|
||||||
uint8_t num_ref_frames_in_pic_order_cnt_cycle;
|
uint8_t max_num_ref_frames;
|
||||||
uint8_t max_num_ref_frames;
|
uint32_t pic_width_in_mbs_minus1;
|
||||||
uint32_t pic_width_in_mbs_minus1;
|
uint32_t pic_height_in_map_units_minus1;
|
||||||
uint32_t pic_height_in_map_units_minus1;
|
uint32_t frame_crop_left_offset;
|
||||||
uint32_t frame_crop_left_offset;
|
uint32_t frame_crop_right_offset;
|
||||||
uint32_t frame_crop_right_offset;
|
uint32_t frame_crop_top_offset;
|
||||||
uint32_t frame_crop_top_offset;
|
uint32_t frame_crop_bottom_offset;
|
||||||
uint32_t frame_crop_bottom_offset;
|
StdVideoH264SpsFlags flags;
|
||||||
StdVideoH264SpsFlags flags;
|
int32_t* pOffsetForRefFrame;
|
||||||
int32_t offset_for_ref_frame[255]; // The number of valid values are defined by the num_ref_frames_in_pic_order_cnt_cycle
|
StdVideoH264ScalingLists* pScalingLists;
|
||||||
StdVideoH264ScalingLists* pScalingLists; // Must be a valid pointer if scaling_matrix_present_flag is set
|
StdVideoH264SequenceParameterSetVui* pSequenceParameterSetVui;
|
||||||
StdVideoH264SequenceParameterSetVui* pSequenceParameterSetVui; // Must be a valid pointer if StdVideoH264SpsFlags:vui_parameters_present_flag is set
|
|
||||||
} StdVideoH264SequenceParameterSet;
|
} StdVideoH264SequenceParameterSet;
|
||||||
|
|
||||||
typedef struct StdVideoH264PpsFlags {
|
typedef struct StdVideoH264PpsFlags {
|
||||||
uint32_t transform_8x8_mode_flag:1;
|
uint32_t transform_8x8_mode_flag : 1;
|
||||||
uint32_t redundant_pic_cnt_present_flag:1;
|
uint32_t redundant_pic_cnt_present_flag : 1;
|
||||||
uint32_t constrained_intra_pred_flag:1;
|
uint32_t constrained_intra_pred_flag : 1;
|
||||||
uint32_t deblocking_filter_control_present_flag:1;
|
uint32_t deblocking_filter_control_present_flag : 1;
|
||||||
uint32_t weighted_bipred_idc_flag:1;
|
uint32_t weighted_bipred_idc_flag : 1;
|
||||||
uint32_t weighted_pred_flag:1;
|
uint32_t weighted_pred_flag : 1;
|
||||||
uint32_t pic_order_present_flag:1;
|
uint32_t pic_order_present_flag : 1;
|
||||||
uint32_t entropy_coding_mode_flag:1;
|
uint32_t entropy_coding_mode_flag : 1;
|
||||||
uint32_t scaling_matrix_present_flag:1;
|
uint32_t pic_scaling_matrix_present_flag : 1;
|
||||||
} StdVideoH264PpsFlags;
|
} StdVideoH264PpsFlags;
|
||||||
|
|
||||||
typedef struct StdVideoH264PictureParameterSet
|
typedef struct StdVideoH264PictureParameterSet {
|
||||||
{
|
uint8_t seq_parameter_set_id;
|
||||||
uint8_t seq_parameter_set_id;
|
uint8_t pic_parameter_set_id;
|
||||||
uint8_t pic_parameter_set_id;
|
uint8_t num_ref_idx_l0_default_active_minus1;
|
||||||
uint8_t num_ref_idx_l0_default_active_minus1;
|
uint8_t num_ref_idx_l1_default_active_minus1;
|
||||||
uint8_t num_ref_idx_l1_default_active_minus1;
|
StdVideoH264WeightedBipredIdc weighted_bipred_idc;
|
||||||
StdVideoH264WeightedBiPredIdc weighted_bipred_idc;
|
int8_t pic_init_qp_minus26;
|
||||||
int8_t pic_init_qp_minus26;
|
int8_t pic_init_qs_minus26;
|
||||||
int8_t pic_init_qs_minus26;
|
int8_t chroma_qp_index_offset;
|
||||||
int8_t chroma_qp_index_offset;
|
int8_t second_chroma_qp_index_offset;
|
||||||
int8_t second_chroma_qp_index_offset;
|
StdVideoH264PpsFlags flags;
|
||||||
StdVideoH264PpsFlags flags;
|
StdVideoH264ScalingLists* pScalingLists;
|
||||||
StdVideoH264ScalingLists* pScalingLists; // Must be a valid pointer if StdVideoH264PpsFlags::scaling_matrix_present_flag is set.
|
|
||||||
} StdVideoH264PictureParameterSet;
|
} StdVideoH264PictureParameterSet;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // VULKAN_VIDEO_CODEC_H264STD_H_
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,82 +1,93 @@
|
||||||
|
#ifndef VULKAN_VIDEO_CODEC_H264STD_DECODE_H_
|
||||||
|
#define VULKAN_VIDEO_CODEC_H264STD_DECODE_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright (c) 2019-2020 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef VULKAN_VIDEO_CODEC_H264STD_DECODE_H_
|
/*
|
||||||
#define VULKAN_VIDEO_CODEC_H264STD_DECODE_H_ 1
|
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "vk_video/vulkan_video_codec_h264std.h"
|
|
||||||
|
|
||||||
// *************************************************
|
|
||||||
// Video H.264 Decode related parameters:
|
|
||||||
// *************************************************
|
|
||||||
|
|
||||||
|
#define vulkan_video_codec_h264std_decode 1
|
||||||
|
#define STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE 2
|
||||||
|
#define STD_VIDEO_DECODE_H264_MVC_REF_LIST_SIZE 15
|
||||||
|
|
||||||
|
typedef enum StdVideoDecodeH264FieldOrderCount {
|
||||||
|
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_TOP = 0,
|
||||||
|
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_BOTTOM = 1,
|
||||||
|
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_INVALID = 0x7FFFFFFF,
|
||||||
|
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_MAX_ENUM = 0x7FFFFFFF
|
||||||
|
} StdVideoDecodeH264FieldOrderCount;
|
||||||
typedef struct StdVideoDecodeH264PictureInfoFlags {
|
typedef struct StdVideoDecodeH264PictureInfoFlags {
|
||||||
uint32_t field_pic_flag:1; // Is field picture
|
uint32_t field_pic_flag : 1;
|
||||||
uint32_t is_intra:1; // Is intra picture
|
uint32_t is_intra : 1;
|
||||||
uint32_t bottom_field_flag:1; // bottom (true) or top (false) field if field_pic_flag is set.
|
uint32_t IdrPicFlag : 1;
|
||||||
uint32_t is_reference:1; // This only applies to picture info, and not to the DPB lists.
|
uint32_t bottom_field_flag : 1;
|
||||||
uint32_t complementary_field_pair:1; // complementary field pair, complementary non-reference field pair, complementary reference field pair
|
uint32_t is_reference : 1;
|
||||||
|
uint32_t complementary_field_pair : 1;
|
||||||
} StdVideoDecodeH264PictureInfoFlags;
|
} StdVideoDecodeH264PictureInfoFlags;
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH264PictureInfo {
|
typedef struct StdVideoDecodeH264PictureInfo {
|
||||||
uint8_t seq_parameter_set_id; // Selecting SPS from the Picture Parameters
|
uint8_t seq_parameter_set_id;
|
||||||
uint8_t pic_parameter_set_id; // Selecting PPS from the Picture Parameters and the SPS
|
uint8_t pic_parameter_set_id;
|
||||||
uint16_t reserved; // for structure members 32-bit packing/alignment
|
uint16_t reserved;
|
||||||
uint16_t frame_num; // 7.4.3 Slice header semantics
|
uint16_t frame_num;
|
||||||
uint16_t idr_pic_id; // 7.4.3 Slice header semantics
|
uint16_t idr_pic_id;
|
||||||
// PicOrderCnt is based on TopFieldOrderCnt and BottomFieldOrderCnt. See 8.2.1 Decoding process for picture order count type 0 - 2
|
int32_t PicOrderCnt[STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE];
|
||||||
int32_t PicOrderCnt[2]; // TopFieldOrderCnt and BottomFieldOrderCnt fields.
|
StdVideoDecodeH264PictureInfoFlags flags;
|
||||||
StdVideoDecodeH264PictureInfoFlags flags;
|
|
||||||
} StdVideoDecodeH264PictureInfo;
|
} StdVideoDecodeH264PictureInfo;
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH264ReferenceInfoFlags {
|
typedef struct StdVideoDecodeH264ReferenceInfoFlags {
|
||||||
uint32_t top_field_flag:1; // Reference is used for top field reference.
|
uint32_t top_field_flag : 1;
|
||||||
uint32_t bottom_field_flag:1; // Reference is used for bottom field reference.
|
uint32_t bottom_field_flag : 1;
|
||||||
uint32_t is_long_term:1; // this is a long term reference
|
uint32_t is_long_term : 1;
|
||||||
uint32_t is_non_existing:1; // Must be handled in accordance with 8.2.5.2: Decoding process for gaps in frame_num
|
uint32_t is_non_existing : 1;
|
||||||
} StdVideoDecodeH264ReferenceInfoFlags;
|
} StdVideoDecodeH264ReferenceInfoFlags;
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH264ReferenceInfo {
|
typedef struct StdVideoDecodeH264ReferenceInfo {
|
||||||
// FrameNum = is_long_term ? long_term_frame_idx : frame_num
|
uint16_t FrameNum;
|
||||||
uint16_t FrameNum; // 7.4.3.3 Decoded reference picture marking semantics
|
uint16_t reserved;
|
||||||
uint16_t reserved; // for structure members 32-bit packing/alignment
|
int32_t PicOrderCnt[2];
|
||||||
int32_t PicOrderCnt[2]; // TopFieldOrderCnt and BottomFieldOrderCnt fields.
|
StdVideoDecodeH264ReferenceInfoFlags flags;
|
||||||
StdVideoDecodeH264ReferenceInfoFlags flags;
|
|
||||||
} StdVideoDecodeH264ReferenceInfo;
|
} StdVideoDecodeH264ReferenceInfo;
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH264MvcElementFlags {
|
typedef struct StdVideoDecodeH264MvcElementFlags {
|
||||||
uint32_t non_idr:1;
|
uint32_t non_idr : 1;
|
||||||
uint32_t anchor_pic:1;
|
uint32_t anchor_pic : 1;
|
||||||
uint32_t inter_view:1;
|
uint32_t inter_view : 1;
|
||||||
} StdVideoDecodeH264MvcElementFlags;
|
} StdVideoDecodeH264MvcElementFlags;
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH264MvcElement {
|
typedef struct StdVideoDecodeH264MvcElement {
|
||||||
StdVideoDecodeH264MvcElementFlags flags;
|
StdVideoDecodeH264MvcElementFlags flags;
|
||||||
uint16_t viewOrderIndex;
|
uint16_t viewOrderIndex;
|
||||||
uint16_t viewId;
|
uint16_t viewId;
|
||||||
uint16_t temporalId; // move out?
|
uint16_t temporalId;
|
||||||
uint16_t priorityId; // move out?
|
uint16_t priorityId;
|
||||||
uint16_t numOfAnchorRefsInL0;
|
uint16_t numOfAnchorRefsInL0;
|
||||||
uint16_t viewIdOfAnchorRefsInL0[15];
|
uint16_t viewIdOfAnchorRefsInL0[STD_VIDEO_DECODE_H264_MVC_REF_LIST_SIZE];
|
||||||
uint16_t numOfAnchorRefsInL1;
|
uint16_t numOfAnchorRefsInL1;
|
||||||
uint16_t viewIdOfAnchorRefsInL1[15];
|
uint16_t viewIdOfAnchorRefsInL1[STD_VIDEO_DECODE_H264_MVC_REF_LIST_SIZE];
|
||||||
uint16_t numOfNonAnchorRefsInL0;
|
uint16_t numOfNonAnchorRefsInL0;
|
||||||
uint16_t viewIdOfNonAnchorRefsInL0[15];
|
uint16_t viewIdOfNonAnchorRefsInL0[STD_VIDEO_DECODE_H264_MVC_REF_LIST_SIZE];
|
||||||
uint16_t numOfNonAnchorRefsInL1;
|
uint16_t numOfNonAnchorRefsInL1;
|
||||||
uint16_t viewIdOfNonAnchorRefsInL1[15];
|
uint16_t viewIdOfNonAnchorRefsInL1[STD_VIDEO_DECODE_H264_MVC_REF_LIST_SIZE];
|
||||||
} StdVideoDecodeH264MvcElement;
|
} StdVideoDecodeH264MvcElement;
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH264Mvc {
|
typedef struct StdVideoDecodeH264Mvc {
|
||||||
uint32_t viewId0;
|
uint32_t viewId0;
|
||||||
uint32_t mvcElementCount;
|
uint32_t mvcElementCount;
|
||||||
StdVideoDecodeH264MvcElement* pMvcElements;
|
StdVideoDecodeH264MvcElement* pMvcElements;
|
||||||
} StdVideoDecodeH264Mvc;
|
} StdVideoDecodeH264Mvc;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -84,4 +95,4 @@ typedef struct StdVideoDecodeH264Mvc {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // VULKAN_VIDEO_CODEC_H264STD_DECODE_H_
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,89 +1,92 @@
|
||||||
|
#ifndef VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_
|
||||||
|
#define VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright (c) 2019-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_
|
/*
|
||||||
#define VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_ 1
|
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "vk_video/vulkan_video_codec_h264std.h"
|
|
||||||
|
|
||||||
// *************************************************
|
|
||||||
// Video H.264 Encode related parameters:
|
|
||||||
// *************************************************
|
|
||||||
|
|
||||||
|
#define vulkan_video_codec_h264std_encode 1
|
||||||
typedef struct StdVideoEncodeH264SliceHeaderFlags {
|
typedef struct StdVideoEncodeH264SliceHeaderFlags {
|
||||||
uint32_t idr_flag:1;
|
uint32_t idr_flag : 1;
|
||||||
uint32_t is_reference_flag:1;
|
uint32_t is_reference_flag : 1;
|
||||||
uint32_t num_ref_idx_active_override_flag:1;
|
uint32_t num_ref_idx_active_override_flag : 1;
|
||||||
uint32_t no_output_of_prior_pics_flag:1;
|
uint32_t no_output_of_prior_pics_flag : 1;
|
||||||
uint32_t long_term_reference_flag:1;
|
uint32_t long_term_reference_flag : 1;
|
||||||
uint32_t adaptive_ref_pic_marking_mode_flag:1;
|
uint32_t adaptive_ref_pic_marking_mode_flag : 1;
|
||||||
uint32_t no_prior_references_available_flag:1;
|
uint32_t no_prior_references_available_flag : 1;
|
||||||
} StdVideoEncodeH264SliceHeaderFlags;
|
} StdVideoEncodeH264SliceHeaderFlags;
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH264PictureInfoFlags {
|
typedef struct StdVideoEncodeH264PictureInfoFlags {
|
||||||
uint32_t idr_flag:1;
|
uint32_t idr_flag : 1;
|
||||||
uint32_t is_reference_flag:1;
|
uint32_t is_reference_flag : 1;
|
||||||
uint32_t long_term_reference_flag:1;
|
uint32_t long_term_reference_flag : 1;
|
||||||
} StdVideoEncodeH264PictureInfoFlags;
|
} StdVideoEncodeH264PictureInfoFlags;
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH264RefMgmtFlags {
|
typedef struct StdVideoEncodeH264RefMgmtFlags {
|
||||||
uint32_t ref_pic_list_modification_l0_flag:1;
|
uint32_t ref_pic_list_modification_l0_flag : 1;
|
||||||
uint32_t ref_pic_list_modification_l1_flag:1;
|
uint32_t ref_pic_list_modification_l1_flag : 1;
|
||||||
} StdVideoEncodeH264RefMgmtFlags;
|
} StdVideoEncodeH264RefMgmtFlags;
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH264RefListModEntry {
|
typedef struct StdVideoEncodeH264RefListModEntry {
|
||||||
StdVideoH264ModificationOfPicNumsIdc modification_of_pic_nums_idc;
|
StdVideoH264ModificationOfPicNumsIdc modification_of_pic_nums_idc;
|
||||||
uint16_t abs_diff_pic_num_minus1;
|
uint16_t abs_diff_pic_num_minus1;
|
||||||
uint16_t long_term_pic_num;
|
uint16_t long_term_pic_num;
|
||||||
} StdVideoEncodeH264RefListModEntry;
|
} StdVideoEncodeH264RefListModEntry;
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH264RefPicMarkingEntry {
|
typedef struct StdVideoEncodeH264RefPicMarkingEntry {
|
||||||
StdVideoH264MemMgmtControlOp operation;
|
StdVideoH264MemMgmtControlOp operation;
|
||||||
uint16_t difference_of_pic_nums_minus1;
|
uint16_t difference_of_pic_nums_minus1;
|
||||||
uint16_t long_term_pic_num;
|
uint16_t long_term_pic_num;
|
||||||
uint16_t long_term_frame_idx;
|
uint16_t long_term_frame_idx;
|
||||||
uint16_t max_long_term_frame_idx_plus1;
|
uint16_t max_long_term_frame_idx_plus1;
|
||||||
} StdVideoEncodeH264RefPicMarkingEntry;
|
} StdVideoEncodeH264RefPicMarkingEntry;
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH264RefMemMgmtCtrlOperations {
|
typedef struct StdVideoEncodeH264RefMemMgmtCtrlOperations {
|
||||||
StdVideoEncodeH264RefMgmtFlags flags;
|
StdVideoEncodeH264RefMgmtFlags flags;
|
||||||
uint8_t refList0ModOpCount;
|
uint8_t refList0ModOpCount;
|
||||||
StdVideoEncodeH264RefListModEntry* pRefList0ModOperations;
|
StdVideoEncodeH264RefListModEntry* pRefList0ModOperations;
|
||||||
uint8_t refList1ModOpCount;
|
uint8_t refList1ModOpCount;
|
||||||
StdVideoEncodeH264RefListModEntry* pRefList1ModOperations;
|
StdVideoEncodeH264RefListModEntry* pRefList1ModOperations;
|
||||||
uint8_t refPicMarkingOpCount;
|
uint8_t refPicMarkingOpCount;
|
||||||
StdVideoEncodeH264RefPicMarkingEntry* pRefPicMarkingOperations;
|
StdVideoEncodeH264RefPicMarkingEntry* pRefPicMarkingOperations;
|
||||||
} StdVideoEncodeH264RefMemMgmtCtrlOperations;
|
} StdVideoEncodeH264RefMemMgmtCtrlOperations;
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH264PictureInfo {
|
typedef struct StdVideoEncodeH264PictureInfo {
|
||||||
StdVideoEncodeH264PictureInfoFlags flags;
|
StdVideoEncodeH264PictureInfoFlags flags;
|
||||||
StdVideoH264PictureType pictureType;
|
StdVideoH264PictureType pictureType;
|
||||||
uint32_t frameNum;
|
uint32_t frameNum;
|
||||||
uint32_t pictureOrderCount;
|
uint32_t pictureOrderCount;
|
||||||
uint16_t long_term_pic_num;
|
uint16_t long_term_pic_num;
|
||||||
uint16_t long_term_frame_idx;
|
uint16_t long_term_frame_idx;
|
||||||
} StdVideoEncodeH264PictureInfo;
|
} StdVideoEncodeH264PictureInfo;
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH264SliceHeader {
|
typedef struct StdVideoEncodeH264SliceHeader {
|
||||||
StdVideoEncodeH264SliceHeaderFlags flags;
|
StdVideoEncodeH264SliceHeaderFlags flags;
|
||||||
StdVideoH264SliceType slice_type;
|
StdVideoH264SliceType slice_type;
|
||||||
uint8_t seq_parameter_set_id;
|
uint8_t seq_parameter_set_id;
|
||||||
uint8_t pic_parameter_set_id;
|
uint8_t pic_parameter_set_id;
|
||||||
uint16_t idr_pic_id;
|
uint16_t idr_pic_id;
|
||||||
uint8_t num_ref_idx_l0_active_minus1;
|
uint8_t num_ref_idx_l0_active_minus1;
|
||||||
uint8_t num_ref_idx_l1_active_minus1;
|
uint8_t num_ref_idx_l1_active_minus1;
|
||||||
StdVideoH264CabacInitIdc cabac_init_idc;
|
StdVideoH264CabacInitIdc cabac_init_idc;
|
||||||
StdVideoH264DisableDeblockingFilterIdc disable_deblocking_filter_idc;
|
StdVideoH264DisableDeblockingFilterIdc disable_deblocking_filter_idc;
|
||||||
int8_t slice_alpha_c0_offset_div2;
|
int8_t slice_alpha_c0_offset_div2;
|
||||||
int8_t slice_beta_offset_div2;
|
int8_t slice_beta_offset_div2;
|
||||||
StdVideoEncodeH264RefMemMgmtCtrlOperations* pMemMgmtCtrlOperations;
|
StdVideoEncodeH264RefMemMgmtCtrlOperations* pMemMgmtCtrlOperations;
|
||||||
} StdVideoEncodeH264SliceHeader;
|
} StdVideoEncodeH264SliceHeader;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -91,4 +94,4 @@ typedef struct StdVideoEncodeH264SliceHeader {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,341 +1,360 @@
|
||||||
|
#ifndef VULKAN_VIDEO_CODEC_H265STD_H_
|
||||||
|
#define VULKAN_VIDEO_CODEC_H265STD_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright (c) 2019-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef VULKAN_VIDEO_CODEC_H265STD_H_
|
/*
|
||||||
#define VULKAN_VIDEO_CODEC_H265STD_H_ 1
|
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "vk_video/vulkan_video_codecs_common.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
#define vulkan_video_codec_h265std 1
|
||||||
// Vulkan 0.5 version number WIP
|
// Vulkan 0.5 version number WIP
|
||||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_API_VERSION_0_5 VK_MAKE_VIDEO_STD_VERSION(0, 5, 0) // Patch version should always be set to 0
|
#define VK_STD_VULKAN_VIDEO_CODEC_H265_API_VERSION_0_9_5 VK_MAKE_VIDEO_STD_VERSION(0, 9, 5) // Patch version should always be set to 0
|
||||||
|
|
||||||
// Format must be in the form XX.XX where the first two digits are the major and the second two, the minor.
|
#define STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE 7
|
||||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_API_VERSION_0_5
|
#define STD_VIDEO_H265_CPB_CNT_LIST_SIZE 32
|
||||||
|
#define STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS 6
|
||||||
|
#define STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS 16
|
||||||
|
#define STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS 6
|
||||||
|
#define STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS 64
|
||||||
|
#define STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS 6
|
||||||
|
#define STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS 64
|
||||||
|
#define STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS 2
|
||||||
|
#define STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS 64
|
||||||
|
#define STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE 3
|
||||||
|
#define STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE 128
|
||||||
|
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE 19
|
||||||
|
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE 21
|
||||||
|
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE 6
|
||||||
|
#define VK_STD_VULKAN_VIDEO_CODEC_H265_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_API_VERSION_0_9_5
|
||||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265"
|
#define VK_STD_VULKAN_VIDEO_CODEC_H265_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265"
|
||||||
|
|
||||||
typedef enum StdVideoH265ChromaFormatIdc {
|
typedef enum StdVideoH265ChromaFormatIdc {
|
||||||
std_video_h265_chroma_format_idc_monochrome = 0,
|
STD_VIDEO_H265_CHROMA_FORMAT_IDC_MONOCHROME = 0,
|
||||||
std_video_h265_chroma_format_idc_420 = 1,
|
STD_VIDEO_H265_CHROMA_FORMAT_IDC_420 = 1,
|
||||||
std_video_h265_chroma_format_idc_422 = 2,
|
STD_VIDEO_H265_CHROMA_FORMAT_IDC_422 = 2,
|
||||||
std_video_h265_chroma_format_idc_444 = 3,
|
STD_VIDEO_H265_CHROMA_FORMAT_IDC_444 = 3,
|
||||||
|
STD_VIDEO_H265_CHROMA_FORMAT_IDC_INVALID = 0x7FFFFFFF,
|
||||||
|
STD_VIDEO_H265_CHROMA_FORMAT_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||||
} StdVideoH265ChromaFormatIdc;
|
} StdVideoH265ChromaFormatIdc;
|
||||||
|
|
||||||
typedef enum StdVideoH265ProfileIdc {
|
typedef enum StdVideoH265ProfileIdc {
|
||||||
std_video_h265_profile_idc_main = 1,
|
STD_VIDEO_H265_PROFILE_IDC_MAIN = 1,
|
||||||
std_video_h265_profile_idc_main_10 = 2,
|
STD_VIDEO_H265_PROFILE_IDC_MAIN_10 = 2,
|
||||||
std_video_h265_profile_idc_main_still_picture = 3,
|
STD_VIDEO_H265_PROFILE_IDC_MAIN_STILL_PICTURE = 3,
|
||||||
std_video_h265_profile_idc_format_range_extensions = 4,
|
STD_VIDEO_H265_PROFILE_IDC_FORMAT_RANGE_EXTENSIONS = 4,
|
||||||
std_video_h265_profile_idc_scc_extensions = 9,
|
STD_VIDEO_H265_PROFILE_IDC_SCC_EXTENSIONS = 9,
|
||||||
std_video_h265_profile_idc_invalid = 0x7FFFFFFF
|
STD_VIDEO_H265_PROFILE_IDC_INVALID = 0x7FFFFFFF,
|
||||||
|
STD_VIDEO_H265_PROFILE_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||||
} StdVideoH265ProfileIdc;
|
} StdVideoH265ProfileIdc;
|
||||||
|
|
||||||
typedef enum StdVideoH265Level {
|
typedef enum StdVideoH265Level {
|
||||||
std_video_h265_level_1_0 = 0,
|
STD_VIDEO_H265_LEVEL_1_0 = 0,
|
||||||
std_video_h265_level_2_0 = 1,
|
STD_VIDEO_H265_LEVEL_2_0 = 1,
|
||||||
std_video_h265_level_2_1 = 2,
|
STD_VIDEO_H265_LEVEL_2_1 = 2,
|
||||||
std_video_h265_level_3_0 = 3,
|
STD_VIDEO_H265_LEVEL_3_0 = 3,
|
||||||
std_video_h265_level_3_1 = 4,
|
STD_VIDEO_H265_LEVEL_3_1 = 4,
|
||||||
std_video_h265_level_4_0 = 5,
|
STD_VIDEO_H265_LEVEL_4_0 = 5,
|
||||||
std_video_h265_level_4_1 = 6,
|
STD_VIDEO_H265_LEVEL_4_1 = 6,
|
||||||
std_video_h265_level_5_0 = 7,
|
STD_VIDEO_H265_LEVEL_5_0 = 7,
|
||||||
std_video_h265_level_5_1 = 8,
|
STD_VIDEO_H265_LEVEL_5_1 = 8,
|
||||||
std_video_h265_level_5_2 = 9,
|
STD_VIDEO_H265_LEVEL_5_2 = 9,
|
||||||
std_video_h265_level_6_0 = 10,
|
STD_VIDEO_H265_LEVEL_6_0 = 10,
|
||||||
std_video_h265_level_6_1 = 11,
|
STD_VIDEO_H265_LEVEL_6_1 = 11,
|
||||||
std_video_h265_level_6_2 = 12,
|
STD_VIDEO_H265_LEVEL_6_2 = 12,
|
||||||
std_video_h265_level_invalid = 0x7FFFFFFF
|
STD_VIDEO_H265_LEVEL_INVALID = 0x7FFFFFFF,
|
||||||
|
STD_VIDEO_H265_LEVEL_MAX_ENUM = 0x7FFFFFFF
|
||||||
} StdVideoH265Level;
|
} StdVideoH265Level;
|
||||||
|
|
||||||
|
typedef enum StdVideoH265SliceType {
|
||||||
|
STD_VIDEO_H265_SLICE_TYPE_B = 0,
|
||||||
|
STD_VIDEO_H265_SLICE_TYPE_P = 1,
|
||||||
|
STD_VIDEO_H265_SLICE_TYPE_I = 2,
|
||||||
|
STD_VIDEO_H265_SLICE_TYPE_INVALID = 0x7FFFFFFF,
|
||||||
|
STD_VIDEO_H265_SLICE_TYPE_MAX_ENUM = 0x7FFFFFFF
|
||||||
|
} StdVideoH265SliceType;
|
||||||
|
|
||||||
typedef struct StdVideoH265DecPicBufMgr
|
typedef enum StdVideoH265PictureType {
|
||||||
{
|
STD_VIDEO_H265_PICTURE_TYPE_P = 0,
|
||||||
uint32_t max_latency_increase_plus1[7];
|
STD_VIDEO_H265_PICTURE_TYPE_B = 1,
|
||||||
uint8_t max_dec_pic_buffering_minus1[7];
|
STD_VIDEO_H265_PICTURE_TYPE_I = 2,
|
||||||
uint8_t max_num_reorder_pics[7];
|
STD_VIDEO_H265_PICTURE_TYPE_IDR = 3,
|
||||||
|
STD_VIDEO_H265_PICTURE_TYPE_INVALID = 0x7FFFFFFF,
|
||||||
|
STD_VIDEO_H265_PICTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
|
||||||
|
} StdVideoH265PictureType;
|
||||||
|
typedef struct StdVideoH265DecPicBufMgr {
|
||||||
|
uint32_t max_latency_increase_plus1[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE];
|
||||||
|
uint8_t max_dec_pic_buffering_minus1[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE];
|
||||||
|
uint8_t max_num_reorder_pics[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE];
|
||||||
} StdVideoH265DecPicBufMgr;
|
} StdVideoH265DecPicBufMgr;
|
||||||
|
|
||||||
typedef struct StdVideoH265SubLayerHrdParameters {
|
typedef struct StdVideoH265SubLayerHrdParameters {
|
||||||
uint32_t bit_rate_value_minus1[32];
|
uint32_t bit_rate_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
|
||||||
uint32_t cpb_size_value_minus1[32];
|
uint32_t cpb_size_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
|
||||||
uint32_t cpb_size_du_value_minus1[32];
|
uint32_t cpb_size_du_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
|
||||||
uint32_t bit_rate_du_value_minus1[32];
|
uint32_t bit_rate_du_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
|
||||||
uint32_t cbr_flag; // each bit represents a range of CpbCounts (bit 0 - cpb_cnt_minus1) per sub-layer
|
uint32_t cbr_flag;
|
||||||
} StdVideoH265SubLayerHrdParameters;
|
} StdVideoH265SubLayerHrdParameters;
|
||||||
|
|
||||||
typedef struct StdVideoH265HrdFlags {
|
typedef struct StdVideoH265HrdFlags {
|
||||||
uint32_t nal_hrd_parameters_present_flag : 1;
|
uint32_t nal_hrd_parameters_present_flag : 1;
|
||||||
uint32_t vcl_hrd_parameters_present_flag : 1;
|
uint32_t vcl_hrd_parameters_present_flag : 1;
|
||||||
uint32_t sub_pic_hrd_params_present_flag : 1;
|
uint32_t sub_pic_hrd_params_present_flag : 1;
|
||||||
uint32_t sub_pic_cpb_params_in_pic_timing_sei_flag : 1;
|
uint32_t sub_pic_cpb_params_in_pic_timing_sei_flag : 1;
|
||||||
uint8_t fixed_pic_rate_general_flag; // each bit represents a sublayer, bit 0 - vps_max_sub_layers_minus1
|
uint32_t fixed_pic_rate_general_flag : 8;
|
||||||
uint8_t fixed_pic_rate_within_cvs_flag; // each bit represents a sublayer, bit 0 - vps_max_sub_layers_minus1
|
uint32_t fixed_pic_rate_within_cvs_flag : 8;
|
||||||
uint8_t low_delay_hrd_flag; // each bit represents a sublayer, bit 0 - vps_max_sub_layers_minus1
|
uint32_t low_delay_hrd_flag : 8;
|
||||||
} StdVideoH265HrdFlags;
|
} StdVideoH265HrdFlags;
|
||||||
|
|
||||||
typedef struct StdVideoH265HrdParameters {
|
typedef struct StdVideoH265HrdParameters {
|
||||||
uint8_t tick_divisor_minus2;
|
uint8_t tick_divisor_minus2;
|
||||||
uint8_t du_cpb_removal_delay_increment_length_minus1;
|
uint8_t du_cpb_removal_delay_increment_length_minus1;
|
||||||
uint8_t dpb_output_delay_du_length_minus1;
|
uint8_t dpb_output_delay_du_length_minus1;
|
||||||
uint8_t bit_rate_scale;
|
uint8_t bit_rate_scale;
|
||||||
uint8_t cpb_size_scale;
|
uint8_t cpb_size_scale;
|
||||||
uint8_t cpb_size_du_scale;
|
uint8_t cpb_size_du_scale;
|
||||||
uint8_t initial_cpb_removal_delay_length_minus1;
|
uint8_t initial_cpb_removal_delay_length_minus1;
|
||||||
uint8_t au_cpb_removal_delay_length_minus1;
|
uint8_t au_cpb_removal_delay_length_minus1;
|
||||||
uint8_t dpb_output_delay_length_minus1;
|
uint8_t dpb_output_delay_length_minus1;
|
||||||
uint8_t cpb_cnt_minus1[7];
|
uint8_t cpb_cnt_minus1[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE];
|
||||||
uint16_t elemental_duration_in_tc_minus1[7];
|
uint16_t elemental_duration_in_tc_minus1[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE];
|
||||||
StdVideoH265SubLayerHrdParameters* SubLayerHrdParametersNal[7];
|
StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersNal[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE];
|
||||||
StdVideoH265SubLayerHrdParameters* SubLayerHrdParametersVcl[7];
|
StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersVcl[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE];
|
||||||
StdVideoH265HrdFlags flags;
|
StdVideoH265HrdFlags flags;
|
||||||
} StdVideoH265HrdParameters;
|
} StdVideoH265HrdParameters;
|
||||||
|
|
||||||
typedef struct StdVideoH265VpsFlags {
|
typedef struct StdVideoH265VpsFlags {
|
||||||
uint32_t vps_temporal_id_nesting_flag : 1;
|
uint32_t vps_temporal_id_nesting_flag : 1;
|
||||||
uint32_t vps_sub_layer_ordering_info_present_flag : 1;
|
uint32_t vps_sub_layer_ordering_info_present_flag : 1;
|
||||||
uint32_t vps_timing_info_present_flag : 1;
|
uint32_t vps_timing_info_present_flag : 1;
|
||||||
uint32_t vps_poc_proportional_to_timing_flag : 1;
|
uint32_t vps_poc_proportional_to_timing_flag : 1;
|
||||||
} StdVideoH265VpsFlags;
|
} StdVideoH265VpsFlags;
|
||||||
|
|
||||||
typedef struct StdVideoH265VideoParameterSet
|
typedef struct StdVideoH265VideoParameterSet {
|
||||||
{
|
uint8_t vps_video_parameter_set_id;
|
||||||
uint8_t vps_video_parameter_set_id;
|
uint8_t vps_max_sub_layers_minus1;
|
||||||
uint8_t vps_max_sub_layers_minus1;
|
uint32_t vps_num_units_in_tick;
|
||||||
uint32_t vps_num_units_in_tick;
|
uint32_t vps_time_scale;
|
||||||
uint32_t vps_time_scale;
|
uint32_t vps_num_ticks_poc_diff_one_minus1;
|
||||||
uint32_t vps_num_ticks_poc_diff_one_minus1;
|
StdVideoH265DecPicBufMgr* pDecPicBufMgr;
|
||||||
StdVideoH265DecPicBufMgr* pDecPicBufMgr;
|
StdVideoH265HrdParameters* pHrdParameters;
|
||||||
StdVideoH265HrdParameters* hrd_parameters;
|
StdVideoH265VpsFlags flags;
|
||||||
StdVideoH265VpsFlags flags;
|
|
||||||
} StdVideoH265VideoParameterSet;
|
} StdVideoH265VideoParameterSet;
|
||||||
|
|
||||||
typedef struct StdVideoH265ScalingLists
|
typedef struct StdVideoH265ScalingLists {
|
||||||
{
|
uint8_t ScalingList4x4[STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS];
|
||||||
uint8_t ScalingList4x4[6][16]; // ScalingList[ 0 ][ MatrixID ][ i ] (sizeID = 0)
|
uint8_t ScalingList8x8[STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS];
|
||||||
uint8_t ScalingList8x8[6][64]; // ScalingList[ 1 ][ MatrixID ][ i ] (sizeID = 1)
|
uint8_t ScalingList16x16[STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS];
|
||||||
uint8_t ScalingList16x16[6][64]; // ScalingList[ 2 ][ MatrixID ][ i ] (sizeID = 2)
|
uint8_t ScalingList32x32[STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS];
|
||||||
uint8_t ScalingList32x32[2][64]; // ScalingList[ 3 ][ MatrixID ][ i ] (sizeID = 3)
|
uint8_t ScalingListDCCoef16x16[STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS];
|
||||||
uint8_t ScalingListDCCoef16x16[6]; // scaling_list_dc_coef_minus8[ sizeID - 2 ][ matrixID ] + 8, sizeID = 2
|
uint8_t ScalingListDCCoef32x32[STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS];
|
||||||
uint8_t ScalingListDCCoef32x32[2]; // scaling_list_dc_coef_minus8[ sizeID - 2 ][ matrixID ] + 8. sizeID = 3
|
|
||||||
} StdVideoH265ScalingLists;
|
} StdVideoH265ScalingLists;
|
||||||
|
|
||||||
typedef struct StdVideoH265SpsVuiFlags {
|
typedef struct StdVideoH265SpsVuiFlags {
|
||||||
uint32_t aspect_ratio_info_present_flag : 1;
|
uint32_t aspect_ratio_info_present_flag : 1;
|
||||||
uint32_t overscan_info_present_flag : 1;
|
uint32_t overscan_info_present_flag : 1;
|
||||||
uint32_t overscan_appropriate_flag : 1;
|
uint32_t overscan_appropriate_flag : 1;
|
||||||
uint32_t video_signal_type_present_flag : 1;
|
uint32_t video_signal_type_present_flag : 1;
|
||||||
uint32_t video_full_range_flag : 1;
|
uint32_t video_full_range_flag : 1;
|
||||||
uint32_t colour_description_present_flag : 1;
|
uint32_t colour_description_present_flag : 1;
|
||||||
uint32_t chroma_loc_info_present_flag : 1;
|
uint32_t chroma_loc_info_present_flag : 1;
|
||||||
uint32_t neutral_chroma_indication_flag : 1;
|
uint32_t neutral_chroma_indication_flag : 1;
|
||||||
uint32_t field_seq_flag : 1;
|
uint32_t field_seq_flag : 1;
|
||||||
uint32_t frame_field_info_present_flag : 1;
|
uint32_t frame_field_info_present_flag : 1;
|
||||||
uint32_t default_display_window_flag : 1;
|
uint32_t default_display_window_flag : 1;
|
||||||
uint32_t vui_timing_info_present_flag : 1;
|
uint32_t vui_timing_info_present_flag : 1;
|
||||||
uint32_t vui_poc_proportional_to_timing_flag : 1;
|
uint32_t vui_poc_proportional_to_timing_flag : 1;
|
||||||
uint32_t vui_hrd_parameters_present_flag : 1;
|
uint32_t vui_hrd_parameters_present_flag : 1;
|
||||||
uint32_t bitstream_restriction_flag : 1;
|
uint32_t bitstream_restriction_flag : 1;
|
||||||
uint32_t tiles_fixed_structure_flag : 1;
|
uint32_t tiles_fixed_structure_flag : 1;
|
||||||
uint32_t motion_vectors_over_pic_boundaries_flag : 1;
|
uint32_t motion_vectors_over_pic_boundaries_flag : 1;
|
||||||
uint32_t restricted_ref_pic_lists_flag : 1;
|
uint32_t restricted_ref_pic_lists_flag : 1;
|
||||||
} StdVideoH265SpsVuiFlags;
|
} StdVideoH265SpsVuiFlags;
|
||||||
|
|
||||||
typedef struct StdVideoH265SequenceParameterSetVui {
|
typedef struct StdVideoH265SequenceParameterSetVui {
|
||||||
uint8_t aspect_ratio_idc;
|
uint8_t aspect_ratio_idc;
|
||||||
uint16_t sar_width;
|
uint16_t sar_width;
|
||||||
uint16_t sar_height;
|
uint16_t sar_height;
|
||||||
uint8_t video_format;
|
uint8_t video_format;
|
||||||
uint8_t colour_primaries;
|
uint8_t colour_primaries;
|
||||||
uint8_t transfer_characteristics;
|
uint8_t transfer_characteristics;
|
||||||
uint8_t matrix_coeffs;
|
uint8_t matrix_coeffs;
|
||||||
uint8_t chroma_sample_loc_type_top_field;
|
uint8_t chroma_sample_loc_type_top_field;
|
||||||
uint8_t chroma_sample_loc_type_bottom_field;
|
uint8_t chroma_sample_loc_type_bottom_field;
|
||||||
uint16_t def_disp_win_left_offset;
|
uint16_t def_disp_win_left_offset;
|
||||||
uint16_t def_disp_win_right_offset;
|
uint16_t def_disp_win_right_offset;
|
||||||
uint16_t def_disp_win_top_offset;
|
uint16_t def_disp_win_top_offset;
|
||||||
uint16_t def_disp_win_bottom_offset;
|
uint16_t def_disp_win_bottom_offset;
|
||||||
uint32_t vui_num_units_in_tick;
|
uint32_t vui_num_units_in_tick;
|
||||||
uint32_t vui_time_scale;
|
uint32_t vui_time_scale;
|
||||||
uint32_t vui_num_ticks_poc_diff_one_minus1;
|
uint32_t vui_num_ticks_poc_diff_one_minus1;
|
||||||
StdVideoH265HrdParameters* hrd_parameters;
|
StdVideoH265HrdParameters* pHrdParameters;
|
||||||
uint16_t min_spatial_segmentation_idc;
|
uint16_t min_spatial_segmentation_idc;
|
||||||
uint8_t max_bytes_per_pic_denom;
|
uint8_t max_bytes_per_pic_denom;
|
||||||
uint8_t max_bits_per_min_cu_denom;
|
uint8_t max_bits_per_min_cu_denom;
|
||||||
uint8_t log2_max_mv_length_horizontal;
|
uint8_t log2_max_mv_length_horizontal;
|
||||||
uint8_t log2_max_mv_length_vertical;
|
uint8_t log2_max_mv_length_vertical;
|
||||||
StdVideoH265SpsVuiFlags flags;
|
StdVideoH265SpsVuiFlags flags;
|
||||||
} StdVideoH265SequenceParameterSetVui;
|
} StdVideoH265SequenceParameterSetVui;
|
||||||
|
|
||||||
typedef struct StdVideoH265PredictorPaletteEntries
|
typedef struct StdVideoH265PredictorPaletteEntries {
|
||||||
{
|
uint16_t PredictorPaletteEntries[STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE][STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE];
|
||||||
uint16_t PredictorPaletteEntries[3][128];
|
|
||||||
} StdVideoH265PredictorPaletteEntries;
|
} StdVideoH265PredictorPaletteEntries;
|
||||||
|
|
||||||
|
|
||||||
typedef struct StdVideoH265SpsFlags {
|
typedef struct StdVideoH265SpsFlags {
|
||||||
uint32_t sps_temporal_id_nesting_flag : 1;
|
uint32_t sps_temporal_id_nesting_flag : 1;
|
||||||
uint32_t separate_colour_plane_flag : 1;
|
uint32_t separate_colour_plane_flag : 1;
|
||||||
uint32_t scaling_list_enabled_flag : 1;
|
uint32_t scaling_list_enabled_flag : 1;
|
||||||
uint32_t sps_scaling_list_data_present_flag : 1;
|
uint32_t sps_scaling_list_data_present_flag : 1;
|
||||||
uint32_t amp_enabled_flag : 1;
|
uint32_t amp_enabled_flag : 1;
|
||||||
uint32_t sample_adaptive_offset_enabled_flag : 1;
|
uint32_t sample_adaptive_offset_enabled_flag : 1;
|
||||||
uint32_t pcm_enabled_flag : 1;
|
uint32_t pcm_enabled_flag : 1;
|
||||||
uint32_t pcm_loop_filter_disabled_flag : 1;
|
uint32_t pcm_loop_filter_disabled_flag : 1;
|
||||||
uint32_t long_term_ref_pics_present_flag : 1;
|
uint32_t long_term_ref_pics_present_flag : 1;
|
||||||
uint32_t sps_temporal_mvp_enabled_flag : 1;
|
uint32_t sps_temporal_mvp_enabled_flag : 1;
|
||||||
uint32_t strong_intra_smoothing_enabled_flag : 1;
|
uint32_t strong_intra_smoothing_enabled_flag : 1;
|
||||||
uint32_t vui_parameters_present_flag : 1;
|
uint32_t vui_parameters_present_flag : 1;
|
||||||
uint32_t sps_extension_present_flag : 1;
|
uint32_t sps_extension_present_flag : 1;
|
||||||
uint32_t sps_range_extension_flag : 1;
|
uint32_t sps_range_extension_flag : 1;
|
||||||
|
uint32_t transform_skip_rotation_enabled_flag : 1;
|
||||||
// extension SPS flags, valid when std_video_h265_profile_idc_format_range_extensions is set
|
uint32_t transform_skip_context_enabled_flag : 1;
|
||||||
uint32_t transform_skip_rotation_enabled_flag : 1;
|
uint32_t implicit_rdpcm_enabled_flag : 1;
|
||||||
uint32_t transform_skip_context_enabled_flag : 1;
|
uint32_t explicit_rdpcm_enabled_flag : 1;
|
||||||
uint32_t implicit_rdpcm_enabled_flag : 1;
|
uint32_t extended_precision_processing_flag : 1;
|
||||||
uint32_t explicit_rdpcm_enabled_flag : 1;
|
uint32_t intra_smoothing_disabled_flag : 1;
|
||||||
uint32_t extended_precision_processing_flag : 1;
|
uint32_t high_precision_offsets_enabled_flag : 1;
|
||||||
uint32_t intra_smoothing_disabled_flag : 1;
|
uint32_t persistent_rice_adaptation_enabled_flag : 1;
|
||||||
uint32_t high_precision_offsets_enabled_flag : 1;
|
uint32_t cabac_bypass_alignment_enabled_flag : 1;
|
||||||
uint32_t persistent_rice_adaptation_enabled_flag : 1;
|
uint32_t sps_curr_pic_ref_enabled_flag : 1;
|
||||||
uint32_t cabac_bypass_alignment_enabled_flag : 1;
|
uint32_t palette_mode_enabled_flag : 1;
|
||||||
|
uint32_t sps_palette_predictor_initializer_present_flag : 1;
|
||||||
// extension SPS flags, valid when std_video_h265_profile_idc_scc_extensions is set
|
uint32_t intra_boundary_filtering_disabled_flag : 1;
|
||||||
uint32_t sps_curr_pic_ref_enabled_flag : 1;
|
|
||||||
uint32_t palette_mode_enabled_flag : 1;
|
|
||||||
uint32_t sps_palette_predictor_initializer_present_flag : 1;
|
|
||||||
uint32_t intra_boundary_filtering_disabled_flag : 1;
|
|
||||||
} StdVideoH265SpsFlags;
|
} StdVideoH265SpsFlags;
|
||||||
|
|
||||||
typedef struct StdVideoH265SequenceParameterSet
|
typedef struct StdVideoH265SequenceParameterSet {
|
||||||
{
|
StdVideoH265ProfileIdc profile_idc;
|
||||||
StdVideoH265ProfileIdc profile_idc;
|
StdVideoH265Level level_idc;
|
||||||
StdVideoH265Level level_idc;
|
uint32_t pic_width_in_luma_samples;
|
||||||
uint32_t pic_width_in_luma_samples;
|
uint32_t pic_height_in_luma_samples;
|
||||||
uint32_t pic_height_in_luma_samples;
|
uint8_t sps_video_parameter_set_id;
|
||||||
uint8_t sps_video_parameter_set_id;
|
uint8_t sps_max_sub_layers_minus1;
|
||||||
uint8_t sps_max_sub_layers_minus1;
|
uint8_t sps_seq_parameter_set_id;
|
||||||
uint8_t sps_seq_parameter_set_id;
|
uint8_t chroma_format_idc;
|
||||||
uint8_t chroma_format_idc;
|
uint8_t bit_depth_luma_minus8;
|
||||||
uint8_t bit_depth_luma_minus8;
|
uint8_t bit_depth_chroma_minus8;
|
||||||
uint8_t bit_depth_chroma_minus8;
|
uint8_t log2_max_pic_order_cnt_lsb_minus4;
|
||||||
uint8_t log2_max_pic_order_cnt_lsb_minus4;
|
uint8_t sps_max_dec_pic_buffering_minus1;
|
||||||
uint8_t sps_max_dec_pic_buffering_minus1;
|
uint8_t log2_min_luma_coding_block_size_minus3;
|
||||||
uint8_t log2_min_luma_coding_block_size_minus3;
|
uint8_t log2_diff_max_min_luma_coding_block_size;
|
||||||
uint8_t log2_diff_max_min_luma_coding_block_size;
|
uint8_t log2_min_luma_transform_block_size_minus2;
|
||||||
uint8_t log2_min_luma_transform_block_size_minus2;
|
uint8_t log2_diff_max_min_luma_transform_block_size;
|
||||||
uint8_t log2_diff_max_min_luma_transform_block_size;
|
uint8_t max_transform_hierarchy_depth_inter;
|
||||||
uint8_t max_transform_hierarchy_depth_inter;
|
uint8_t max_transform_hierarchy_depth_intra;
|
||||||
uint8_t max_transform_hierarchy_depth_intra;
|
uint8_t num_short_term_ref_pic_sets;
|
||||||
uint8_t num_short_term_ref_pic_sets;
|
uint8_t num_long_term_ref_pics_sps;
|
||||||
uint8_t num_long_term_ref_pics_sps;
|
uint8_t pcm_sample_bit_depth_luma_minus1;
|
||||||
uint8_t pcm_sample_bit_depth_luma_minus1;
|
uint8_t pcm_sample_bit_depth_chroma_minus1;
|
||||||
uint8_t pcm_sample_bit_depth_chroma_minus1;
|
uint8_t log2_min_pcm_luma_coding_block_size_minus3;
|
||||||
uint8_t log2_min_pcm_luma_coding_block_size_minus3;
|
uint8_t log2_diff_max_min_pcm_luma_coding_block_size;
|
||||||
uint8_t log2_diff_max_min_pcm_luma_coding_block_size;
|
uint32_t conf_win_left_offset;
|
||||||
uint32_t conf_win_left_offset;
|
uint32_t conf_win_right_offset;
|
||||||
uint32_t conf_win_right_offset;
|
uint32_t conf_win_top_offset;
|
||||||
uint32_t conf_win_top_offset;
|
uint32_t conf_win_bottom_offset;
|
||||||
uint32_t conf_win_bottom_offset;
|
StdVideoH265DecPicBufMgr* pDecPicBufMgr;
|
||||||
StdVideoH265DecPicBufMgr* pDecPicBufMgr;
|
StdVideoH265SpsFlags flags;
|
||||||
StdVideoH265SpsFlags flags;
|
StdVideoH265ScalingLists* pScalingLists;
|
||||||
StdVideoH265ScalingLists* pScalingLists; // Must be a valid pointer if sps_scaling_list_data_present_flag is set
|
StdVideoH265SequenceParameterSetVui* pSequenceParameterSetVui;
|
||||||
StdVideoH265SequenceParameterSetVui* pSequenceParameterSetVui; // Must be a valid pointer if StdVideoH265SpsFlags:vui_parameters_present_flag is set palette_max_size;
|
uint8_t palette_max_size;
|
||||||
|
uint8_t delta_palette_max_predictor_size;
|
||||||
// extension SPS flags, valid when std_video_h265_profile_idc_scc_extensions is set
|
uint8_t motion_vector_resolution_control_idc;
|
||||||
uint8_t palette_max_size;
|
uint8_t sps_num_palette_predictor_initializer_minus1;
|
||||||
uint8_t delta_palette_max_predictor_size;
|
StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries;
|
||||||
uint8_t motion_vector_resolution_control_idc;
|
|
||||||
uint8_t sps_num_palette_predictor_initializer_minus1;
|
|
||||||
StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries; // Must be a valid pointer if sps_palette_predictor_initializer_present_flag is set
|
|
||||||
} StdVideoH265SequenceParameterSet;
|
} StdVideoH265SequenceParameterSet;
|
||||||
|
|
||||||
|
|
||||||
typedef struct StdVideoH265PpsFlags {
|
typedef struct StdVideoH265PpsFlags {
|
||||||
uint32_t dependent_slice_segments_enabled_flag : 1;
|
uint32_t dependent_slice_segments_enabled_flag : 1;
|
||||||
uint32_t output_flag_present_flag : 1;
|
uint32_t output_flag_present_flag : 1;
|
||||||
uint32_t sign_data_hiding_enabled_flag : 1;
|
uint32_t sign_data_hiding_enabled_flag : 1;
|
||||||
uint32_t cabac_init_present_flag : 1;
|
uint32_t cabac_init_present_flag : 1;
|
||||||
uint32_t constrained_intra_pred_flag : 1;
|
uint32_t constrained_intra_pred_flag : 1;
|
||||||
uint32_t transform_skip_enabled_flag : 1;
|
uint32_t transform_skip_enabled_flag : 1;
|
||||||
uint32_t cu_qp_delta_enabled_flag : 1;
|
uint32_t cu_qp_delta_enabled_flag : 1;
|
||||||
uint32_t pps_slice_chroma_qp_offsets_present_flag : 1;
|
uint32_t pps_slice_chroma_qp_offsets_present_flag : 1;
|
||||||
uint32_t weighted_pred_flag : 1;
|
uint32_t weighted_pred_flag : 1;
|
||||||
uint32_t weighted_bipred_flag : 1;
|
uint32_t weighted_bipred_flag : 1;
|
||||||
uint32_t transquant_bypass_enabled_flag : 1;
|
uint32_t transquant_bypass_enabled_flag : 1;
|
||||||
uint32_t tiles_enabled_flag : 1;
|
uint32_t tiles_enabled_flag : 1;
|
||||||
uint32_t entropy_coding_sync_enabled_flag : 1;
|
uint32_t entropy_coding_sync_enabled_flag : 1;
|
||||||
uint32_t uniform_spacing_flag : 1;
|
uint32_t uniform_spacing_flag : 1;
|
||||||
uint32_t loop_filter_across_tiles_enabled_flag : 1;
|
uint32_t loop_filter_across_tiles_enabled_flag : 1;
|
||||||
uint32_t pps_loop_filter_across_slices_enabled_flag : 1;
|
uint32_t pps_loop_filter_across_slices_enabled_flag : 1;
|
||||||
uint32_t deblocking_filter_control_present_flag : 1;
|
uint32_t deblocking_filter_control_present_flag : 1;
|
||||||
uint32_t deblocking_filter_override_enabled_flag : 1;
|
uint32_t deblocking_filter_override_enabled_flag : 1;
|
||||||
uint32_t pps_deblocking_filter_disabled_flag : 1;
|
uint32_t pps_deblocking_filter_disabled_flag : 1;
|
||||||
uint32_t pps_scaling_list_data_present_flag : 1;
|
uint32_t pps_scaling_list_data_present_flag : 1;
|
||||||
uint32_t lists_modification_present_flag : 1;
|
uint32_t lists_modification_present_flag : 1;
|
||||||
uint32_t slice_segment_header_extension_present_flag : 1;
|
uint32_t slice_segment_header_extension_present_flag : 1;
|
||||||
uint32_t pps_extension_present_flag : 1;
|
uint32_t pps_extension_present_flag : 1;
|
||||||
|
uint32_t cross_component_prediction_enabled_flag : 1;
|
||||||
// extension PPS flags, valid when std_video_h265_profile_idc_format_range_extensions is set
|
uint32_t chroma_qp_offset_list_enabled_flag : 1;
|
||||||
uint32_t cross_component_prediction_enabled_flag : 1;
|
uint32_t pps_curr_pic_ref_enabled_flag : 1;
|
||||||
uint32_t chroma_qp_offset_list_enabled_flag : 1;
|
uint32_t residual_adaptive_colour_transform_enabled_flag : 1;
|
||||||
|
uint32_t pps_slice_act_qp_offsets_present_flag : 1;
|
||||||
// extension PPS flags, valid when std_video_h265_profile_idc_scc_extensions is set
|
uint32_t pps_palette_predictor_initializer_present_flag : 1;
|
||||||
uint32_t pps_curr_pic_ref_enabled_flag : 1;
|
uint32_t monochrome_palette_flag : 1;
|
||||||
uint32_t residual_adaptive_colour_transform_enabled_flag : 1;
|
uint32_t pps_range_extension_flag : 1;
|
||||||
uint32_t pps_slice_act_qp_offsets_present_flag : 1;
|
|
||||||
uint32_t pps_palette_predictor_initializer_present_flag : 1;
|
|
||||||
uint32_t monochrome_palette_flag : 1;
|
|
||||||
uint32_t pps_range_extension_flag : 1;
|
|
||||||
} StdVideoH265PpsFlags;
|
} StdVideoH265PpsFlags;
|
||||||
|
|
||||||
typedef struct StdVideoH265PictureParameterSet
|
typedef struct StdVideoH265PictureParameterSet {
|
||||||
{
|
uint8_t pps_pic_parameter_set_id;
|
||||||
uint8_t pps_pic_parameter_set_id;
|
uint8_t pps_seq_parameter_set_id;
|
||||||
uint8_t pps_seq_parameter_set_id;
|
uint8_t num_extra_slice_header_bits;
|
||||||
uint8_t num_extra_slice_header_bits;
|
uint8_t num_ref_idx_l0_default_active_minus1;
|
||||||
uint8_t num_ref_idx_l0_default_active_minus1;
|
uint8_t num_ref_idx_l1_default_active_minus1;
|
||||||
uint8_t num_ref_idx_l1_default_active_minus1;
|
int8_t init_qp_minus26;
|
||||||
int8_t init_qp_minus26;
|
uint8_t diff_cu_qp_delta_depth;
|
||||||
uint8_t diff_cu_qp_delta_depth;
|
int8_t pps_cb_qp_offset;
|
||||||
int8_t pps_cb_qp_offset;
|
int8_t pps_cr_qp_offset;
|
||||||
int8_t pps_cr_qp_offset;
|
uint8_t num_tile_columns_minus1;
|
||||||
uint8_t num_tile_columns_minus1;
|
uint8_t num_tile_rows_minus1;
|
||||||
uint8_t num_tile_rows_minus1;
|
uint16_t column_width_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE];
|
||||||
uint16_t column_width_minus1[19];
|
uint16_t row_height_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE];
|
||||||
uint16_t row_height_minus1[21];
|
int8_t pps_beta_offset_div2;
|
||||||
int8_t pps_beta_offset_div2;
|
int8_t pps_tc_offset_div2;
|
||||||
int8_t pps_tc_offset_div2;
|
uint8_t log2_parallel_merge_level_minus2;
|
||||||
uint8_t log2_parallel_merge_level_minus2;
|
StdVideoH265PpsFlags flags;
|
||||||
StdVideoH265PpsFlags flags;
|
StdVideoH265ScalingLists* pScalingLists;
|
||||||
StdVideoH265ScalingLists* pScalingLists; // Must be a valid pointer if pps_scaling_list_data_present_flag is set
|
uint8_t log2_max_transform_skip_block_size_minus2;
|
||||||
|
uint8_t diff_cu_chroma_qp_offset_depth;
|
||||||
// extension PPS, valid when std_video_h265_profile_idc_format_range_extensions is set
|
uint8_t chroma_qp_offset_list_len_minus1;
|
||||||
uint8_t log2_max_transform_skip_block_size_minus2;
|
int8_t cb_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE];
|
||||||
uint8_t diff_cu_chroma_qp_offset_depth;
|
int8_t cr_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE];
|
||||||
uint8_t chroma_qp_offset_list_len_minus1;
|
uint8_t log2_sao_offset_scale_luma;
|
||||||
int8_t cb_qp_offset_list[6];
|
uint8_t log2_sao_offset_scale_chroma;
|
||||||
int8_t cr_qp_offset_list[6];
|
int8_t pps_act_y_qp_offset_plus5;
|
||||||
uint8_t log2_sao_offset_scale_luma;
|
int8_t pps_act_cb_qp_offset_plus5;
|
||||||
uint8_t log2_sao_offset_scale_chroma;
|
int8_t pps_act_cr_qp_offset_plus5;
|
||||||
|
uint8_t pps_num_palette_predictor_initializer;
|
||||||
// extension PPS, valid when std_video_h265_profile_idc_scc_extensions is set
|
uint8_t luma_bit_depth_entry_minus8;
|
||||||
int8_t pps_act_y_qp_offset_plus5;
|
uint8_t chroma_bit_depth_entry_minus8;
|
||||||
int8_t pps_act_cb_qp_offset_plus5;
|
StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries;
|
||||||
int8_t pps_act_cr_qp_offset_plus5;
|
|
||||||
uint8_t pps_num_palette_predictor_initializer;
|
|
||||||
uint8_t luma_bit_depth_entry_minus8;
|
|
||||||
uint8_t chroma_bit_depth_entry_minus8;
|
|
||||||
StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries; // Must be a valid pointer if pps_palette_predictor_initializer_present_flag is set
|
|
||||||
} StdVideoH265PictureParameterSet;
|
} StdVideoH265PictureParameterSet;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // VULKAN_VIDEO_CODEC_H265STD_H_
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,59 +1,60 @@
|
||||||
|
#ifndef VULKAN_VIDEO_CODEC_H265STD_DECODE_H_
|
||||||
|
#define VULKAN_VIDEO_CODEC_H265STD_DECODE_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright (c) 2019-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef VULKAN_VIDEO_CODEC_H265STD_DECODE_H_
|
/*
|
||||||
#define VULKAN_VIDEO_CODEC_H265STD_DECODE_H_ 1
|
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "vk_video/vulkan_video_codec_h265std.h"
|
|
||||||
|
|
||||||
// *************************************************
|
|
||||||
// Video h265 Decode related parameters:
|
|
||||||
// *************************************************
|
|
||||||
|
|
||||||
|
#define vulkan_video_codec_h265std_decode 1
|
||||||
|
#define STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE 8
|
||||||
typedef struct StdVideoDecodeH265PictureInfoFlags {
|
typedef struct StdVideoDecodeH265PictureInfoFlags {
|
||||||
uint32_t IrapPicFlag : 1;
|
uint32_t IrapPicFlag : 1;
|
||||||
uint32_t IdrPicFlag : 1;
|
uint32_t IdrPicFlag : 1;
|
||||||
uint32_t IsReference : 1;
|
uint32_t IsReference : 1;
|
||||||
uint32_t short_term_ref_pic_set_sps_flag : 1;
|
uint32_t short_term_ref_pic_set_sps_flag : 1;
|
||||||
} StdVideoDecodeH265PictureInfoFlags;
|
} StdVideoDecodeH265PictureInfoFlags;
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH265PictureInfo {
|
typedef struct StdVideoDecodeH265PictureInfo {
|
||||||
uint8_t vps_video_parameter_set_id;
|
uint8_t vps_video_parameter_set_id;
|
||||||
uint8_t sps_seq_parameter_set_id;
|
uint8_t sps_seq_parameter_set_id;
|
||||||
uint8_t pps_pic_parameter_set_id;
|
uint8_t pps_pic_parameter_set_id;
|
||||||
uint8_t num_short_term_ref_pic_sets;
|
uint8_t num_short_term_ref_pic_sets;
|
||||||
int32_t PicOrderCntVal;
|
int32_t PicOrderCntVal;
|
||||||
uint16_t NumBitsForSTRefPicSetInSlice; // number of bits used in st_ref_pic_set()
|
uint16_t NumBitsForSTRefPicSetInSlice;
|
||||||
//when short_term_ref_pic_set_sps_flag is 0; otherwise set to 0.
|
uint8_t NumDeltaPocsOfRefRpsIdx;
|
||||||
uint8_t NumDeltaPocsOfRefRpsIdx; // NumDeltaPocs[ RefRpsIdx ] when short_term_ref_pic_set_sps_flag = 1, otherwise 0
|
uint8_t RefPicSetStCurrBefore[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE];
|
||||||
uint8_t RefPicSetStCurrBefore[8]; // slotIndex as used in VkVideoReferenceSlotKHR structures representing
|
uint8_t RefPicSetStCurrAfter[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE];
|
||||||
//pReferenceSlots in VkVideoDecodeInfoKHR, 0xff for invalid slotIndex
|
uint8_t RefPicSetLtCurr[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE];
|
||||||
uint8_t RefPicSetStCurrAfter[8]; // slotIndex as used in VkVideoReferenceSlotKHR structures representing
|
StdVideoDecodeH265PictureInfoFlags flags;
|
||||||
//pReferenceSlots in VkVideoDecodeInfoKHR, 0xff for invalid slotIndex
|
|
||||||
uint8_t RefPicSetLtCurr[8]; // slotIndex as used in VkVideoReferenceSlotKHR structures representing
|
|
||||||
//pReferenceSlots in VkVideoDecodeInfoKHR, 0xff for invalid slotIndex
|
|
||||||
StdVideoDecodeH265PictureInfoFlags flags;
|
|
||||||
} StdVideoDecodeH265PictureInfo;
|
} StdVideoDecodeH265PictureInfo;
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH265ReferenceInfoFlags {
|
typedef struct StdVideoDecodeH265ReferenceInfoFlags {
|
||||||
uint32_t is_long_term : 1;
|
uint32_t is_long_term : 1;
|
||||||
uint32_t is_non_existing : 1;
|
uint32_t is_non_existing : 1;
|
||||||
} StdVideoDecodeH265ReferenceInfoFlags;
|
} StdVideoDecodeH265ReferenceInfoFlags;
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH265ReferenceInfo {
|
typedef struct StdVideoDecodeH265ReferenceInfo {
|
||||||
int32_t PicOrderCntVal;
|
int32_t PicOrderCntVal;
|
||||||
StdVideoDecodeH265ReferenceInfoFlags flags;
|
StdVideoDecodeH265ReferenceInfoFlags flags;
|
||||||
} StdVideoDecodeH265ReferenceInfo;
|
} StdVideoDecodeH265ReferenceInfo;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // VULKAN_VIDEO_CODEC_H265STD_DECODE_H_
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,125 @@
|
||||||
|
#ifndef VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_
|
||||||
|
#define VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_ 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
|
**
|
||||||
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define vulkan_video_codec_h265std_encode 1
|
||||||
|
#define STD_VIDEO_ENCODE_H265_LUMA_LIST_SIZE 15
|
||||||
|
#define STD_VIDEO_ENCODE_H265_CHROMA_LIST_SIZE 15
|
||||||
|
#define STD_VIDEO_ENCODE_H265_CHROMA_LISTS_NUM 2
|
||||||
|
typedef struct StdVideoEncodeH265SliceSegmentHeaderFlags {
|
||||||
|
uint32_t first_slice_segment_in_pic_flag : 1;
|
||||||
|
uint32_t no_output_of_prior_pics_flag : 1;
|
||||||
|
uint32_t dependent_slice_segment_flag : 1;
|
||||||
|
uint32_t short_term_ref_pic_set_sps_flag : 1;
|
||||||
|
uint32_t slice_temporal_mvp_enable_flag : 1;
|
||||||
|
uint32_t slice_sao_luma_flag : 1;
|
||||||
|
uint32_t slice_sao_chroma_flag : 1;
|
||||||
|
uint32_t num_ref_idx_active_override_flag : 1;
|
||||||
|
uint32_t mvd_l1_zero_flag : 1;
|
||||||
|
uint32_t cabac_init_flag : 1;
|
||||||
|
uint32_t slice_deblocking_filter_disable_flag : 1;
|
||||||
|
uint32_t collocated_from_l0_flag : 1;
|
||||||
|
uint32_t slice_loop_filter_across_slices_enabled_flag : 1;
|
||||||
|
uint32_t bLastSliceInPic : 1;
|
||||||
|
uint32_t reservedBits : 18;
|
||||||
|
uint16_t luma_weight_l0_flag;
|
||||||
|
uint16_t chroma_weight_l0_flag;
|
||||||
|
uint16_t luma_weight_l1_flag;
|
||||||
|
uint16_t chroma_weight_l1_flag;
|
||||||
|
} StdVideoEncodeH265SliceSegmentHeaderFlags;
|
||||||
|
|
||||||
|
typedef struct StdVideoEncodeH265SliceSegmentHeader {
|
||||||
|
StdVideoH265SliceType slice_type;
|
||||||
|
uint8_t slice_pic_parameter_set_id;
|
||||||
|
uint8_t num_short_term_ref_pic_sets;
|
||||||
|
uint32_t slice_segment_address;
|
||||||
|
uint8_t short_term_ref_pic_set_idx;
|
||||||
|
uint8_t num_long_term_sps;
|
||||||
|
uint8_t num_long_term_pics;
|
||||||
|
uint8_t collocated_ref_idx;
|
||||||
|
uint8_t num_ref_idx_l0_active_minus1;
|
||||||
|
uint8_t num_ref_idx_l1_active_minus1;
|
||||||
|
uint8_t luma_log2_weight_denom;
|
||||||
|
int8_t delta_chroma_log2_weight_denom;
|
||||||
|
int8_t delta_luma_weight_l0[STD_VIDEO_ENCODE_H265_LUMA_LIST_SIZE];
|
||||||
|
int8_t luma_offset_l0[STD_VIDEO_ENCODE_H265_LUMA_LIST_SIZE];
|
||||||
|
int8_t delta_chroma_weight_l0[STD_VIDEO_ENCODE_H265_CHROMA_LIST_SIZE][STD_VIDEO_ENCODE_H265_CHROMA_LISTS_NUM];
|
||||||
|
int8_t delta_chroma_offset_l0[STD_VIDEO_ENCODE_H265_CHROMA_LIST_SIZE][STD_VIDEO_ENCODE_H265_CHROMA_LISTS_NUM];
|
||||||
|
int8_t delta_luma_weight_l1[STD_VIDEO_ENCODE_H265_LUMA_LIST_SIZE];
|
||||||
|
int8_t luma_offset_l1[STD_VIDEO_ENCODE_H265_LUMA_LIST_SIZE];
|
||||||
|
int8_t delta_chroma_weight_l1[STD_VIDEO_ENCODE_H265_CHROMA_LIST_SIZE][STD_VIDEO_ENCODE_H265_CHROMA_LISTS_NUM];
|
||||||
|
int8_t delta_chroma_offset_l1[STD_VIDEO_ENCODE_H265_CHROMA_LIST_SIZE][STD_VIDEO_ENCODE_H265_CHROMA_LISTS_NUM];
|
||||||
|
uint8_t MaxNumMergeCand;
|
||||||
|
int8_t slice_qp_delta;
|
||||||
|
int8_t slice_cb_qp_offset;
|
||||||
|
int8_t slice_cr_qp_offset;
|
||||||
|
int8_t slice_beta_offset_div2;
|
||||||
|
int8_t slice_tc_offset_div2;
|
||||||
|
int8_t slice_act_y_qp_offset;
|
||||||
|
int8_t slice_act_cb_qp_offset;
|
||||||
|
int8_t slice_act_cr_qp_offset;
|
||||||
|
StdVideoEncodeH265SliceSegmentHeaderFlags flags;
|
||||||
|
} StdVideoEncodeH265SliceSegmentHeader;
|
||||||
|
|
||||||
|
typedef struct StdVideoEncodeH265ReferenceModificationFlags {
|
||||||
|
uint32_t ref_pic_list_modification_flag_l0 : 1;
|
||||||
|
uint32_t ref_pic_list_modification_flag_l1 : 1;
|
||||||
|
} StdVideoEncodeH265ReferenceModificationFlags;
|
||||||
|
|
||||||
|
typedef struct StdVideoEncodeH265ReferenceModifications {
|
||||||
|
StdVideoEncodeH265ReferenceModificationFlags flags;
|
||||||
|
uint8_t referenceList0ModificationsCount;
|
||||||
|
uint8_t* pReferenceList0Modifications;
|
||||||
|
uint8_t referenceList1ModificationsCount;
|
||||||
|
uint8_t* pReferenceList1Modifications;
|
||||||
|
} StdVideoEncodeH265ReferenceModifications;
|
||||||
|
|
||||||
|
typedef struct StdVideoEncodeH265PictureInfoFlags {
|
||||||
|
uint32_t is_reference_flag : 1;
|
||||||
|
uint32_t IrapPicFlag : 1;
|
||||||
|
uint32_t long_term_flag : 1;
|
||||||
|
} StdVideoEncodeH265PictureInfoFlags;
|
||||||
|
|
||||||
|
typedef struct StdVideoEncodeH265PictureInfo {
|
||||||
|
StdVideoH265PictureType PictureType;
|
||||||
|
uint8_t sps_video_parameter_set_id;
|
||||||
|
uint8_t pps_seq_parameter_set_id;
|
||||||
|
int32_t PicOrderCntVal;
|
||||||
|
uint8_t TemporalId;
|
||||||
|
StdVideoEncodeH265PictureInfoFlags flags;
|
||||||
|
} StdVideoEncodeH265PictureInfo;
|
||||||
|
|
||||||
|
typedef struct StdVideoEncodeH265ReferenceInfoFlags {
|
||||||
|
uint32_t is_long_term : 1;
|
||||||
|
uint32_t isUsedFlag : 1;
|
||||||
|
} StdVideoEncodeH265ReferenceInfoFlags;
|
||||||
|
|
||||||
|
typedef struct StdVideoEncodeH265ReferenceInfo {
|
||||||
|
int32_t PicOrderCntVal;
|
||||||
|
uint8_t TemporalId;
|
||||||
|
StdVideoEncodeH265ReferenceInfoFlags flags;
|
||||||
|
} StdVideoEncodeH265ReferenceInfo;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -1,21 +1,31 @@
|
||||||
|
#ifndef VULKAN_VIDEO_CODECS_COMMON_H_
|
||||||
|
#define VULKAN_VIDEO_CODECS_COMMON_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright (c) 2019-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef VULKAN_VIDEO_CODEC_COMMON_H_
|
/*
|
||||||
#define VULKAN_VIDEO_CODEC_COMMON_H_ 1
|
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define vulkan_video_codecs_common 1
|
||||||
#define VK_MAKE_VIDEO_STD_VERSION(major, minor, patch) \
|
#define VK_MAKE_VIDEO_STD_VERSION(major, minor, patch) \
|
||||||
((((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch)))
|
((((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch)))
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // VULKAN_VIDEO_CODEC_COMMON_H_
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
// Version 2 - Add Loader/ICD Interface version negotiation
|
// Version 2 - Add Loader/ICD Interface version negotiation
|
||||||
// via vk_icdNegotiateLoaderICDInterfaceVersion.
|
// via vk_icdNegotiateLoaderICDInterfaceVersion.
|
||||||
// Version 3 - Add ICD creation/destruction of KHR_surface objects.
|
// Version 3 - Add ICD creation/destruction of KHR_surface objects.
|
||||||
// Version 4 - Add unknown physical device extension qyering via
|
// Version 4 - Add unknown physical device extension querying via
|
||||||
// vk_icdGetPhysicalDeviceProcAddr.
|
// vk_icdGetPhysicalDeviceProcAddr.
|
||||||
// Version 5 - Tells ICDs that the loader is now paying attention to the
|
// Version 5 - Tells ICDs that the loader is now paying attention to the
|
||||||
// application version of Vulkan passed into the ApplicationInfo
|
// application version of Vulkan passed into the ApplicationInfo
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// File: vk_platform.h
|
// File: vk_platform.h
|
||||||
//
|
//
|
||||||
/*
|
/*
|
||||||
** Copyright 2014-2021 The Khronos Group Inc.
|
** Copyright 2014-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -42,7 +42,7 @@ extern "C"
|
||||||
#define VKAPI_CALL __stdcall
|
#define VKAPI_CALL __stdcall
|
||||||
#define VKAPI_PTR VKAPI_CALL
|
#define VKAPI_PTR VKAPI_CALL
|
||||||
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
|
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
|
||||||
#error "Vulkan isn't supported for the 'armeabi' NDK ABI"
|
#error "Vulkan is not supported for the 'armeabi' NDK ABI"
|
||||||
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
|
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
|
||||||
// On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
|
// On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
|
||||||
// calling convention, i.e. float parameters are passed in registers. This
|
// calling convention, i.e. float parameters are passed in registers. This
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#define VULKAN_H_ 1
|
#define VULKAN_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright 2015-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -2,7 +2,7 @@
|
||||||
#define VULKAN_ANDROID_H_ 1
|
#define VULKAN_ANDROID_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright 2015-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -44,7 +44,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
|
||||||
|
|
||||||
#define VK_ANDROID_external_memory_android_hardware_buffer 1
|
#define VK_ANDROID_external_memory_android_hardware_buffer 1
|
||||||
struct AHardwareBuffer;
|
struct AHardwareBuffer;
|
||||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3
|
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 4
|
||||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
|
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
|
||||||
typedef struct VkAndroidHardwareBufferUsageANDROID {
|
typedef struct VkAndroidHardwareBufferUsageANDROID {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
|
|
@ -90,6 +90,19 @@ typedef struct VkExternalFormatANDROID {
|
||||||
uint64_t externalFormat;
|
uint64_t externalFormat;
|
||||||
} VkExternalFormatANDROID;
|
} VkExternalFormatANDROID;
|
||||||
|
|
||||||
|
typedef struct VkAndroidHardwareBufferFormatProperties2ANDROID {
|
||||||
|
VkStructureType sType;
|
||||||
|
void* pNext;
|
||||||
|
VkFormat format;
|
||||||
|
uint64_t externalFormat;
|
||||||
|
VkFormatFeatureFlags2 formatFeatures;
|
||||||
|
VkComponentMapping samplerYcbcrConversionComponents;
|
||||||
|
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
|
||||||
|
VkSamplerYcbcrRange suggestedYcbcrRange;
|
||||||
|
VkChromaLocation suggestedXChromaOffset;
|
||||||
|
VkChromaLocation suggestedYChromaOffset;
|
||||||
|
} VkAndroidHardwareBufferFormatProperties2ANDROID;
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
|
typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
|
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#define VULKAN_BETA_H_ 1
|
#define VULKAN_BETA_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright 2015-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -37,6 +37,9 @@ typedef enum VkVideoCodecOperationFlagBitsKHR {
|
||||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||||
VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT = 0x00010000,
|
VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT = 0x00010000,
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||||
|
VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_EXT = 0x00020000,
|
||||||
|
#endif
|
||||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||||
VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_EXT = 0x00000001,
|
VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_EXT = 0x00000001,
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -90,13 +93,18 @@ typedef enum VkVideoCodingControlFlagBitsKHR {
|
||||||
typedef VkFlags VkVideoCodingControlFlagsKHR;
|
typedef VkFlags VkVideoCodingControlFlagsKHR;
|
||||||
|
|
||||||
typedef enum VkVideoCodingQualityPresetFlagBitsKHR {
|
typedef enum VkVideoCodingQualityPresetFlagBitsKHR {
|
||||||
VK_VIDEO_CODING_QUALITY_PRESET_DEFAULT_BIT_KHR = 0,
|
|
||||||
VK_VIDEO_CODING_QUALITY_PRESET_NORMAL_BIT_KHR = 0x00000001,
|
VK_VIDEO_CODING_QUALITY_PRESET_NORMAL_BIT_KHR = 0x00000001,
|
||||||
VK_VIDEO_CODING_QUALITY_PRESET_POWER_BIT_KHR = 0x00000002,
|
VK_VIDEO_CODING_QUALITY_PRESET_POWER_BIT_KHR = 0x00000002,
|
||||||
VK_VIDEO_CODING_QUALITY_PRESET_QUALITY_BIT_KHR = 0x00000004,
|
VK_VIDEO_CODING_QUALITY_PRESET_QUALITY_BIT_KHR = 0x00000004,
|
||||||
VK_VIDEO_CODING_QUALITY_PRESET_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
VK_VIDEO_CODING_QUALITY_PRESET_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||||
} VkVideoCodingQualityPresetFlagBitsKHR;
|
} VkVideoCodingQualityPresetFlagBitsKHR;
|
||||||
typedef VkFlags VkVideoCodingQualityPresetFlagsKHR;
|
typedef VkFlags VkVideoCodingQualityPresetFlagsKHR;
|
||||||
|
typedef struct VkQueueFamilyQueryResultStatusProperties2KHR {
|
||||||
|
VkStructureType sType;
|
||||||
|
void* pNext;
|
||||||
|
VkBool32 supported;
|
||||||
|
} VkQueueFamilyQueryResultStatusProperties2KHR;
|
||||||
|
|
||||||
typedef struct VkVideoQueueFamilyProperties2KHR {
|
typedef struct VkVideoQueueFamilyProperties2KHR {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
void* pNext;
|
void* pNext;
|
||||||
|
|
@ -305,7 +313,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdControlVideoCodingKHR(
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_video_decode_queue 1
|
#define VK_KHR_video_decode_queue 1
|
||||||
#define VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION 1
|
#define VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION 2
|
||||||
#define VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME "VK_KHR_video_decode_queue"
|
#define VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME "VK_KHR_video_decode_queue"
|
||||||
|
|
||||||
typedef enum VkVideoDecodeFlagBitsKHR {
|
typedef enum VkVideoDecodeFlagBitsKHR {
|
||||||
|
|
@ -370,7 +378,7 @@ typedef struct VkPhysicalDevicePortabilitySubsetPropertiesKHR {
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_video_encode_queue 1
|
#define VK_KHR_video_encode_queue 1
|
||||||
#define VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION 2
|
#define VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION 3
|
||||||
#define VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME "VK_KHR_video_encode_queue"
|
#define VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME "VK_KHR_video_encode_queue"
|
||||||
|
|
||||||
typedef enum VkVideoEncodeFlagBitsKHR {
|
typedef enum VkVideoEncodeFlagBitsKHR {
|
||||||
|
|
@ -382,7 +390,7 @@ typedef VkFlags VkVideoEncodeFlagsKHR;
|
||||||
|
|
||||||
typedef enum VkVideoEncodeRateControlFlagBitsKHR {
|
typedef enum VkVideoEncodeRateControlFlagBitsKHR {
|
||||||
VK_VIDEO_ENCODE_RATE_CONTROL_DEFAULT_KHR = 0,
|
VK_VIDEO_ENCODE_RATE_CONTROL_DEFAULT_KHR = 0,
|
||||||
VK_VIDEO_ENCODE_RATE_CONTROL_RESET_BIT_KHR = 0x00000001,
|
VK_VIDEO_ENCODE_RATE_CONTROL_RESERVED_0_BIT_KHR = 0x00000001,
|
||||||
VK_VIDEO_ENCODE_RATE_CONTROL_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
VK_VIDEO_ENCODE_RATE_CONTROL_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||||
} VkVideoEncodeRateControlFlagBitsKHR;
|
} VkVideoEncodeRateControlFlagBitsKHR;
|
||||||
typedef VkFlags VkVideoEncodeRateControlFlagsKHR;
|
typedef VkFlags VkVideoEncodeRateControlFlagsKHR;
|
||||||
|
|
@ -407,18 +415,27 @@ typedef struct VkVideoEncodeInfoKHR {
|
||||||
const VkVideoReferenceSlotKHR* pSetupReferenceSlot;
|
const VkVideoReferenceSlotKHR* pSetupReferenceSlot;
|
||||||
uint32_t referenceSlotCount;
|
uint32_t referenceSlotCount;
|
||||||
const VkVideoReferenceSlotKHR* pReferenceSlots;
|
const VkVideoReferenceSlotKHR* pReferenceSlots;
|
||||||
|
uint32_t precedingExternallyEncodedBytes;
|
||||||
} VkVideoEncodeInfoKHR;
|
} VkVideoEncodeInfoKHR;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeRateControlLayerInfoKHR {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
uint32_t averageBitrate;
|
||||||
|
uint32_t maxBitrate;
|
||||||
|
uint32_t frameRateNumerator;
|
||||||
|
uint32_t frameRateDenominator;
|
||||||
|
uint32_t virtualBufferSizeInMs;
|
||||||
|
uint32_t initialVirtualBufferSizeInMs;
|
||||||
|
} VkVideoEncodeRateControlLayerInfoKHR;
|
||||||
|
|
||||||
typedef struct VkVideoEncodeRateControlInfoKHR {
|
typedef struct VkVideoEncodeRateControlInfoKHR {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
VkVideoEncodeRateControlFlagsKHR flags;
|
VkVideoEncodeRateControlFlagsKHR flags;
|
||||||
VkVideoEncodeRateControlModeFlagBitsKHR rateControlMode;
|
VkVideoEncodeRateControlModeFlagBitsKHR rateControlMode;
|
||||||
uint32_t averageBitrate;
|
uint8_t layerCount;
|
||||||
uint16_t peakToAverageBitrateRatio;
|
const VkVideoEncodeRateControlLayerInfoKHR* pLayerConfigs;
|
||||||
uint16_t frameRateNumerator;
|
|
||||||
uint16_t frameRateDenominator;
|
|
||||||
uint32_t virtualBufferSizeInMs;
|
|
||||||
} VkVideoEncodeRateControlInfoKHR;
|
} VkVideoEncodeRateControlInfoKHR;
|
||||||
|
|
||||||
typedef void (VKAPI_PTR *PFN_vkCmdEncodeVideoKHR)(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo);
|
typedef void (VKAPI_PTR *PFN_vkCmdEncodeVideoKHR)(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo);
|
||||||
|
|
@ -433,7 +450,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdEncodeVideoKHR(
|
||||||
#define VK_EXT_video_encode_h264 1
|
#define VK_EXT_video_encode_h264 1
|
||||||
#include "vk_video/vulkan_video_codec_h264std.h"
|
#include "vk_video/vulkan_video_codec_h264std.h"
|
||||||
#include "vk_video/vulkan_video_codec_h264std_encode.h"
|
#include "vk_video/vulkan_video_codec_h264std_encode.h"
|
||||||
#define VK_EXT_VIDEO_ENCODE_H264_SPEC_VERSION 2
|
#define VK_EXT_VIDEO_ENCODE_H264_SPEC_VERSION 3
|
||||||
#define VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME "VK_EXT_video_encode_h264"
|
#define VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME "VK_EXT_video_encode_h264"
|
||||||
|
|
||||||
typedef enum VkVideoEncodeH264CapabilityFlagBitsEXT {
|
typedef enum VkVideoEncodeH264CapabilityFlagBitsEXT {
|
||||||
|
|
@ -474,6 +491,14 @@ typedef enum VkVideoEncodeH264CreateFlagBitsEXT {
|
||||||
VK_VIDEO_ENCODE_H264_CREATE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
VK_VIDEO_ENCODE_H264_CREATE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||||
} VkVideoEncodeH264CreateFlagBitsEXT;
|
} VkVideoEncodeH264CreateFlagBitsEXT;
|
||||||
typedef VkFlags VkVideoEncodeH264CreateFlagsEXT;
|
typedef VkFlags VkVideoEncodeH264CreateFlagsEXT;
|
||||||
|
|
||||||
|
typedef enum VkVideoEncodeH264RateControlStructureFlagBitsEXT {
|
||||||
|
VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = 0,
|
||||||
|
VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_FLAT_BIT_EXT = 0x00000001,
|
||||||
|
VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_DYADIC_BIT_EXT = 0x00000002,
|
||||||
|
VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||||
|
} VkVideoEncodeH264RateControlStructureFlagBitsEXT;
|
||||||
|
typedef VkFlags VkVideoEncodeH264RateControlStructureFlagsEXT;
|
||||||
typedef struct VkVideoEncodeH264CapabilitiesEXT {
|
typedef struct VkVideoEncodeH264CapabilitiesEXT {
|
||||||
VkStructureType sType;
|
VkStructureType sType;
|
||||||
const void* pNext;
|
const void* pNext;
|
||||||
|
|
@ -531,9 +556,6 @@ typedef struct VkVideoEncodeH264NaluSliceEXT {
|
||||||
const VkVideoEncodeH264DpbSlotInfoEXT* pRefFinalList0Entries;
|
const VkVideoEncodeH264DpbSlotInfoEXT* pRefFinalList0Entries;
|
||||||
uint8_t refFinalList1EntryCount;
|
uint8_t refFinalList1EntryCount;
|
||||||
const VkVideoEncodeH264DpbSlotInfoEXT* pRefFinalList1Entries;
|
const VkVideoEncodeH264DpbSlotInfoEXT* pRefFinalList1Entries;
|
||||||
uint32_t precedingNaluBytes;
|
|
||||||
uint8_t minQp;
|
|
||||||
uint8_t maxQp;
|
|
||||||
} VkVideoEncodeH264NaluSliceEXT;
|
} VkVideoEncodeH264NaluSliceEXT;
|
||||||
|
|
||||||
typedef struct VkVideoEncodeH264VclFrameInfoEXT {
|
typedef struct VkVideoEncodeH264VclFrameInfoEXT {
|
||||||
|
|
@ -563,6 +585,214 @@ typedef struct VkVideoEncodeH264ProfileEXT {
|
||||||
StdVideoH264ProfileIdc stdProfileIdc;
|
StdVideoH264ProfileIdc stdProfileIdc;
|
||||||
} VkVideoEncodeH264ProfileEXT;
|
} VkVideoEncodeH264ProfileEXT;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeH264RateControlInfoEXT {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
uint32_t gopFrameCount;
|
||||||
|
uint32_t idrPeriod;
|
||||||
|
uint32_t consecutiveBFrameCount;
|
||||||
|
VkVideoEncodeH264RateControlStructureFlagBitsEXT rateControlStructure;
|
||||||
|
uint8_t temporalLayerCount;
|
||||||
|
} VkVideoEncodeH264RateControlInfoEXT;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeH264QpEXT {
|
||||||
|
int32_t qpI;
|
||||||
|
int32_t qpP;
|
||||||
|
int32_t qpB;
|
||||||
|
} VkVideoEncodeH264QpEXT;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeH264FrameSizeEXT {
|
||||||
|
uint32_t frameISize;
|
||||||
|
uint32_t framePSize;
|
||||||
|
uint32_t frameBSize;
|
||||||
|
} VkVideoEncodeH264FrameSizeEXT;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeH264RateControlLayerInfoEXT {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
uint8_t temporalLayerId;
|
||||||
|
VkBool32 useInitialRcQp;
|
||||||
|
VkVideoEncodeH264QpEXT initialRcQp;
|
||||||
|
VkBool32 useMinQp;
|
||||||
|
VkVideoEncodeH264QpEXT minQp;
|
||||||
|
VkBool32 useMaxQp;
|
||||||
|
VkVideoEncodeH264QpEXT maxQp;
|
||||||
|
VkBool32 useMaxFrameSize;
|
||||||
|
VkVideoEncodeH264FrameSizeEXT maxFrameSize;
|
||||||
|
} VkVideoEncodeH264RateControlLayerInfoEXT;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define VK_EXT_video_encode_h265 1
|
||||||
|
#include "vk_video/vulkan_video_codec_h265std.h"
|
||||||
|
#include "vk_video/vulkan_video_codec_h265std_encode.h"
|
||||||
|
#define VK_EXT_VIDEO_ENCODE_H265_SPEC_VERSION 4
|
||||||
|
#define VK_EXT_VIDEO_ENCODE_H265_EXTENSION_NAME "VK_EXT_video_encode_h265"
|
||||||
|
typedef VkFlags VkVideoEncodeH265CapabilityFlagsEXT;
|
||||||
|
|
||||||
|
typedef enum VkVideoEncodeH265InputModeFlagBitsEXT {
|
||||||
|
VK_VIDEO_ENCODE_H265_INPUT_MODE_FRAME_BIT_EXT = 0x00000001,
|
||||||
|
VK_VIDEO_ENCODE_H265_INPUT_MODE_SLICE_SEGMENT_BIT_EXT = 0x00000002,
|
||||||
|
VK_VIDEO_ENCODE_H265_INPUT_MODE_NON_VCL_BIT_EXT = 0x00000004,
|
||||||
|
VK_VIDEO_ENCODE_H265_INPUT_MODE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||||
|
} VkVideoEncodeH265InputModeFlagBitsEXT;
|
||||||
|
typedef VkFlags VkVideoEncodeH265InputModeFlagsEXT;
|
||||||
|
|
||||||
|
typedef enum VkVideoEncodeH265OutputModeFlagBitsEXT {
|
||||||
|
VK_VIDEO_ENCODE_H265_OUTPUT_MODE_FRAME_BIT_EXT = 0x00000001,
|
||||||
|
VK_VIDEO_ENCODE_H265_OUTPUT_MODE_SLICE_SEGMENT_BIT_EXT = 0x00000002,
|
||||||
|
VK_VIDEO_ENCODE_H265_OUTPUT_MODE_NON_VCL_BIT_EXT = 0x00000004,
|
||||||
|
VK_VIDEO_ENCODE_H265_OUTPUT_MODE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||||
|
} VkVideoEncodeH265OutputModeFlagBitsEXT;
|
||||||
|
typedef VkFlags VkVideoEncodeH265OutputModeFlagsEXT;
|
||||||
|
typedef VkFlags VkVideoEncodeH265CreateFlagsEXT;
|
||||||
|
|
||||||
|
typedef enum VkVideoEncodeH265CtbSizeFlagBitsEXT {
|
||||||
|
VK_VIDEO_ENCODE_H265_CTB_SIZE_8_BIT_EXT = 0x00000001,
|
||||||
|
VK_VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_EXT = 0x00000002,
|
||||||
|
VK_VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_EXT = 0x00000004,
|
||||||
|
VK_VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_EXT = 0x00000008,
|
||||||
|
VK_VIDEO_ENCODE_H265_CTB_SIZE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||||
|
} VkVideoEncodeH265CtbSizeFlagBitsEXT;
|
||||||
|
typedef VkFlags VkVideoEncodeH265CtbSizeFlagsEXT;
|
||||||
|
|
||||||
|
typedef enum VkVideoEncodeH265RateControlStructureFlagBitsEXT {
|
||||||
|
VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = 0,
|
||||||
|
VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_FLAT_BIT_EXT = 0x00000001,
|
||||||
|
VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_DYADIC_BIT_EXT = 0x00000002,
|
||||||
|
VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||||
|
} VkVideoEncodeH265RateControlStructureFlagBitsEXT;
|
||||||
|
typedef VkFlags VkVideoEncodeH265RateControlStructureFlagsEXT;
|
||||||
|
typedef struct VkVideoEncodeH265CapabilitiesEXT {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
VkVideoEncodeH265CapabilityFlagsEXT flags;
|
||||||
|
VkVideoEncodeH265InputModeFlagsEXT inputModeFlags;
|
||||||
|
VkVideoEncodeH265OutputModeFlagsEXT outputModeFlags;
|
||||||
|
VkVideoEncodeH265CtbSizeFlagsEXT ctbSizes;
|
||||||
|
VkExtent2D inputImageDataAlignment;
|
||||||
|
uint8_t maxNumL0ReferenceForP;
|
||||||
|
uint8_t maxNumL0ReferenceForB;
|
||||||
|
uint8_t maxNumL1Reference;
|
||||||
|
uint8_t maxNumSubLayers;
|
||||||
|
uint8_t qualityLevelCount;
|
||||||
|
VkExtensionProperties stdExtensionVersion;
|
||||||
|
} VkVideoEncodeH265CapabilitiesEXT;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeH265SessionCreateInfoEXT {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
VkVideoEncodeH265CreateFlagsEXT flags;
|
||||||
|
const VkExtensionProperties* pStdExtensionVersion;
|
||||||
|
} VkVideoEncodeH265SessionCreateInfoEXT;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeH265SessionParametersAddInfoEXT {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
uint32_t vpsStdCount;
|
||||||
|
const StdVideoH265VideoParameterSet* pVpsStd;
|
||||||
|
uint32_t spsStdCount;
|
||||||
|
const StdVideoH265SequenceParameterSet* pSpsStd;
|
||||||
|
uint32_t ppsStdCount;
|
||||||
|
const StdVideoH265PictureParameterSet* pPpsStd;
|
||||||
|
} VkVideoEncodeH265SessionParametersAddInfoEXT;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeH265SessionParametersCreateInfoEXT {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
uint32_t maxVpsStdCount;
|
||||||
|
uint32_t maxSpsStdCount;
|
||||||
|
uint32_t maxPpsStdCount;
|
||||||
|
const VkVideoEncodeH265SessionParametersAddInfoEXT* pParametersAddInfo;
|
||||||
|
} VkVideoEncodeH265SessionParametersCreateInfoEXT;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeH265DpbSlotInfoEXT {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
int8_t slotIndex;
|
||||||
|
const StdVideoEncodeH265ReferenceInfo* pStdReferenceInfo;
|
||||||
|
} VkVideoEncodeH265DpbSlotInfoEXT;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeH265ReferenceListsEXT {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
uint8_t referenceList0EntryCount;
|
||||||
|
const VkVideoEncodeH265DpbSlotInfoEXT* pReferenceList0Entries;
|
||||||
|
uint8_t referenceList1EntryCount;
|
||||||
|
const VkVideoEncodeH265DpbSlotInfoEXT* pReferenceList1Entries;
|
||||||
|
const StdVideoEncodeH265ReferenceModifications* pReferenceModifications;
|
||||||
|
} VkVideoEncodeH265ReferenceListsEXT;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeH265NaluSliceSegmentEXT {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
uint32_t ctbCount;
|
||||||
|
const VkVideoEncodeH265ReferenceListsEXT* pReferenceFinalLists;
|
||||||
|
const StdVideoEncodeH265SliceSegmentHeader* pSliceSegmentHeaderStd;
|
||||||
|
} VkVideoEncodeH265NaluSliceSegmentEXT;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeH265VclFrameInfoEXT {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
const VkVideoEncodeH265ReferenceListsEXT* pReferenceFinalLists;
|
||||||
|
uint32_t naluSliceSegmentEntryCount;
|
||||||
|
const VkVideoEncodeH265NaluSliceSegmentEXT* pNaluSliceSegmentEntries;
|
||||||
|
const StdVideoEncodeH265PictureInfo* pCurrentPictureInfo;
|
||||||
|
} VkVideoEncodeH265VclFrameInfoEXT;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeH265EmitPictureParametersEXT {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
uint8_t vpsId;
|
||||||
|
uint8_t spsId;
|
||||||
|
VkBool32 emitVpsEnable;
|
||||||
|
VkBool32 emitSpsEnable;
|
||||||
|
uint32_t ppsIdEntryCount;
|
||||||
|
const uint8_t* ppsIdEntries;
|
||||||
|
} VkVideoEncodeH265EmitPictureParametersEXT;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeH265ProfileEXT {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
StdVideoH265ProfileIdc stdProfileIdc;
|
||||||
|
} VkVideoEncodeH265ProfileEXT;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeH265RateControlInfoEXT {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
uint32_t gopFrameCount;
|
||||||
|
uint32_t idrPeriod;
|
||||||
|
uint32_t consecutiveBFrameCount;
|
||||||
|
VkVideoEncodeH265RateControlStructureFlagBitsEXT rateControlStructure;
|
||||||
|
uint8_t subLayerCount;
|
||||||
|
} VkVideoEncodeH265RateControlInfoEXT;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeH265QpEXT {
|
||||||
|
int32_t qpI;
|
||||||
|
int32_t qpP;
|
||||||
|
int32_t qpB;
|
||||||
|
} VkVideoEncodeH265QpEXT;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeH265FrameSizeEXT {
|
||||||
|
uint32_t frameISize;
|
||||||
|
uint32_t framePSize;
|
||||||
|
uint32_t frameBSize;
|
||||||
|
} VkVideoEncodeH265FrameSizeEXT;
|
||||||
|
|
||||||
|
typedef struct VkVideoEncodeH265RateControlLayerInfoEXT {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
uint8_t temporalId;
|
||||||
|
VkBool32 useInitialRcQp;
|
||||||
|
VkVideoEncodeH265QpEXT initialRcQp;
|
||||||
|
VkBool32 useMinQp;
|
||||||
|
VkVideoEncodeH265QpEXT minQp;
|
||||||
|
VkBool32 useMaxQp;
|
||||||
|
VkVideoEncodeH265QpEXT maxQp;
|
||||||
|
VkBool32 useMaxFrameSize;
|
||||||
|
VkVideoEncodeH265FrameSizeEXT maxFrameSize;
|
||||||
|
} VkVideoEncodeH265RateControlLayerInfoEXT;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_EXT_video_decode_h264 1
|
#define VK_EXT_video_decode_h264 1
|
||||||
|
|
@ -640,7 +870,6 @@ typedef struct VkVideoDecodeH264DpbSlotInfoEXT {
|
||||||
|
|
||||||
|
|
||||||
#define VK_EXT_video_decode_h265 1
|
#define VK_EXT_video_decode_h265 1
|
||||||
#include "vk_video/vulkan_video_codec_h265std.h"
|
|
||||||
#include "vk_video/vulkan_video_codec_h265std_decode.h"
|
#include "vk_video/vulkan_video_codec_h265std_decode.h"
|
||||||
#define VK_EXT_VIDEO_DECODE_H265_SPEC_VERSION 1
|
#define VK_EXT_VIDEO_DECODE_H265_SPEC_VERSION 1
|
||||||
#define VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME "VK_EXT_video_decode_h265"
|
#define VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME "VK_EXT_video_decode_h265"
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -2,7 +2,7 @@
|
||||||
#define VULKAN_DIRECTFB_H_ 1
|
#define VULKAN_DIRECTFB_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright 2015-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -2,7 +2,7 @@
|
||||||
#define VULKAN_FUCHSIA_H_ 1
|
#define VULKAN_FUCHSIA_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright 2015-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -114,6 +114,143 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreZirconHandleFUCHSIA(
|
||||||
zx_handle_t* pZirconHandle);
|
zx_handle_t* pZirconHandle);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#define VK_FUCHSIA_buffer_collection 1
|
||||||
|
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferCollectionFUCHSIA)
|
||||||
|
#define VK_FUCHSIA_BUFFER_COLLECTION_SPEC_VERSION 2
|
||||||
|
#define VK_FUCHSIA_BUFFER_COLLECTION_EXTENSION_NAME "VK_FUCHSIA_buffer_collection"
|
||||||
|
typedef VkFlags VkImageFormatConstraintsFlagsFUCHSIA;
|
||||||
|
|
||||||
|
typedef enum VkImageConstraintsInfoFlagBitsFUCHSIA {
|
||||||
|
VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA = 0x00000001,
|
||||||
|
VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA = 0x00000002,
|
||||||
|
VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA = 0x00000004,
|
||||||
|
VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA = 0x00000008,
|
||||||
|
VK_IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA = 0x00000010,
|
||||||
|
VK_IMAGE_CONSTRAINTS_INFO_FLAG_BITS_MAX_ENUM_FUCHSIA = 0x7FFFFFFF
|
||||||
|
} VkImageConstraintsInfoFlagBitsFUCHSIA;
|
||||||
|
typedef VkFlags VkImageConstraintsInfoFlagsFUCHSIA;
|
||||||
|
typedef struct VkBufferCollectionCreateInfoFUCHSIA {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
zx_handle_t collectionToken;
|
||||||
|
} VkBufferCollectionCreateInfoFUCHSIA;
|
||||||
|
|
||||||
|
typedef struct VkImportMemoryBufferCollectionFUCHSIA {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
VkBufferCollectionFUCHSIA collection;
|
||||||
|
uint32_t index;
|
||||||
|
} VkImportMemoryBufferCollectionFUCHSIA;
|
||||||
|
|
||||||
|
typedef struct VkBufferCollectionImageCreateInfoFUCHSIA {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
VkBufferCollectionFUCHSIA collection;
|
||||||
|
uint32_t index;
|
||||||
|
} VkBufferCollectionImageCreateInfoFUCHSIA;
|
||||||
|
|
||||||
|
typedef struct VkBufferCollectionConstraintsInfoFUCHSIA {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
uint32_t minBufferCount;
|
||||||
|
uint32_t maxBufferCount;
|
||||||
|
uint32_t minBufferCountForCamping;
|
||||||
|
uint32_t minBufferCountForDedicatedSlack;
|
||||||
|
uint32_t minBufferCountForSharedSlack;
|
||||||
|
} VkBufferCollectionConstraintsInfoFUCHSIA;
|
||||||
|
|
||||||
|
typedef struct VkBufferConstraintsInfoFUCHSIA {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
VkBufferCreateInfo createInfo;
|
||||||
|
VkFormatFeatureFlags requiredFormatFeatures;
|
||||||
|
VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints;
|
||||||
|
} VkBufferConstraintsInfoFUCHSIA;
|
||||||
|
|
||||||
|
typedef struct VkBufferCollectionBufferCreateInfoFUCHSIA {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
VkBufferCollectionFUCHSIA collection;
|
||||||
|
uint32_t index;
|
||||||
|
} VkBufferCollectionBufferCreateInfoFUCHSIA;
|
||||||
|
|
||||||
|
typedef struct VkSysmemColorSpaceFUCHSIA {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
uint32_t colorSpace;
|
||||||
|
} VkSysmemColorSpaceFUCHSIA;
|
||||||
|
|
||||||
|
typedef struct VkBufferCollectionPropertiesFUCHSIA {
|
||||||
|
VkStructureType sType;
|
||||||
|
void* pNext;
|
||||||
|
uint32_t memoryTypeBits;
|
||||||
|
uint32_t bufferCount;
|
||||||
|
uint32_t createInfoIndex;
|
||||||
|
uint64_t sysmemPixelFormat;
|
||||||
|
VkFormatFeatureFlags formatFeatures;
|
||||||
|
VkSysmemColorSpaceFUCHSIA sysmemColorSpaceIndex;
|
||||||
|
VkComponentMapping samplerYcbcrConversionComponents;
|
||||||
|
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
|
||||||
|
VkSamplerYcbcrRange suggestedYcbcrRange;
|
||||||
|
VkChromaLocation suggestedXChromaOffset;
|
||||||
|
VkChromaLocation suggestedYChromaOffset;
|
||||||
|
} VkBufferCollectionPropertiesFUCHSIA;
|
||||||
|
|
||||||
|
typedef struct VkImageFormatConstraintsInfoFUCHSIA {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
VkImageCreateInfo imageCreateInfo;
|
||||||
|
VkFormatFeatureFlags requiredFormatFeatures;
|
||||||
|
VkImageFormatConstraintsFlagsFUCHSIA flags;
|
||||||
|
uint64_t sysmemPixelFormat;
|
||||||
|
uint32_t colorSpaceCount;
|
||||||
|
const VkSysmemColorSpaceFUCHSIA* pColorSpaces;
|
||||||
|
} VkImageFormatConstraintsInfoFUCHSIA;
|
||||||
|
|
||||||
|
typedef struct VkImageConstraintsInfoFUCHSIA {
|
||||||
|
VkStructureType sType;
|
||||||
|
const void* pNext;
|
||||||
|
uint32_t formatConstraintsCount;
|
||||||
|
const VkImageFormatConstraintsInfoFUCHSIA* pFormatConstraints;
|
||||||
|
VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints;
|
||||||
|
VkImageConstraintsInfoFlagsFUCHSIA flags;
|
||||||
|
} VkImageConstraintsInfoFUCHSIA;
|
||||||
|
|
||||||
|
typedef VkResult (VKAPI_PTR *PFN_vkCreateBufferCollectionFUCHSIA)(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferCollectionFUCHSIA* pCollection);
|
||||||
|
typedef VkResult (VKAPI_PTR *PFN_vkSetBufferCollectionImageConstraintsFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo);
|
||||||
|
typedef VkResult (VKAPI_PTR *PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo);
|
||||||
|
typedef void (VKAPI_PTR *PFN_vkDestroyBufferCollectionFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkAllocationCallbacks* pAllocator);
|
||||||
|
typedef VkResult (VKAPI_PTR *PFN_vkGetBufferCollectionPropertiesFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties);
|
||||||
|
|
||||||
|
#ifndef VK_NO_PROTOTYPES
|
||||||
|
VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferCollectionFUCHSIA(
|
||||||
|
VkDevice device,
|
||||||
|
const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo,
|
||||||
|
const VkAllocationCallbacks* pAllocator,
|
||||||
|
VkBufferCollectionFUCHSIA* pCollection);
|
||||||
|
|
||||||
|
VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionImageConstraintsFUCHSIA(
|
||||||
|
VkDevice device,
|
||||||
|
VkBufferCollectionFUCHSIA collection,
|
||||||
|
const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo);
|
||||||
|
|
||||||
|
VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionBufferConstraintsFUCHSIA(
|
||||||
|
VkDevice device,
|
||||||
|
VkBufferCollectionFUCHSIA collection,
|
||||||
|
const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo);
|
||||||
|
|
||||||
|
VKAPI_ATTR void VKAPI_CALL vkDestroyBufferCollectionFUCHSIA(
|
||||||
|
VkDevice device,
|
||||||
|
VkBufferCollectionFUCHSIA collection,
|
||||||
|
const VkAllocationCallbacks* pAllocator);
|
||||||
|
|
||||||
|
VKAPI_ATTR VkResult VKAPI_CALL vkGetBufferCollectionPropertiesFUCHSIA(
|
||||||
|
VkDevice device,
|
||||||
|
VkBufferCollectionFUCHSIA collection,
|
||||||
|
VkBufferCollectionPropertiesFUCHSIA* pProperties);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -2,7 +2,7 @@
|
||||||
#define VULKAN_GGP_H_ 1
|
#define VULKAN_GGP_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright 2015-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -2,7 +2,7 @@
|
||||||
#define VULKAN_IOS_H_ 1
|
#define VULKAN_IOS_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright 2015-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#define VULKAN_MACOS_H_ 1
|
#define VULKAN_MACOS_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright 2015-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#define VULKAN_METAL_H_ 1
|
#define VULKAN_METAL_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright 2015-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -2,7 +2,7 @@
|
||||||
#define VULKAN_SCREEN_H_ 1
|
#define VULKAN_SCREEN_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright 2015-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -2,7 +2,7 @@
|
||||||
#define VULKAN_VI_H_ 1
|
#define VULKAN_VI_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright 2015-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#define VULKAN_WAYLAND_H_ 1
|
#define VULKAN_WAYLAND_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright 2015-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#define VULKAN_WIN32_H_ 1
|
#define VULKAN_WIN32_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright 2015-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#define VULKAN_XCB_H_ 1
|
#define VULKAN_XCB_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright 2015-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#define VULKAN_XLIB_H_ 1
|
#define VULKAN_XLIB_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright 2015-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#define VULKAN_XLIB_XRANDR_H_ 1
|
#define VULKAN_XLIB_XRANDR_H_ 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright 2015-2021 The Khronos Group Inc.
|
** Copyright 2015-2022 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue