On Tuesday, July 22, 2014 12:19:48 PM Pohjolainen, Topi wrote: > On Fri, Jul 18, 2014 at 02:16:40PM -0700, Jordan Justen wrote: > > (171e633 for gen6) > > > > This will be used in 3DSTATE_DEPTH_BUFFER in a later patch. > > > > Note: Cube maps are treated as 2D arrays with 6 times as > > many array elements as the cube map array would have. > > > > Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com> > > --- > > src/mesa/drivers/dri/i965/gen6_blorp.cpp | 17 ++++++++++++++ > > src/mesa/drivers/dri/i965/gen6_depth_state.c | 33 > > ++++++++++++++++++++++++++++ > > 2 files changed, 50 insertions(+) > > > > diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.cpp > > b/src/mesa/drivers/dri/i965/gen6_blorp.cpp > > index eb865b9..3fc36aa 100644 > > --- a/src/mesa/drivers/dri/i965/gen6_blorp.cpp > > +++ b/src/mesa/drivers/dri/i965/gen6_blorp.cpp > > @@ -791,6 +791,23 @@ gen6_blorp_emit_depth_stencil_config(struct > > brw_context *brw, > > uint32_t draw_x = params->depth.x_offset; > > uint32_t draw_y = params->depth.y_offset; > > uint32_t tile_mask_x, tile_mask_y; > > + uint32_t surftype; > > + GLenum gl_target = params->depth.mt->target; > > + > > + switch (gl_target) { > > + case GL_TEXTURE_CUBE_MAP_ARRAY: > > + case GL_TEXTURE_CUBE_MAP: > > + /* The PRM claims that we should use BRW_SURFACE_CUBE for this > > + * situation, but experiments show that gl_Layer doesn't work when > > we do > > + * this. So we use BRW_SURFACE_2D, since for rendering purposes > > this is > > + * equivalent. > > + */ > > + surftype = BRW_SURFACE_2D; > > + break; > > + default: > > + surftype = translate_tex_target(gl_target); > > + break; > > + } > > Patches 5-7 look identical to the gen7 equivalent and hence in principle: > > Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> > > But having said that I think we need to start planning how to merge all the > duplicate surface state logic between gen6-gen8. For example, the switch > statement above can be now found twice per generation.
Agreed. I'd like to see this work land - split Gen4-5/Gen6 out - then look at combining things in a better way. Patches 5-7 are: Reviewed-by: Kenneth Graunke <kenn...@whitecape.org>
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev