RetroArch
external_interface.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015-2017 ARM Limited
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef SPIRV_CROSS_EXTERNAL_INTERFACE_H
18 #define SPIRV_CROSS_EXTERNAL_INTERFACE_H
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 #include <stddef.h>
25 
27 
29 {
30  spirv_cross_shader_t *(*construct)(void);
33 };
34 
35 void spirv_cross_set_stage_input(spirv_cross_shader_t *thiz, unsigned location, void *data, size_t size);
36 
37 void spirv_cross_set_stage_output(spirv_cross_shader_t *thiz, unsigned location, void *data, size_t size);
38 
40 
41 void spirv_cross_set_uniform_constant(spirv_cross_shader_t *thiz, unsigned location, void *data, size_t size);
42 
43 void spirv_cross_set_resource(spirv_cross_shader_t *thiz, unsigned set, unsigned binding, void **data, size_t size);
44 
46 
47 typedef enum spirv_cross_builtin {
54 
56 
57 #define SPIRV_CROSS_NUM_DESCRIPTOR_SETS 4
58 #define SPIRV_CROSS_NUM_DESCRIPTOR_BINDINGS 16
59 #define SPIRV_CROSS_NUM_STAGE_INPUTS 16
60 #define SPIRV_CROSS_NUM_STAGE_OUTPUTS 16
61 #define SPIRV_CROSS_NUM_UNIFORM_CONSTANTS 32
62 
64 {
69 
71 };
72 
74 {
77 
79 };
80 
82 {
85 
87 };
88 
90 {
94 
96 };
97 
99 {
100  const void *data;
101  unsigned width, height;
102  size_t stride;
103 };
104 
106 {
108  unsigned num_mipmaps;
109 
116 };
117 
118 typedef struct spirv_cross_sampler_2d spirv_cross_sampler_2d_t;
121 
122 #ifdef __cplusplus
123 }
124 #endif
125 
126 #endif
void spirv_cross_set_stage_input(spirv_cross_shader_t *thiz, unsigned location, void *data, size_t size)
Definition: internal_interface.hpp:573
Definition: external_interface.h:28
void spirv_cross_set_uniform_constant(spirv_cross_shader_t *thiz, unsigned location, void *data, size_t size)
Definition: internal_interface.hpp:583
Definition: external_interface.h:86
const struct spirv_cross_miplevel * mipmaps
Definition: external_interface.h:107
Definition: external_interface.h:68
Definition: external_interface.h:83
Definition: external_interface.h:78
Definition: external_interface.h:105
Definition: libretro.h:2275
struct spirv_cross_sampler_2d spirv_cross_sampler_2d_t
Definition: external_interface.h:118
spirv_cross_sampler_2d_t * spirv_cross_create_sampler_2d(const struct spirv_cross_sampler_info *info)
Definition: external_interface.h:76
Definition: external_interface.h:92
enum spirv_cross_wrap wrap_s
Definition: external_interface.h:111
void spirv_cross_destroy_sampler_2d(spirv_cross_sampler_2d_t *samp)
GLsizeiptr size
Definition: glext.h:6559
Definition: external_interface.h:93
Definition: external_interface.h:48
spirv_cross_mipfilter
Definition: external_interface.h:89
Definition: external_interface.h:49
Definition: external_interface.h:84
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
spirv_cross_builtin
Definition: external_interface.h:47
Definition: ibxm.h:9
Definition: external_interface.h:66
spirv_cross_filter
Definition: external_interface.h:81
GLint location
Definition: glext.h:6690
enum spirv_cross_format format
Definition: external_interface.h:110
const void * data
Definition: external_interface.h:100
void spirv_cross_set_stage_output(spirv_cross_shader_t *thiz, unsigned location, void *data, size_t size)
Definition: internal_interface.hpp:578
spirv_cross_wrap
Definition: external_interface.h:73
Definition: internal_interface.hpp:188
unsigned height
Definition: external_interface.h:101
Definition: external_interface.h:52
Definition: external_interface.h:70
const struct spirv_cross_interface * spirv_cross_get_interface(void)
Definition: external_interface.h:91
Definition: external_interface.h:65
enum spirv_cross_filter mag_filter
Definition: external_interface.h:114
void(* invoke)(spirv_cross_shader_t *thiz)
Definition: external_interface.h:32
enum spirv_cross_wrap wrap_t
Definition: external_interface.h:112
void spirv_cross_set_push_constant(spirv_cross_shader_t *thiz, void *data, size_t size)
Definition: internal_interface.hpp:593
Definition: external_interface.h:95
Definition: external_interface.h:50
Definition: external_interface.h:51
void spirv_cross_set_resource(spirv_cross_shader_t *thiz, unsigned set, unsigned binding, void **data, size_t size)
Definition: internal_interface.hpp:588
enum spirv_cross_mipfilter mip_filter
Definition: external_interface.h:115
Unknown compiler Device disconnected from port File already exists Saving to backup buffer Got connection No arguments supplied and no menu builtin
Definition: msg_hash_eo.h:34
spirv_cross_format
Definition: external_interface.h:63
enum spirv_cross_filter min_filter
Definition: external_interface.h:113
Definition: external_interface.h:67
Definition: external_interface.h:98
unsigned width
Definition: external_interface.h:101
size_t stride
Definition: external_interface.h:102
void(* destruct)(spirv_cross_shader_t *thiz)
Definition: external_interface.h:31
unsigned num_mipmaps
Definition: external_interface.h:108
Definition: external_interface.h:75
void spirv_cross_set_builtin(spirv_cross_shader_t *thiz, spirv_cross_builtin builtin, void *data, size_t size)
Definition: internal_interface.hpp:598