#define SVGA_MAX_POINTSIZE 80.0
struct draw_vertex_shader;
+struct draw_fragment_shader;
struct svga_shader_result;
struct SVGACmdMemory;
struct util_bitmask;
{
struct svga_shader base;
+ struct draw_fragment_shader *draw_shader;
+
/** Mask of which generic varying variables are read by this shader */
unsigned generic_inputs;
/** Table mapping original TGSI generic indexes to low integers */
#include "util/u_memory.h"
#include "util/u_bitmask.h"
#include "tgsi/tgsi_parse.h"
+#include "draw/draw_context.h"
#include "svga_context.h"
#include "svga_tgsi.h"
svga_remap_generics(fs->generic_inputs, fs->generic_remap_table);
+ fs->draw_shader = draw_create_fragment_shader(svga->swtnl.draw, templ);
+
if (SVGA_DEBUG & DEBUG_TGSI || 0) {
debug_printf("%s id: %u, inputs: %u, outputs: %u\n",
__FUNCTION__, fs->base.id,
svga_hwtnl_flush_retry( svga );
+ draw_delete_fragment_shader(svga->swtnl.draw, fs->draw_shader);
+
for (result = fs->base.results; result; result = tmp ) {
tmp = result->next;
draw_bind_vertex_shader(svga->swtnl.draw,
svga->curr.vs->draw_shader);
+ if (dirty & SVGA_NEW_FS)
+ draw_bind_fragment_shader(svga->swtnl.draw,
+ svga->curr.fs->draw_shader);
+
if (dirty & SVGA_NEW_VBUFFER)
draw_set_vertex_buffers(svga->swtnl.draw,
svga->curr.num_vertex_buffers,