i965: Re-enable fast color clears for GEN11.
[mesa.git] / src / mesa / drivers / dri / i915 / intel_tex.c
index 24f13dfee8993933345666fb0f0847223594978d..0b24c7e935bbbd0abed8207d14b71eb0b42c1e8d 100644 (file)
@@ -14,7 +14,7 @@
 static struct gl_texture_image *
 intelNewTextureImage(struct gl_context * ctx)
 {
-   DBG("%s\n", __FUNCTION__);
+   DBG("%s\n", __func__);
    (void) ctx;
    return (struct gl_texture_image *) CALLOC_STRUCT(intel_texture_image);
 }
@@ -34,12 +34,12 @@ intelNewTextureObject(struct gl_context * ctx, GLuint name, GLenum target)
 
    (void) ctx;
 
-   DBG("%s\n", __FUNCTION__);
+   DBG("%s\n", __func__);
 
    if (obj == NULL)
       return NULL;
 
-   _mesa_initialize_texture_object(&obj->base, name, target);
+   _mesa_initialize_texture_object(ctx, &obj->base, name, target);
 
    obj->needs_validate = true;
 
@@ -67,13 +67,6 @@ intel_alloc_texture_image_buffer(struct gl_context *ctx,
 
    assert(image->Border == 0);
 
-   /* Quantize sample count */
-   if (image->NumSamples) {
-      image->NumSamples = intel_quantize_num_samples(intel->intelScreen, image->NumSamples);
-      if (!image->NumSamples)
-         return false;
-   }
-
    /* Because the driver uses AllocTextureImageBuffer() internally, it may end
     * up mismatched with FreeTextureImageBuffer(), but that is safe to call
     * multiple times.
@@ -87,7 +80,7 @@ intel_alloc_texture_image_buffer(struct gl_context *ctx,
        intel_miptree_match_image(intel_texobj->mt, image)) {
       intel_miptree_reference(&intel_image->mt, intel_texobj->mt);
       DBG("%s: alloc obj %p level %d %dx%dx%d using object's miptree %p\n",
-          __FUNCTION__, texobj, image->Level,
+          __func__, texobj, image->Level,
           image->Width, image->Height, image->Depth, intel_texobj->mt);
    } else {
       intel_image->mt = intel_miptree_create_for_teximage(intel, intel_texobj,
@@ -102,7 +95,7 @@ intel_alloc_texture_image_buffer(struct gl_context *ctx,
       intel_miptree_reference(&intel_texobj->mt, intel_image->mt);
 
       DBG("%s: alloc obj %p level %d %dx%dx%d using new miptree %p\n",
-          __FUNCTION__, texobj, image->Level,
+          __func__, texobj, image->Level,
           image->Width, image->Height, image->Depth, intel_image->mt);
    }
 
@@ -117,7 +110,7 @@ intel_free_texture_image_buffer(struct gl_context * ctx,
 {
    struct intel_texture_image *intelImage = intel_texture_image(texImage);
 
-   DBG("%s\n", __FUNCTION__);
+   DBG("%s\n", __func__);
 
    intel_miptree_release(&intelImage->mt);
 
@@ -147,10 +140,6 @@ intel_map_texture_image(struct gl_context *ctx,
    /* Our texture data is always stored in a miptree. */
    assert(mt);
 
-   /* Check that our caller wasn't confused about how to map a 1D texture. */
-   assert(tex_image->TexObject->Target != GL_TEXTURE_1D_ARRAY ||
-         h == 1);
-
    /* intel_miptree_map operates on a unified "slice" number that references the
     * cube face, since it's all just slices to the miptree code.
     */