TEXCOORD semantic.
Also, TGSI_SEMANTIC_PCOORD becomes available, which labels a fragment shader
input that will always be replaced with sprite coordinates.
+* ``PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER``: Whether it is preferable
+ to use a blit to implement a texture transfer which needs format conversions
+ and swizzling in state trackers. Generally, all hardware drivers with
+ dedicated memory should return 1 and all software rasterizers should return 0.
.. _pipe_capf:
return 1;
case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
return 1;
+ case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
+ return 0;
}
/* should only get here on unhandled cases */
debug_printf("Unexpected PIPE_CAP %d query\n", param);
case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
+ case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
return 1;
default:
debug_printf("unknown param %d\n", param);
case PIPE_CAP_TGSI_TEXCOORD:
case PIPE_CAP_TEXTURE_MULTISAMPLE:
return 0;
+ case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
+ return 1;
default:
NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
return 0;
return 0;
case PIPE_CAP_COMPUTE:
return (class_3d >= NVE4_3D_CLASS) ? 1 : 0;
+ case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
+ return 1;
default:
NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
return 0;
case PIPE_CAP_USER_INDEX_BUFFERS:
case PIPE_CAP_USER_CONSTANT_BUFFERS:
case PIPE_CAP_DEPTH_CLIP_DISABLE: /* XXX implemented, but breaks Regnum Online */
+ case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
return 1;
case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
case PIPE_CAP_START_INSTANCE:
case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
+ case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
return 1;
case PIPE_CAP_TGSI_TEXCOORD:
return 0;
case PIPE_CAP_USER_CONSTANT_BUFFERS:
case PIPE_CAP_START_INSTANCE:
case PIPE_CAP_NPOT_TEXTURES:
+ case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
return 1;
case PIPE_CAP_TGSI_TEXCOORD:
return 0;
case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
return 0;
case PIPE_CAP_TGSI_TEXCOORD:
+ case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
return 0;
}
/* should only get here on unhandled cases */
case PIPE_CAP_GLSL_FEATURE_LEVEL:
return 120;
+ case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
+ return 1;
+
/* Unsupported features */
case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
PIPE_CAP_CUBE_MAP_ARRAY = 76,
PIPE_CAP_TEXTURE_BUFFER_OBJECTS = 77,
PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 78,
- PIPE_CAP_TGSI_TEXCOORD = 79
+ PIPE_CAP_TGSI_TEXCOORD = 79,
+ PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER = 80
};
/**
st_validate_state(st);
st_flush_bitmap_cache(st);
+ if (!st->prefer_blit_based_texture_transfer) {
+ goto fallback;
+ }
+
/* This must be done after state validation. */
src = strb->texture;
unsigned bind;
GLubyte *map;
+ if (!st->prefer_blit_based_texture_transfer) {
+ goto fallback;
+ }
+
if (!dst) {
goto fallback;
}
ubyte *map = NULL;
boolean done = FALSE;
+ if (!st->prefer_blit_based_texture_transfer) {
+ goto fallback;
+ }
+
if (!stImage->pt) {
goto fallback;
}
st->has_stencil_export =
screen->get_param(screen, PIPE_CAP_SHADER_STENCIL_EXPORT);
st->has_shader_model3 = screen->get_param(screen, PIPE_CAP_SM3);
+ st->prefer_blit_based_texture_transfer = screen->get_param(screen,
+ PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER);
st->needs_texcoord_semantic =
screen->get_param(screen, PIPE_CAP_TGSI_TEXCOORD);
boolean has_stencil_export; /**< can do shader stencil export? */
boolean has_time_elapsed;
boolean has_shader_model3;
+ boolean prefer_blit_based_texture_transfer;
boolean needs_texcoord_semantic;