All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Plourde <frederic.plourde@collabora.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Subject: [PATCH] intel: Allocate swrast buffer (#54782)
Date: Tue, 30 Oct 2012 12:55:40 -0400	[thread overview]
Message-ID: <1351616140-12380-1-git-send-email-frederic.plourde@collabora.co.uk> (raw)

From: Tomeu Vizoso <tomeu.vizoso@collabora.com>

When i915 driver decides to fallback to software, the texture's Map
gets replaced by its Buffer attribute, which is NULL because the 
texture hasn't been allocated by swrast yet.

The attached patch makes sure that the image buffer for the texture 
gets allocated
---
 src/mesa/drivers/dri/intel/intel_tex.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c
index 5d93879..b87fcc1 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.c
+++ b/src/mesa/drivers/dri/intel/intel_tex.c
@@ -82,7 +82,7 @@ intel_alloc_texture_image_buffer(struct gl_context *ctx,
    assert(!intel_image->base.ImageOffsets);
    intel_image->base.ImageOffsets = malloc(slices * sizeof(GLuint));
 
-   _swrast_init_texture_image(image);
+   _swrast_alloc_texture_image_buffer(ctx, image);
 
    if (intel_texobj->mt &&
        intel_miptree_match_image(intel_texobj->mt, image)) {
-- 
1.7.10.4

             reply	other threads:[~2012-10-30 16:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-30 16:55 Frederic Plourde [this message]
2012-10-31 17:41 ` [PATCH] intel: Allocate swrast buffer (#54782) Eric Anholt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1351616140-12380-1-git-send-email-frederic.plourde@collabora.co.uk \
    --to=frederic.plourde@collabora.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tomeu.vizoso@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.