#include "st_cb_memoryobjects.h"
#include "st_cb_msaa.h"
#include "st_cb_perfmon.h"
+#include "st_cb_perfquery.h"
#include "st_cb_program.h"
#include "st_cb_queryobj.h"
#include "st_cb_readpixels.h"
static uint64_t
st_get_active_states(struct gl_context *ctx)
{
- struct st_common_program *vp =
- st_common_program(ctx->VertexProgram._Current);
- struct st_common_program *tcp =
- st_common_program(ctx->TessCtrlProgram._Current);
- struct st_common_program *tep =
- st_common_program(ctx->TessEvalProgram._Current);
- struct st_common_program *gp =
- st_common_program(ctx->GeometryProgram._Current);
- struct st_common_program *fp =
- st_common_program(ctx->FragmentProgram._Current);
- struct st_common_program *cp =
- st_common_program(ctx->ComputeProgram._Current);
+ struct st_program *vp =
+ st_program(ctx->VertexProgram._Current);
+ struct st_program *tcp =
+ st_program(ctx->TessCtrlProgram._Current);
+ struct st_program *tep =
+ st_program(ctx->TessEvalProgram._Current);
+ struct st_program *gp =
+ st_program(ctx->GeometryProgram._Current);
+ struct st_program *fp =
+ st_program(ctx->FragmentProgram._Current);
+ struct st_program *cp =
+ st_program(ctx->ComputeProgram._Current);
uint64_t active_shader_states = 0;
if (vp)
st_destroy_bound_image_handles(st);
for (i = 0; i < ARRAY_SIZE(st->state.frag_sampler_views); i++) {
+ pipe_sampler_view_reference(&st->state.vert_sampler_views[i], NULL);
pipe_sampler_view_reference(&st->state.frag_sampler_views[i], NULL);
}
st->has_astc_2d_ldr =
screen->is_format_supported(screen, PIPE_FORMAT_ASTC_4x4_SRGB,
PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_SAMPLER_VIEW);
+ st->has_astc_5x5_ldr =
+ screen->is_format_supported(screen, PIPE_FORMAT_ASTC_5x5_SRGB,
+ PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_SAMPLER_VIEW);
st->prefer_blit_based_texture_transfer = screen->get_param(screen,
PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER);
st->force_persample_in_shader =
ctx->Extensions.AMD_performance_monitor = GL_TRUE;
}
+ if (st_have_perfquery(st)) {
+ ctx->Extensions.INTEL_performance_query = GL_TRUE;
+ }
+
/* Enable shader-based fallbacks for ARB_color_buffer_float if needed. */
if (screen->get_param(screen, PIPE_CAP_VERTEX_COLOR_UNCLAMPED)) {
if (!screen->get_param(screen, PIPE_CAP_VERTEX_COLOR_CLAMPED)) {
ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitNoSat =
!screen->get_param(screen, PIPE_CAP_VERTEX_SHADER_SATURATE);
+ ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].PositionAlwaysInvariant = options->vs_position_always_invariant;
+
+ enum pipe_shader_ir preferred_ir = (enum pipe_shader_ir)
+ screen->get_shader_param(screen, PIPE_SHADER_VERTEX,
+ PIPE_SHADER_CAP_PREFERRED_IR);
+ ctx->Const.UseNIRGLSLLinker = preferred_ir == PIPE_SHADER_IR_NIR;
+
if (ctx->Const.GLSLVersion < 400) {
for (i = 0; i < MESA_SHADER_STAGES; i++)
ctx->Const.ShaderCompilerOptions[i].EmitNoIndirectSampler = true;
st_init_memoryobject_functions(functions);
st_init_msaa_functions(functions);
st_init_perfmon_functions(functions);
+ st_init_perfquery_functions(functions);
st_init_program_functions(functions);
st_init_query_functions(functions);
st_init_cond_render_functions(functions);
st_destroy_program_variants(st);
- _mesa_free_context_data(ctx, false);
+ _mesa_free_context_data(ctx);
/* This will free the st_context too, so 'st' must not be accessed
* afterwards. */