#include "main/fbobject.h"
#include "main/extensions.h"
#include "main/glthread.h"
-#include "main/imports.h"
#include "main/macros.h"
#include "main/points.h"
#include "main/version.h"
#include "util/ralloc.h"
#include "util/debug.h"
#include "util/disk_cache.h"
+#include "util/u_memory.h"
#include "isl/isl.h"
#include "common/gen_defines.h"
ctx->Const.MaxIntegerSamples = max_samples;
ctx->Const.MaxImageSamples = 0;
- /* gen6_set_sample_maps() sets SampleMap{2,4,8}x variables which are used
- * to map indices of rectangular grid to sample numbers within a pixel.
- * These variables are used by GL_EXT_framebuffer_multisample_blit_scaled
- * extension implementation. For more details see the comment above
- * gen6_set_sample_maps() definition.
- */
- gen6_set_sample_maps(ctx);
-
ctx->Const.MinLineWidth = 1.0;
ctx->Const.MinLineWidthAA = 1.0;
if (devinfo->gen >= 6) {
ctx->Const.MaxComputeWorkGroupSize[2] = max_invocations;
ctx->Const.MaxComputeWorkGroupInvocations = max_invocations;
ctx->Const.MaxComputeSharedMemorySize = 64 * 1024;
+
+ /* Constants used for ARB_compute_variable_group_size. */
+ if (devinfo->gen >= 7) {
+ assert(max_invocations >= 512);
+ ctx->Const.MaxComputeVariableGroupSize[0] = max_invocations;
+ ctx->Const.MaxComputeVariableGroupSize[1] = max_invocations;
+ ctx->Const.MaxComputeVariableGroupSize[2] = max_invocations;
+ ctx->Const.MaxComputeVariableGroupInvocations = max_invocations;
+ }
}
/**
driOptionCache *options = &brw->optionCache;
driParseConfigFiles(options, &brw->screen->optionCache,
brw->driContext->driScreenPriv->myNum,
- "i965", NULL, NULL, 0);
+ "i965", NULL, NULL, 0, NULL, 0);
if (INTEL_DEBUG & DEBUG_NO_HIZ) {
brw->has_hiz = false;
ctx->Const.ForceGLSLAbsSqrt =
driQueryOptionb(options, "force_glsl_abs_sqrt");
- ctx->Const.GLSLZeroInit = driQueryOptionb(options, "glsl_zero_init");
+ ctx->Const.GLSLZeroInit = driQueryOptionb(options, "glsl_zero_init") ? 1 : 0;
brw->dual_color_blend_by_location =
driQueryOptionb(options, "dual_color_blend_by_location");
ctx->Const.AllowGLSLCrossStageInterpolationMismatch =
driQueryOptionb(options, "allow_glsl_cross_stage_interpolation_mismatch");
+ char *vendor_str = driQueryOptionstr(options, "force_gl_vendor");
+ /* not an empty string */
+ if (*vendor_str)
+ ctx->Const.VendorOverride = vendor_str;
+
ctx->Const.dri_config_options_sha1 = ralloc_array(brw, unsigned char, 20);
driComputeOptionsSha1(&brw->screen->optionCache,
ctx->Const.dri_config_options_sha1);
driDestroyOptionCache(&brw->optionCache);
/* free the Mesa context */
- _mesa_free_context_data(&brw->ctx);
+ _mesa_free_context_data(&brw->ctx, true);
ralloc_free(brw);
driContextPriv->driverPrivate = NULL;