| 1 |
|
| 2 |
|
| 3 |
Inc. |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
#ifndef SVGA_TGSI_H |
| 9 |
#define SVGA_TGSI_H |
| 10 |
|
| 11 |
#include "util/compiler.h" |
| 12 |
#include "svga3d_reg.h" |
| 13 |
|
| 14 |
|
| 15 |
#define MAX_VGPU10_ADDR_REGS 4 |
| 16 |
|
| 17 |
struct svga_compile_key; |
| 18 |
struct svga_context; |
| 19 |
struct svga_shader; |
| 20 |
struct svga_shader_variant; |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
static inline void |
| 32 |
svga_generate_vdecl_semantics(unsigned idx, |
| 33 |
unsigned *usage, |
| 34 |
unsigned *usage_index) |
| 35 |
{ |
| 36 |
if (idx == 0) { |
| 37 |
*usage = SVGA3D_DECLUSAGE_POSITION; |
| 38 |
*usage_index = 0; |
| 39 |
} else { |
| 40 |
*usage = SVGA3D_DECLUSAGE_TEXCOORD; |
| 41 |
*usage_index = idx - 1; |
| 42 |
} |
| 43 |
} |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
struct svga_shader_variant * |
| 48 |
svga_tgsi_vgpu9_translate(struct svga_context *svga, |
| 49 |
const struct svga_shader *shader, |
| 50 |
const struct svga_compile_key *key, |
| 51 |
mesa_shader_stage unit); |
| 52 |
|
| 53 |
struct svga_shader_variant * |
| 54 |
svga_tgsi_vgpu10_translate(struct svga_context *svga, |
| 55 |
const struct svga_shader *shader, |
| 56 |
const struct svga_compile_key *key, |
| 57 |
mesa_shader_stage unit); |
| 58 |
|
| 59 |
bool svga_shader_verify(const uint32_t *tokens, unsigned nr_tokens); |
| 60 |
|
| 61 |
void |
| 62 |
svga_tgsi_scan_shader(struct svga_shader *shader); |
| 63 |
|
| 64 |
struct svga_shader_variant * |
| 65 |
svga_tgsi_compile_shader(struct svga_context *svga, |
| 66 |
struct svga_shader *shader, |
| 67 |
const struct svga_compile_key *key); |
| 68 |
|
| 69 |
#endif |