-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathcompiler_iface.h
More file actions
44 lines (34 loc) · 857 Bytes
/
compiler_iface.h
File metadata and controls
44 lines (34 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#pragma once
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "tgsi/tgsi_text.h"
#include "tgsi/tgsi_dump.h"
#include "codegen/nv50_ir_driver.h"
#include "glsl_frontend.h"
#include "nv_attributes.h"
#include "nv_shader_header.h"
#include "dksh.h"
class DekoCompiler
{
pipeline_stage m_stage;
glsl_program m_glsl;
const struct tgsi_token* m_tgsi;
unsigned int m_tgsiNumTokens;
nv50_ir_prog_info m_info;
void* m_code;
uint32_t m_codeSize;
void* m_data;
uint32_t m_dataSize;
NvShaderHeader m_nvsh;
DkshProgramHeader m_dkph;
void RetrieveAndPadCode();
void GenerateHeaders();
public:
DekoCompiler(pipeline_stage stage, int optLevel = 3);
~DekoCompiler();
bool CompileGlsl(const char* glsl);
void OutputDksh(const char* dkshFile);
void OutputRawCode(const char* rawFile);
void OutputTgsi(const char* tgsiFile);
};