#ifndef RT_SHADER_COMPILER_H
#define RT_SHADER_COMPILER_H

#include "runtime/runtime.h"
#include "runtime/mem_arena.h"
#include "renderer/common/renderer_api.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
