summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-08-18 17:28:08 +0200
committerLuca Barbieri <[email protected]>2010-08-20 12:04:00 +0200
commitae0ef6f69f351cacdc7eaa9b21097a7c1b414e44 (patch)
treedfc35d5587cb1d6977474eb3b86e5316adfae3f0 /src/gallium/drivers/i915
parent72b3e3fee37413fefe205fa03a111a0180ed19c1 (diff)
gallium: make all checks for PIPE_TEXTURE_2D check for PIPE_TEXTURE_RECT too
Searched for them with: git grep -E '[!=]=.*PIPE_TEXTURE_2D|PIPE_TEXTURE_2D.*[!=]=|case.*PIPE_TEXTURE_2D' Behavior hasn't been changed.
Diffstat (limited to 'src/gallium/drivers/i915')
-rw-r--r--src/gallium/drivers/i915/i915_resource_texture.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915/i915_resource_texture.c b/src/gallium/drivers/i915/i915_resource_texture.c
index 752ddaae7b1..c5c6179b169 100644
--- a/src/gallium/drivers/i915/i915_resource_texture.c
+++ b/src/gallium/drivers/i915/i915_resource_texture.c
@@ -360,6 +360,7 @@ i915_texture_layout(struct i915_texture * tex)
switch (pt->target) {
case PIPE_TEXTURE_1D:
case PIPE_TEXTURE_2D:
+ case PIPE_TEXTURE_RECT:
if (!i9x5_special_layout(tex))
i915_texture_layout_2d(tex);
break;
@@ -605,6 +606,7 @@ i945_texture_layout(struct i915_texture * tex)
switch (pt->target) {
case PIPE_TEXTURE_1D:
case PIPE_TEXTURE_2D:
+ case PIPE_TEXTURE_RECT:
if (!i9x5_special_layout(tex))
i945_texture_layout_2d(tex);
break;
@@ -829,7 +831,8 @@ i915_texture_from_handle(struct pipe_screen * screen,
buffer = iws->buffer_from_handle(iws, whandle, &stride);
/* Only supports one type */
- if (template->target != PIPE_TEXTURE_2D ||
+ if ((template->target != PIPE_TEXTURE_2D &&
+ template->target != PIPE_TEXTURE_RECT) ||
template->last_level != 0 ||
template->depth0 != 1) {
return NULL;