swr: fix support for GL_ARB_copy_image extension
This commit fix support and adjusts the capabilities returned by the SWR driver and the documentation to correctly report the GL_ARB_copy_image extension. Reviewed-by: Alok Hota <alok.hota@intel.com>
This commit is contained in:
@@ -171,7 +171,7 @@ GL 4.3, GLSL 4.30 -- all DONE: i965/gen8+, nvc0, r600, radeonsi, virgl
|
|||||||
GL_ARB_ES3_compatibility DONE (all drivers that support GLSL 3.30)
|
GL_ARB_ES3_compatibility DONE (all drivers that support GLSL 3.30)
|
||||||
GL_ARB_clear_buffer_object DONE (all drivers)
|
GL_ARB_clear_buffer_object DONE (all drivers)
|
||||||
GL_ARB_compute_shader DONE (freedreno/a5xx+, i965, softpipe)
|
GL_ARB_compute_shader DONE (freedreno/a5xx+, i965, softpipe)
|
||||||
GL_ARB_copy_image DONE (i965, nv50, softpipe, llvmpipe)
|
GL_ARB_copy_image DONE (i965, nv50, softpipe, llvmpipe, swr)
|
||||||
GL_KHR_debug DONE (all drivers)
|
GL_KHR_debug DONE (all drivers)
|
||||||
GL_ARB_explicit_uniform_location DONE (all drivers that support GLSL)
|
GL_ARB_explicit_uniform_location DONE (all drivers that support GLSL)
|
||||||
GL_ARB_fragment_layer_viewport DONE (i965, nv50, llvmpipe, softpipe)
|
GL_ARB_fragment_layer_viewport DONE (i965, nv50, llvmpipe, softpipe)
|
||||||
|
@@ -152,6 +152,21 @@ swr_is_format_supported(struct pipe_screen *_screen,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW)) &&
|
||||||
|
((bind & PIPE_BIND_DISPLAY_TARGET) == 0)) {
|
||||||
|
/* Disable all 3-channel formats, where channel size != 32 bits.
|
||||||
|
* In some cases we run into crashes (in generate_unswizzled_blend()),
|
||||||
|
* for 3-channel RGB16 variants, there was an apparent LLVM bug.
|
||||||
|
* In any case, disabling the shallower 3-channel formats avoids a
|
||||||
|
* number of issues with GL_ARB_copy_image support.
|
||||||
|
*/
|
||||||
|
if (format_desc->is_array &&
|
||||||
|
format_desc->nr_channels == 3 &&
|
||||||
|
format_desc->block.bits != 96) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,6 +272,7 @@ swr_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_CUBE_MAP_ARRAY:
|
case PIPE_CAP_CUBE_MAP_ARRAY:
|
||||||
case PIPE_CAP_DOUBLES:
|
case PIPE_CAP_DOUBLES:
|
||||||
case PIPE_CAP_TEXTURE_QUERY_LOD:
|
case PIPE_CAP_TEXTURE_QUERY_LOD:
|
||||||
|
case PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS:
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* MSAA support
|
/* MSAA support
|
||||||
@@ -300,7 +316,6 @@ swr_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_TGSI_TXQS:
|
case PIPE_CAP_TGSI_TXQS:
|
||||||
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
|
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
|
||||||
case PIPE_CAP_SHAREABLE_SHADERS:
|
case PIPE_CAP_SHAREABLE_SHADERS:
|
||||||
case PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS:
|
|
||||||
case PIPE_CAP_DRAW_PARAMETERS:
|
case PIPE_CAP_DRAW_PARAMETERS:
|
||||||
case PIPE_CAP_TGSI_PACK_HALF_FLOAT:
|
case PIPE_CAP_TGSI_PACK_HALF_FLOAT:
|
||||||
case PIPE_CAP_MULTI_DRAW_INDIRECT:
|
case PIPE_CAP_MULTI_DRAW_INDIRECT:
|
||||||
|
Reference in New Issue
Block a user