for buffers is supported.
* ``PIPE_CAP_GENERATE_MIPMAP``: Indicates whether pipe_context::generate_mipmap
is supported.
+* ``PIPE_CAP_STRING_MARKER``: Whether pipe->emit_string_marker() is supported.
.. _pipe_capf:
case PIPE_CAP_TEXTURE_BARRIER:
case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
case PIPE_CAP_COMPUTE:
+ case PIPE_CAP_STRING_MARKER:
return 0;
case PIPE_CAP_SM3:
case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
case PIPE_CAP_INVALIDATE_BUFFER:
case PIPE_CAP_GENERATE_MIPMAP:
+ case PIPE_CAP_STRING_MARKER:
return 0;
case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
case PIPE_CAP_INVALIDATE_BUFFER:
case PIPE_CAP_GENERATE_MIPMAP:
+ case PIPE_CAP_STRING_MARKER:
return 0;
case PIPE_CAP_VENDOR_ID:
case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
case PIPE_CAP_INVALIDATE_BUFFER:
case PIPE_CAP_GENERATE_MIPMAP:
+ case PIPE_CAP_STRING_MARKER:
return 0;
}
/* should only get here on unhandled cases */
case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
case PIPE_CAP_INVALIDATE_BUFFER:
case PIPE_CAP_GENERATE_MIPMAP:
+ case PIPE_CAP_STRING_MARKER:
return 0;
case PIPE_CAP_VENDOR_ID:
case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
case PIPE_CAP_INVALIDATE_BUFFER:
case PIPE_CAP_GENERATE_MIPMAP:
+ case PIPE_CAP_STRING_MARKER:
return 0;
case PIPE_CAP_VENDOR_ID:
case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
case PIPE_CAP_INVALIDATE_BUFFER:
case PIPE_CAP_GENERATE_MIPMAP:
+ case PIPE_CAP_STRING_MARKER:
return 0;
case PIPE_CAP_VENDOR_ID:
case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
case PIPE_CAP_INVALIDATE_BUFFER:
case PIPE_CAP_GENERATE_MIPMAP:
+ case PIPE_CAP_STRING_MARKER:
return 0;
/* SWTCL-only features. */
case PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL:
case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
case PIPE_CAP_GENERATE_MIPMAP:
+ case PIPE_CAP_STRING_MARKER:
return 0;
case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
case PIPE_CAP_GENERATE_MIPMAP:
+ case PIPE_CAP_STRING_MARKER:
return 0;
case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
case PIPE_CAP_INVALIDATE_BUFFER:
case PIPE_CAP_GENERATE_MIPMAP:
+ case PIPE_CAP_STRING_MARKER:
return 0;
}
/* should only get here on unhandled cases */
case PIPE_CAP_TGSI_PACK_HALF_FLOAT:
case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
case PIPE_CAP_INVALIDATE_BUFFER:
+ case PIPE_CAP_STRING_MARKER:
return 0;
case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
return 64;
case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
case PIPE_CAP_INVALIDATE_BUFFER:
case PIPE_CAP_GENERATE_MIPMAP:
+ case PIPE_CAP_STRING_MARKER:
return 0;
/* Stream output. */
void (*dump_debug_state)(struct pipe_context *ctx, FILE *stream,
unsigned flags);
+ /**
+ * Emit string marker in cmdstream
+ */
+ void (*emit_string_marker)(struct pipe_context *ctx,
+ const char *string,
+ int len);
+
/**
* Generate mipmap.
* \return TRUE if mipmap generation succeeds, FALSE otherwise
PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT,
PIPE_CAP_INVALIDATE_BUFFER,
PIPE_CAP_GENERATE_MIPMAP,
+ PIPE_CAP_STRING_MARKER,
};
#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)
free(ctx);
}
+static void
+st_emit_string_marker(struct gl_context *ctx, const GLchar *string, GLsizei len)
+{
+ struct st_context *st = ctx->st;
+ st->pipe->emit_string_marker(st->pipe, string, len);
+}
void st_init_driver_functions(struct pipe_screen *screen,
struct dd_function_table *functions)
st_init_vdpau_functions(functions);
+ if (screen->get_param(screen, PIPE_CAP_STRING_MARKER))
+ functions->EmitStringMarker = st_emit_string_marker;
+
functions->Enable = st_Enable;
functions->UpdateState = st_invalidate_state;
}
{ "buffer", DEBUG_BUFFER, NULL },
{ "wf", DEBUG_WIREFRAME, NULL },
{ "precompile", DEBUG_PRECOMPILE, NULL },
+ { "gremedy", DEBUG_GREMEDY, "Enable GREMEDY debug extensions" },
DEBUG_NAMED_VALUE_END
};
#define DEBUG_BUFFER 0x200
#define DEBUG_WIREFRAME 0x400
#define DEBUG_PRECOMPILE 0x800
+#define DEBUG_GREMEDY 0x1000
#ifdef DEBUG
extern int ST_DEBUG;
#include "util/u_math.h"
#include "st_context.h"
+#include "st_debug.h"
#include "st_extensions.h"
#include "st_format.h"
extensions->ARB_gpu_shader_fp64 = GL_TRUE;
extensions->ARB_vertex_attrib_64bit = GL_TRUE;
}
+
+ if ((ST_DEBUG & DEBUG_GREMEDY) &&
+ screen->get_param(screen, PIPE_CAP_STRING_MARKER))
+ extensions->GREMEDY_string_marker = GL_TRUE;
}