summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.cpp b/src/mesa/drivers/dri/i965/brw_blorp.cpp
index e519cd91d8f..f5731b6c0f9 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp.cpp
@@ -26,6 +26,7 @@
#include "brw_blorp.h"
#include "brw_defines.h"
+#include "brw_state.h"
#include "gen6_blorp.h"
#include "gen7_blorp.h"
@@ -103,13 +104,12 @@ brw_blorp_surface_info::set(struct brw_context *brw,
this->brw_surfaceformat = BRW_SURFACEFORMAT_R8G8_UNORM;
break;
default:
- /* Blorp blits don't support any sort of format conversion (except
- * between sRGB and linear), so we can safely assume that the format is
- * supported as a render target, even if this is the source image. So
- * we can convert to a surface format using brw->render_target_format.
- */
- assert(brw->format_supported_as_render_target[mt->format]);
- this->brw_surfaceformat = brw->render_target_format[mt->format];
+ if (is_render_target) {
+ assert(brw->format_supported_as_render_target[mt->format]);
+ this->brw_surfaceformat = brw->render_target_format[mt->format];
+ } else {
+ this->brw_surfaceformat = brw_format_for_mesa_format(mt->format);
+ }
break;
}
}