summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-06-12 10:36:18 -0700
committerJason Ekstrand <[email protected]>2017-07-12 21:15:46 -0700
commit4bf140576a68733dba7de7a146d65dfff90b3990 (patch)
tree1abeb3edc786c0ff9e2ac19500a212fad81661ea /src
parent947b72ab5df620b5c7d5fe904b121a165b0c3b1e (diff)
i965/miptree: Add tile_x/y to total_width/height
This is what we do in intel_image_target_renderbuffer_storage and it makes more sense than stomping them. Because the image gets created as a 2D image with one miplevel, they should already be equal to the provided width/height. Adding the tile offset makes some sense depending on how you interpret the fields. The only place these fields are used for in state setup is to set up the image parameters we pass into shaders. There may be issues here if you try to use image_load_store on something pulled in from EGL but that's probably broken already. This just makes it consistently broken. Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index bdd0cd56020..077e2ab8e41 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -1077,10 +1077,10 @@ intel_miptree_create_for_dri_image(struct brw_context *brw,
return NULL;
mt->target = target;
- mt->total_width = image->width;
- mt->total_height = image->height;
mt->level[0].slice[0].x_offset = image->tile_x;
mt->level[0].slice[0].y_offset = image->tile_y;
+ mt->total_width += image->tile_x;
+ mt->total_height += image->tile_y;
/* From "OES_EGL_image" error reporting. We report GL_INVALID_OPERATION
* for EGL images from non-tile aligned sufaces in gen4 hw and earlier which has