[PATCH] intel: Allocate swrast buffer (#54782)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tomeu Vizoso <tomeu.vizoso at 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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux