static void cs_delete(const struct sp_compute_shader *cs, struct tgsi_exec_machine *machine) { if (machine->Tokens == cs->tokens) { tgsi_exec_machine_bind_shader(machine, NULL, NULL, NULL, NULL); } }
void draw_geometry_shader_prepare(struct draw_geometry_shader *shader, struct draw_context *draw) { if (shader && shader->machine->Tokens != shader->state.tokens) { tgsi_exec_machine_bind_shader(shader->machine, shader->state.tokens, draw->gs.tgsi.sampler); } }
void draw_geometry_shader_prepare(struct draw_geometry_shader *shader, struct draw_context *draw) { boolean use_llvm = draw->llvm != NULL; if (!use_llvm && shader && shader->machine->Tokens != shader->state.tokens) { tgsi_exec_machine_bind_shader(shader->machine, shader->state.tokens, draw->gs.tgsi.sampler); } }
void draw_geometry_shader_prepare(struct draw_geometry_shader *shader, struct draw_context *draw) { #ifdef HAVE_LLVM boolean use_llvm = draw_get_option_use_llvm(); #else boolean use_llvm = FALSE; #endif if (!use_llvm && shader && shader->machine->Tokens != shader->state.tokens) { tgsi_exec_machine_bind_shader(shader->machine, shader->state.tokens, draw->gs.tgsi.sampler); } }
static void cs_prepare(const struct sp_compute_shader *cs, struct tgsi_exec_machine *machine, int w, int h, int d, int g_w, int g_h, int g_d, int b_w, int b_h, int b_d, struct tgsi_sampler *sampler, struct tgsi_image *image, struct tgsi_buffer *buffer ) { int j; /* * Bind tokens/shader to the interpreter's machine state. */ tgsi_exec_machine_bind_shader(machine, cs->tokens, sampler, image, buffer); if (machine->SysSemanticToIndex[TGSI_SEMANTIC_THREAD_ID] != -1) { unsigned i = machine->SysSemanticToIndex[TGSI_SEMANTIC_THREAD_ID]; for (j = 0; j < TGSI_QUAD_SIZE; j++) { machine->SystemValue[i].xyzw[0].i[j] = w; machine->SystemValue[i].xyzw[1].i[j] = h; machine->SystemValue[i].xyzw[2].i[j] = d; } } if (machine->SysSemanticToIndex[TGSI_SEMANTIC_GRID_SIZE] != -1) { unsigned i = machine->SysSemanticToIndex[TGSI_SEMANTIC_GRID_SIZE]; for (j = 0; j < TGSI_QUAD_SIZE; j++) { machine->SystemValue[i].xyzw[0].i[j] = g_w; machine->SystemValue[i].xyzw[1].i[j] = g_h; machine->SystemValue[i].xyzw[2].i[j] = g_d; } } if (machine->SysSemanticToIndex[TGSI_SEMANTIC_BLOCK_SIZE] != -1) { unsigned i = machine->SysSemanticToIndex[TGSI_SEMANTIC_BLOCK_SIZE]; for (j = 0; j < TGSI_QUAD_SIZE; j++) { machine->SystemValue[i].xyzw[0].i[j] = b_w; machine->SystemValue[i].xyzw[1].i[j] = b_h; machine->SystemValue[i].xyzw[2].i[j] = b_d; } } }