* Mesa's Driver Functions
***************************************/
-static size_t
-brw_query_samples_for_format(struct gl_context *ctx, GLenum target,
- GLenum internalFormat, int samples[16])
-{
- struct brw_context *brw = brw_context(ctx);
-
- (void) target;
-
- switch (brw->gen) {
- case 9:
- samples[0] = 16;
- samples[1] = 8;
- samples[2] = 4;
- samples[3] = 2;
- return 4;
-
- case 8:
- samples[0] = 8;
- samples[1] = 4;
- samples[2] = 2;
- return 3;
-
- case 7:
- samples[0] = 8;
- samples[1] = 4;
- return 2;
-
- case 6:
- samples[0] = 4;
- return 1;
-
- default:
- assert(brw->gen < 6);
- samples[0] = 1;
- return 1;
- }
-}
-
const char *const brw_vendor_string = "Intel Open Source Technology Center";
const char *
if (!tex_obj || !tex_obj->mt)
continue;
intel_miptree_all_slices_resolve_depth(brw, tex_obj->mt);
- intel_miptree_resolve_color(brw, tex_obj->mt, 0);
+ /* Sampling engine understands lossless compression and resolving
+ * those surfaces should be skipped for performance reasons.
+ */
+ intel_miptree_resolve_color(brw, tex_obj->mt,
+ INTEL_MIPTREE_IGNORE_CCS_E);
brw_render_cache_set_check_flush(brw, tex_obj->mt->bo);
}
tex_obj = intel_texture_object(u->TexObj);
if (tex_obj && tex_obj->mt) {
+ /* Access to images is implemented using indirect messages
+ * against data port. Normal render target write understands
+ * lossless compression but unfortunately the typed/untyped
+ * read/write interface doesn't. Therefore the compressed
+ * surfaces need to be resolved prior to accessing them.
+ */
intel_miptree_resolve_color(brw, tex_obj->mt, 0);
brw_render_cache_set_check_flush(brw, tex_obj->mt->bo);
}
_mesa_get_srgb_format_linear(mt->format) == mt->format)
continue;
+ /* Lossless compression is not supported for SRGB formats, it
+ * should be impossible to get here with such surfaces.
+ */
+ assert(!intel_miptree_is_lossless_compressed(brw, mt));
intel_miptree_resolve_color(brw, mt, 0);
brw_render_cache_set_check_flush(brw, mt->bo);
}
brw_init_conditional_render_functions(functions);
functions->QuerySamplesForFormat = brw_query_samples_for_format;
+ functions->QueryInternalFormat = brw_query_internal_format;
functions->NewTransformFeedback = brw_new_transform_feedback;
functions->DeleteTransformFeedback = brw_delete_transform_feedback;
brw->intelScreen->compiler->glsl_compiler_options[i];
}
+ if (brw->gen >= 7) {
+ ctx->Const.MaxViewportWidth = 32768;
+ ctx->Const.MaxViewportHeight = 32768;
+ }
+
/* ARB_viewport_array */
if (brw->gen >= 6 && ctx->API == API_OPENGL_CORE) {
ctx->Const.MaxViewports = GEN6_NUM_VIEWPORTS;
ctx->Const.MaxComputeWorkGroupSize[1] = max_invocations;
ctx->Const.MaxComputeWorkGroupSize[2] = max_invocations;
ctx->Const.MaxComputeWorkGroupInvocations = max_invocations;
- ctx->Const.MaxComputeSharedMemorySize = 32768;
+ ctx->Const.MaxComputeSharedMemorySize = 64 * 1024;
}
/**