rtengine/src/asset_compiler/shader_compiler.h
Kevin Trogant 5709cc98a5
All checks were successful
Ubuntu Cross to Win64 / Cross Compile with ming64 (1.4.0, ubuntu-latest) (push) Successful in 1m58s
refactor(renderer): Introduce renderer lib that handles backend selection and common functionality
2024-07-29 22:04:46 +02:00

43 lines
935 B
C

#ifndef RT_SHADER_COMPILER_H
#define RT_SHADER_COMPILER_H
#include "runtime/runtime.h"
#include "runtime/mem_arena.h"
#include "renderer/renderer.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
RT_SHADER_OPTIMIZATION_NONE,
RT_SHADER_OPTIMIZATION_SPEED,
RT_SHADER_OPTIMIZATION_SIZE,
} rt_shader_optimization_level;
typedef enum {
RT_SHADER_TYPE_INVALID,
RT_SHADER_TYPE_VULKAN,
RT_SHADER_TYPE_DX11,
RT_SHADER_TYPE_count
} rt_shader_type;
typedef struct {
void *bytes;
size_t len;
} rt_shader_bytecode;
rt_shader_bytecode CompileShader(rt_shader_type type,
rt_shader_stage stage,
rt_shader_optimization_level optimization,
rt_text_span code,
const char *input_file,
rt_arena *arena);
#ifdef __cplusplus
}
#endif
#endif