diff options
author | Paul Berry <[email protected]> | 2012-06-06 10:34:12 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2012-06-07 11:03:15 -0700 |
commit | 040d0157341381708c35c2f27721ebffa2ee1db2 (patch) | |
tree | c742cc1f820bea09f0fd494bf88377c6eb9c0e6c /src/mesa/drivers/dri/i965/gen6_blorp.cpp | |
parent | 05790746df077183d6c3caf87ca2d276a60302a8 (diff) |
i965/blorp: Refactor surface format determination.
This patch moves the responsibility for deciding on the format of the
source and destination surfaces from the
gen{6,7}_blorp_emit_surface_state() functions to
brw_blorp_surface_info::set(), which is shared between Gen6 and Gen7.
This will make it possible to add support for more surface formats
without code duplication.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen6_blorp.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen6_blorp.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.cpp b/src/mesa/drivers/dri/i965/gen6_blorp.cpp index 601bc9bbcd0..3e11152cbd0 100644 --- a/src/mesa/drivers/dri/i965/gen6_blorp.cpp +++ b/src/mesa/drivers/dri/i965/gen6_blorp.cpp @@ -426,10 +426,6 @@ gen6_blorp_emit_surface_state(struct brw_context *brw, } struct intel_region *region = surface->mt->region; - /* TODO: handle other formats */ - uint32_t format = surface->map_stencil_as_y_tiled - ? BRW_SURFACEFORMAT_R8_UNORM : BRW_SURFACEFORMAT_B8G8R8A8_UNORM; - uint32_t *surf = (uint32_t *) brw_state_batch(brw, AUB_TRACE_SURFACE_STATE, 6 * 4, 32, &wm_surf_offset); @@ -437,7 +433,7 @@ gen6_blorp_emit_surface_state(struct brw_context *brw, surf[0] = (BRW_SURFACE_2D << BRW_SURFACE_TYPE_SHIFT | BRW_SURFACE_MIPMAPLAYOUT_BELOW << BRW_SURFACE_MIPLAYOUT_SHIFT | BRW_SURFACE_CUBEFACE_ENABLES | - format << BRW_SURFACE_FORMAT_SHIFT); + surface->brw_surfaceformat << BRW_SURFACE_FORMAT_SHIFT); /* reloc */ surf[1] = region->bo->offset; /* No tile offsets needed */ |