[Mesa-dev] [Bug 84145] UE4: Realistic Rendering Demo render blue
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Sep 23 19:57:52 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=84145
--- Comment #13 from Ilia Mirkin <imirkin at alum.mit.edu> ---
Untested, but I think this should help:
diff --git a/src/mesa/state_tracker/st_atom_texture.c
b/src/mesa/state_tracker/st_atom_texture.c
index aa5be61..b48b739 100644
--- a/src/mesa/state_tracker/st_atom_texture.c
+++ b/src/mesa/state_tracker/st_atom_texture.c
@@ -223,7 +223,7 @@ static unsigned last_level(struct st_texture_object *stObj)
static unsigned last_layer(struct st_texture_object *stObj)
{
- if (stObj->base.Immutable)
+ if (stObj->base.Immutable && stObj->pt->array_size > 1)
return MIN2(stObj->base.MinLayer + stObj->base.NumLayers - 1,
stObj->pt->array_size - 1);
return stObj->pt->array_size - 1;
diff --git a/src/mesa/state_tracker/st_cb_fbo.c
b/src/mesa/state_tracker/st_cb_fbo.c
index 470ab27..c06f002 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -451,7 +451,7 @@ st_update_renderbuffer_surface(struct st_context *st,
}
/* Adjust for texture views */
- if (strb->is_rtt) {
+ if (strb->is_rtt && resource->array_size > 1) {
struct gl_texture_object *tex = strb->Base.TexImage->TexObject;
first_layer += tex->MinLayer;
if (!strb->rtt_layered)
diff --git a/src/mesa/state_tracker/st_texture.c
b/src/mesa/state_tracker/st_texture.c
index c84aa45..2cd95ec 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -263,7 +263,8 @@ st_texture_image_map(struct st_context *st, struct
st_texture_image *stImage,
if (stObj->base.Immutable) {
level += stObj->base.MinLevel;
z += stObj->base.MinLayer;
- d = MIN2(d, stObj->base.NumLayers);
+ if (stObj->pt->array_size > 1)
+ d = MIN2(d, stObj->base.NumLayers);
}
z += stImage->base.Face;
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140924/f1fdb3ec/attachment.html>
More information about the mesa-dev
mailing list