boolean no_line_width;
boolean force_hw_line_stipple;
+
+ /** To report perf/conformance/etc issues to the state tracker */
+ struct pipe_debug_callback callback;
} debug;
struct {
#include "svga_cmd.h"
#include "util/u_inlines.h"
+#include "util/u_prim.h"
#include "indices/u_indices.h"
#include "svga_hw_reg.h"
if (ret != PIPE_OK)
goto done;
+ pipe_debug_message(&svga->debug.callback, PERF_INFO,
+ "generating temporary index buffer for drawing %s",
+ u_prim_name(prim));
+
ret = svga_hwtnl_simple_draw_range_elements(hwtnl,
gen_buf,
gen_size,
blend->rt[i].srcblend_alpha = blend->rt[i].srcblend;
blend->rt[i].dstblend_alpha = blend->rt[i].dstblend;
blend->rt[i].blendeq_alpha = blend->rt[i].blendeq;
+
+ if (templ->logicop_func == PIPE_LOGICOP_XOR) {
+ pipe_debug_message(&svga->debug.callback, CONFORMANCE,
+ "XOR logicop mode has limited support");
+ }
+ else if (templ->logicop_func != PIPE_LOGICOP_COPY) {
+ pipe_debug_message(&svga->debug.callback, CONFORMANCE,
+ "general logicops are not supported");
+ }
}
else {
/* Note: the vgpu10 device does not yet support independent
}
+/**
+ * Called by state tracker to specify a callback function the driver
+ * can use to report info back to the state tracker.
+ */
+static void
+svga_set_debug_callback(struct pipe_context *pipe,
+ const struct pipe_debug_callback *cb)
+{
+ struct svga_context *svga = svga_context(pipe);
+
+ if (cb)
+ svga->debug.callback = *cb;
+ else
+ memset(&svga->debug.callback, 0, sizeof(svga->debug.callback));
+}
+
void svga_init_misc_functions( struct svga_context *svga )
{
svga->pipe.set_framebuffer_state = svga_set_framebuffer_state;
svga->pipe.set_clip_state = svga_set_clip_state;
svga->pipe.set_viewport_states = svga_set_viewport_states;
+ svga->pipe.set_debug_callback = svga_set_debug_callback;
}
define_rasterizer_object(svga, rast);
}
+ if (templ->poly_smooth) {
+ pipe_debug_message(&svga->debug.callback, CONFORMANCE,
+ "GL_POLYGON_SMOOTH not supported");
+ }
+
svga->hud.num_state_objects++;
return rast;
{
boolean need_pipeline = FALSE;
struct svga_vertex_shader *vs = svga->curr.vs;
+ const char *reason = "";
/* SVGA_NEW_RAST, SVGA_NEW_REDUCED_PRIMITIVE
*/
svga->curr.rast->need_pipeline_lines_str,
svga->curr.rast->need_pipeline_points_str);
need_pipeline = TRUE;
+
+ switch (svga->curr.reduced_prim) {
+ case PIPE_PRIM_POINTS:
+ reason = svga->curr.rast->need_pipeline_points_str;
+ break;
+ case PIPE_PRIM_LINES:
+ reason = svga->curr.rast->need_pipeline_lines_str;
+ break;
+ case PIPE_PRIM_TRIANGLES:
+ reason = svga->curr.rast->need_pipeline_tris_str;
+ break;
+ default:
+ assert(!"Unexpected reduced prim type");
+ }
}
/* EDGEFLAGS
if (vs && vs->base.info.writes_edgeflag) {
SVGA_DBG(DEBUG_SWTNL, "%s: edgeflags\n", __FUNCTION__);
need_pipeline = TRUE;
+ reason = "edge flags";
}
/* SVGA_NEW_FS, SVGA_NEW_RAST, SVGA_NEW_REDUCED_PRIMITIVE
* point stage.
*/
need_pipeline = TRUE;
+ reason = "point sprite coordinate generation";
}
}
if (0 && svga->state.sw.need_pipeline)
debug_printf("sw.need_pipeline = %d\n", svga->state.sw.need_pipeline);
+ if (svga->state.sw.need_pipeline) {
+ assert(reason);
+ pipe_debug_message(&svga->debug.callback, FALLBACK,
+ "Using semi-fallback for %s", reason);
+ }
+
return PIPE_OK;
}