#include "main/stencil.h"
#include "main/state.h"
-#include "vbo/vbo_context.h"
+#include "vbo/vbo.h"
#include "drivers/common/driverfuncs.h"
#include "drivers/common/meta.h"
#include "tnl/t_pipeline.h"
#include "util/ralloc.h"
#include "util/debug.h"
+#include "util/disk_cache.h"
#include "isl/isl.h"
/***************************************
if (devinfo->gen >= 6)
functions->GetSamplePosition = gen6_get_sample_position;
+
+ /* GL_ARB_get_program_binary */
+ brw_program_binary_init(brw->screen->deviceID);
+ functions->GetProgramBinaryDriverSHA1 = brw_get_program_binary_driver_sha1;
+ functions->ProgramBinarySerializeDriverBlob = brw_program_serialize_nir;
+ functions->ProgramBinaryDeserializeDriverBlob =
+ brw_deserialize_program_binary;
}
static void
ctx->Const.MaxClipPlanes = 8;
ctx->Const.GLSLTessLevelsAsInputs = true;
- ctx->Const.LowerTCSPatchVerticesIn = devinfo->gen >= 8;
- ctx->Const.LowerTESPatchVerticesIn = true;
ctx->Const.PrimitiveRestartForPatches = true;
ctx->Const.Program[MESA_SHADER_VERTEX].MaxNativeInstructions = 16 * 1024;
if (!(ctx->Const.ContextFlags & GL_CONTEXT_FLAG_DEBUG_BIT))
ctx->Const.AllowMappedBuffersDuringExecution = true;
+
+ /* GL_ARB_get_program_binary */
+ ctx->Const.NumProgramBinaryFormats = 1;
}
static void
if (ctx_config->attribute_mask &
~(__DRIVER_CONTEXT_ATTRIB_RESET_STRATEGY |
- __DRIVER_CONTEXT_ATTRIB_RELEASE_BEHAVIOR)) {
+ __DRIVER_CONTEXT_ATTRIB_PRIORITY)) {
*dri_ctx_error = __DRI_CTX_ERROR_UNKNOWN_ATTRIBUTE;
return false;
}
((ctx_config->attribute_mask & __DRIVER_CONTEXT_ATTRIB_RESET_STRATEGY) &&
ctx_config->reset_strategy != __DRI_CTX_RESET_NO_NOTIFICATION);
- GLenum release_behavior = GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH;
- if (ctx_config->attribute_mask & __DRIVER_CONTEXT_ATTRIB_RELEASE_BEHAVIOR) {
- switch (ctx_config->release_behavior) {
- case __DRI_CTX_RELEASE_BEHAVIOR_NONE:
- release_behavior = GL_NONE;
- break;
- case __DRI_CTX_RELEASE_BEHAVIOR_FLUSH:
- break;
- default:
- *dri_ctx_error = __DRI_CTX_ERROR_UNKNOWN_ATTRIBUTE;
- return false;
- }
- }
-
struct brw_context *brw = rzalloc(NULL, struct brw_context);
if (!brw) {
fprintf(stderr, "%s: failed to alloc context\n", __func__);
return false;
}
+ if (devinfo->gen == 10) {
+ fprintf(stderr,
+ "WARNING: i965 does not fully support Gen10 yet.\n"
+ "Instability or lower performance might occur.\n");
+
+ }
+
brw_init_state(brw);
intelInitExtensions(ctx);
ctx->Const.RobustAccess = GL_TRUE;
}
- ctx->Const.ContextReleaseBehavior = release_behavior;
-
if (INTEL_DEBUG & DEBUG_SHADER_TIME)
brw_init_shader_time(brw);
vbo_use_buffer_objects(ctx);
vbo_always_unmap_buffers(ctx);
- brw_disk_cache_init(brw);
+ brw->ctx.Cache = brw->screen->disk_cache;
return true;
}
return;
}
+ uint32_t tiling, swizzle;
+ brw_bo_get_tiling(bo, &tiling, &swizzle);
+
struct intel_mipmap_tree *mt =
intel_miptree_create_for_bo(brw,
bo,
drawable->h,
1,
buffer->pitch,
+ isl_tiling_from_i915_tiling(tiling),
MIPTREE_CREATE_DEFAULT);
if (!mt) {
brw_bo_unreference(bo);