mirror of
https://github.com/RPCSX/SPIRV-Tools.git
synced 2024-12-05 01:57:14 +00:00
Use quotation for libspirv.h and sort headers.
This commit is contained in:
parent
7a222e4abf
commit
923f6c13fc
@ -27,7 +27,7 @@
|
|||||||
#ifndef LIBSPIRV_ASSEMBLY_GRAMMAR_H_
|
#ifndef LIBSPIRV_ASSEMBLY_GRAMMAR_H_
|
||||||
#define LIBSPIRV_ASSEMBLY_GRAMMAR_H_
|
#define LIBSPIRV_ASSEMBLY_GRAMMAR_H_
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
#include "libspirv/libspirv.h"
|
||||||
#include "operand.h"
|
#include "operand.h"
|
||||||
#include "table.h"
|
#include "table.h"
|
||||||
|
|
||||||
|
@ -31,11 +31,11 @@
|
|||||||
#include <limits>
|
#include <limits>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
|
||||||
#include "assembly_grammar.h"
|
#include "assembly_grammar.h"
|
||||||
#include "diagnostic.h"
|
#include "diagnostic.h"
|
||||||
#include "endian.h"
|
#include "endian.h"
|
||||||
#include "ext_inst.h"
|
#include "ext_inst.h"
|
||||||
|
#include "libspirv/libspirv.h"
|
||||||
#include "opcode.h"
|
#include "opcode.h"
|
||||||
#include "operand.h"
|
#include "operand.h"
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
|
||||||
#include "diagnostic.h"
|
#include "diagnostic.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -32,6 +31,8 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#include "libspirv/libspirv.h"
|
||||||
|
|
||||||
// Diagnostic API
|
// Diagnostic API
|
||||||
|
|
||||||
spv_diagnostic spvDiagnosticCreate(const spv_position position,
|
spv_diagnostic spvDiagnosticCreate(const spv_position position,
|
||||||
|
@ -27,12 +27,12 @@
|
|||||||
#ifndef LIBSPIRV_DIAGNOSTIC_H_
|
#ifndef LIBSPIRV_DIAGNOSTIC_H_
|
||||||
#define LIBSPIRV_DIAGNOSTIC_H_
|
#define LIBSPIRV_DIAGNOSTIC_H_
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
#include "libspirv/libspirv.h"
|
||||||
|
|
||||||
class diagnostic_helper {
|
class diagnostic_helper {
|
||||||
public:
|
public:
|
||||||
diagnostic_helper(spv_position_t& position, spv_diagnostic* pDiagnostic)
|
diagnostic_helper(spv_position_t& position, spv_diagnostic* pDiagnostic)
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#ifndef LIBSPIRV_ENDIAN_H_
|
#ifndef LIBSPIRV_ENDIAN_H_
|
||||||
#define LIBSPIRV_ENDIAN_H_
|
#define LIBSPIRV_ENDIAN_H_
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
#include "libspirv/libspirv.h"
|
||||||
|
|
||||||
/// @brief Fix the endianness of a word
|
/// @brief Fix the endianness of a word
|
||||||
///
|
///
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#ifndef LIBSPIRV_EXT_INST_H_
|
#ifndef LIBSPIRV_EXT_INST_H_
|
||||||
#define LIBSPIRV_EXT_INST_H_
|
#define LIBSPIRV_EXT_INST_H_
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
#include "libspirv/libspirv.h"
|
||||||
#include "table.h"
|
#include "table.h"
|
||||||
|
|
||||||
/// @brief Get the type from the extended instruction library string
|
/// @brief Get the type from the extended instruction library string
|
||||||
|
@ -32,6 +32,8 @@
|
|||||||
|
|
||||||
#include <headers/spirv.h>
|
#include <headers/spirv.h>
|
||||||
|
|
||||||
|
#include "table.h"
|
||||||
|
|
||||||
// Describes an instruction.
|
// Describes an instruction.
|
||||||
struct spv_instruction_t {
|
struct spv_instruction_t {
|
||||||
// Normally, both opcode and extInstType contain valid data.
|
// Normally, both opcode and extInstType contain valid data.
|
||||||
|
@ -24,14 +24,15 @@
|
|||||||
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
|
||||||
#include "endian.h"
|
|
||||||
#include "instruction.h"
|
|
||||||
#include "opcode.h"
|
#include "opcode.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "endian.h"
|
||||||
|
#include "instruction.h"
|
||||||
|
#include "libspirv/libspirv.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
// Descriptions of each opcode. Each entry describes the format of the
|
// Descriptions of each opcode. Each entry describes the format of the
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#define LIBSPIRV_OPCODE_H_
|
#define LIBSPIRV_OPCODE_H_
|
||||||
|
|
||||||
#include "instruction.h"
|
#include "instruction.h"
|
||||||
#include <libspirv/libspirv.h>
|
#include "libspirv/libspirv.h"
|
||||||
#include "table.h"
|
#include "table.h"
|
||||||
|
|
||||||
// Functions
|
// Functions
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
#include "libspirv/libspirv.h"
|
||||||
#include "table.h"
|
#include "table.h"
|
||||||
|
|
||||||
/// @brief A sequence of operand types.
|
/// @brief A sequence of operand types.
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#ifndef LIBSPIRV_TABLE_H_
|
#ifndef LIBSPIRV_TABLE_H_
|
||||||
#define LIBSPIRV_TABLE_H_
|
#define LIBSPIRV_TABLE_H_
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
#include "libspirv/libspirv.h"
|
||||||
|
|
||||||
typedef struct spv_opcode_desc_t {
|
typedef struct spv_opcode_desc_t {
|
||||||
const char* name;
|
const char* name;
|
||||||
|
@ -38,12 +38,12 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
|
||||||
#include "assembly_grammar.h"
|
#include "assembly_grammar.h"
|
||||||
#include "binary.h"
|
#include "binary.h"
|
||||||
#include "diagnostic.h"
|
#include "diagnostic.h"
|
||||||
#include "ext_inst.h"
|
#include "ext_inst.h"
|
||||||
#include "instruction.h"
|
#include "instruction.h"
|
||||||
|
#include "libspirv/libspirv.h"
|
||||||
#include "opcode.h"
|
#include "opcode.h"
|
||||||
#include "operand.h"
|
#include "operand.h"
|
||||||
#include "table.h"
|
#include "table.h"
|
||||||
|
@ -27,11 +27,11 @@
|
|||||||
#ifndef LIBSPIRV_TEXT_H_
|
#ifndef LIBSPIRV_TEXT_H_
|
||||||
#define LIBSPIRV_TEXT_H_
|
#define LIBSPIRV_TEXT_H_
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
|
||||||
#include "operand.h"
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "libspirv/libspirv.h"
|
||||||
|
#include "operand.h"
|
||||||
|
|
||||||
// Structures
|
// Structures
|
||||||
|
|
||||||
typedef enum spv_literal_type_t {
|
typedef enum spv_literal_type_t {
|
||||||
|
@ -32,9 +32,9 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
|
||||||
#include "diagnostic.h"
|
#include "diagnostic.h"
|
||||||
#include "instruction.h"
|
#include "instruction.h"
|
||||||
|
#include "libspirv/libspirv.h"
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
|
|
||||||
namespace libspirv {
|
namespace libspirv {
|
||||||
|
@ -24,13 +24,6 @@
|
|||||||
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
|
||||||
#include "binary.h"
|
|
||||||
#include "diagnostic.h"
|
|
||||||
#include "endian.h"
|
|
||||||
#include "instruction.h"
|
|
||||||
#include "opcode.h"
|
|
||||||
#include "operand.h"
|
|
||||||
#include "validate.h"
|
#include "validate.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -39,6 +32,14 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "binary.h"
|
||||||
|
#include "diagnostic.h"
|
||||||
|
#include "endian.h"
|
||||||
|
#include "instruction.h"
|
||||||
|
#include "libspirv/libspirv.h"
|
||||||
|
#include "opcode.h"
|
||||||
|
#include "operand.h"
|
||||||
|
|
||||||
#define spvCheckReturn(expression) \
|
#define spvCheckReturn(expression) \
|
||||||
if (spv_result_t error = (expression)) return error;
|
if (spv_result_t error = (expression)) return error;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#define LIBSPIRV_VALIDATE_H_
|
#define LIBSPIRV_VALIDATE_H_
|
||||||
|
|
||||||
#include "instruction.h"
|
#include "instruction.h"
|
||||||
#include <libspirv/libspirv.h>
|
#include "libspirv/libspirv.h"
|
||||||
#include "table.h"
|
#include "table.h"
|
||||||
|
|
||||||
// Structures
|
// Structures
|
||||||
|
@ -24,18 +24,18 @@
|
|||||||
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
|
||||||
#include "diagnostic.h"
|
|
||||||
#include "instruction.h"
|
|
||||||
#include "opcode.h"
|
|
||||||
#include "validate.h"
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "diagnostic.h"
|
||||||
|
#include "instruction.h"
|
||||||
|
#include "libspirv/libspirv.h"
|
||||||
|
#include "opcode.h"
|
||||||
|
#include "validate.h"
|
||||||
|
|
||||||
#define spvCheck(condition, action) \
|
#define spvCheck(condition, action) \
|
||||||
if (condition) { \
|
if (condition) { \
|
||||||
action; \
|
action; \
|
||||||
|
@ -27,7 +27,11 @@
|
|||||||
#ifndef LIBSPIRV_TEST_UNITSPIRV_H_
|
#ifndef LIBSPIRV_TEST_UNITSPIRV_H_
|
||||||
#define LIBSPIRV_TEST_UNITSPIRV_H_
|
#define LIBSPIRV_TEST_UNITSPIRV_H_
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <iomanip>
|
||||||
|
|
||||||
|
#include "libspirv/libspirv.h"
|
||||||
#include "../source/assembly_grammar.h"
|
#include "../source/assembly_grammar.h"
|
||||||
#include "../source/binary.h"
|
#include "../source/binary.h"
|
||||||
#include "../source/diagnostic.h"
|
#include "../source/diagnostic.h"
|
||||||
@ -37,7 +41,7 @@
|
|||||||
#include "../source/text_handler.h"
|
#include "../source/text_handler.h"
|
||||||
#include "../source/validate.h"
|
#include "../source/validate.h"
|
||||||
|
|
||||||
#include <iomanip>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@ -51,10 +55,6 @@ std::string to_string(const T& val) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
// Determine endianness & predicate tests on it
|
// Determine endianness & predicate tests on it
|
||||||
enum {
|
enum {
|
||||||
I32_ENDIAN_LITTLE = 0x03020100ul,
|
I32_ENDIAN_LITTLE = 0x03020100ul,
|
||||||
|
@ -24,11 +24,12 @@
|
|||||||
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "libspirv/libspirv.h"
|
||||||
|
|
||||||
void print_usage(char* argv0) {
|
void print_usage(char* argv0) {
|
||||||
printf(
|
printf(
|
||||||
"Assemble a *.svasm file into a *.sv binary.\n\n"
|
"Assemble a *.svasm file into a *.sv binary.\n\n"
|
||||||
|
@ -24,11 +24,12 @@
|
|||||||
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "libspirv/libspirv.h"
|
||||||
|
|
||||||
void print_usage(char* argv0) {
|
void print_usage(char* argv0) {
|
||||||
printf(
|
printf(
|
||||||
"Dissassemble a *.sv file into a *.svasm text file.\n\n"
|
"Dissassemble a *.sv file into a *.svasm text file.\n\n"
|
||||||
|
@ -24,14 +24,14 @@
|
|||||||
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
|
||||||
#include <libspirv/libspirv.h>
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "libspirv/libspirv.h"
|
||||||
|
|
||||||
void print_usage(char* argv0) {
|
void print_usage(char* argv0) {
|
||||||
printf(
|
printf(
|
||||||
"Validate a SPIR-V binary file.\n\n"
|
"Validate a SPIR-V binary file.\n\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user