diff options
author | Eric Anholt <eric@anholt.net> | 2013-01-28 17:44:17 +1100 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2013-03-05 16:02:38 -0800 |
commit | 731d474d98ab0cbba5e8baeaf4b2b9d24950c430 (patch) | |
tree | a4f2ce492eb50260bff93b6681175013caed52a9 /src/mesa/drivers/dri/intel/intel_pixel.c | |
parent | 3c7e96ff014299fb50f7e5f06efb96c026a406f4 (diff) |
intel: Improve the test for readpixels blit path format checking.
We were allowing things like copying RG1616 to a user's ARGB8888
format, while we were denying anything that wasn't ARGB8888 or
RGB565.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_pixel.c')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_pixel.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_pixel.c b/src/mesa/drivers/dri/intel/intel_pixel.c index bc705105d4d..f58cb855e60 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel.c +++ b/src/mesa/drivers/dri/intel/intel_pixel.c @@ -123,38 +123,6 @@ intel_check_blit_fragment_ops(struct gl_context * ctx, bool src_alpha_is_one) return true; } -/* The intel_region struct doesn't really do enough to capture the - * format of the pixels in the region. For now this code assumes that - * the region is a display surface and hence is either ARGB8888 or - * RGB565. - * XXX FBO: If we'd pass in the intel_renderbuffer instead of region, we'd - * know the buffer's pixel format. - * - * \param format as given to glDraw/ReadPixels - * \param type as given to glDraw/ReadPixels - */ -bool -intel_check_blit_format(struct intel_region * region, - GLenum format, GLenum type) -{ - if (region->cpp == 4 && - (type == GL_UNSIGNED_INT_8_8_8_8_REV || - type == GL_UNSIGNED_BYTE) && format == GL_BGRA) { - return true; - } - - if (region->cpp == 2 && - type == GL_UNSIGNED_SHORT_5_6_5_REV && format == GL_BGR) { - return true; - } - - DBG("%s: bad format for blit (cpp %d, type %s format %s)\n", - __FUNCTION__, region->cpp, - _mesa_lookup_enum_by_nr(type), _mesa_lookup_enum_by_nr(format)); - - return false; -} - void intelInitPixelFuncs(struct dd_function_table *functions) { |