}
}
+/**
+ * Provide TGSI image objects for vertex/geometry shaders that use
+ * texture fetches. This state only needs to be set once per context.
+ * This might only be used by software drivers for the time being.
+ */
+void
+draw_image(struct draw_context *draw,
+ uint shader,
+ struct tgsi_image *image)
+{
+ if (shader == PIPE_SHADER_VERTEX) {
+ draw->vs.tgsi.image = image;
+ } else {
+ debug_assert(shader == PIPE_SHADER_GEOMETRY);
+ draw->gs.tgsi.image = image;
+ }
+}
+
struct draw_geometry_shader;
struct draw_fragment_shader;
struct tgsi_sampler;
+struct tgsi_image;
/*
* structure to contain driver internal information
uint shader_type,
struct tgsi_sampler *sampler);
+void
+draw_image(struct draw_context *draw,
+ uint shader_type,
+ struct tgsi_image *image);
+
void
draw_set_sampler_views(struct draw_context *draw,
unsigned shader_stage,
if (!use_llvm && shader && shader->machine->Tokens != shader->state.tokens) {
tgsi_exec_machine_bind_shader(shader->machine,
shader->state.tokens,
- draw->gs.tgsi.sampler, NULL);
+ draw->gs.tgsi.sampler, draw->gs.tgsi.image);
}
}
struct vbuf_render;
struct tgsi_exec_machine;
struct tgsi_sampler;
+struct tgsi_image;
struct draw_pt_front_end;
struct draw_assembler;
struct draw_llvm;
struct tgsi_exec_machine *machine;
struct tgsi_sampler *sampler;
+ struct tgsi_image *image;
} tgsi;
struct translate *fetch;
struct tgsi_exec_machine *machine;
struct tgsi_sampler *sampler;
+ struct tgsi_image *image;
} tgsi;
} gs;
if (evs->machine->Tokens != shader->state.tokens) {
tgsi_exec_machine_bind_shader(evs->machine,
shader->state.tokens,
- draw->vs.tgsi.sampler, NULL);
+ draw->vs.tgsi.sampler, draw->vs.tgsi.image);
}
}