ctx->Extensions.ANGLE_texture_compression_dxt = true;
ctx->Extensions.EXT_demote_to_helper_invocation = true;
+
+ ctx->Const.PrimitiveRestartFixedIndex = true;
}
/** Whether to allow the fast path for frequently updated VAOs. */
bool AllowDynamicVAOFastPath;
+ /** Whether the driver can support primitive restart with a fixed index.
+ * This is essentially a subset of NV_primitive_restart with enough support
+ * to be able to enable GLES 3.1. Some hardware can support this but not the
+ * full NV extension with arbitrary restart indices.
+ */
+ bool PrimitiveRestartFixedIndex;
+
/** GL_ARB_gl_spirv */
struct spirv_supported_capabilities SpirVCapabilities;
extensions->ARB_draw_instanced &&
extensions->ARB_uniform_buffer_object &&
extensions->EXT_texture_snorm &&
- extensions->NV_primitive_restart &&
+ (extensions->NV_primitive_restart ||
+ consts->PrimitiveRestartFixedIndex) &&
extensions->OES_depth_texture_cube_map &&
extensions->EXT_texture_type_2_10_10_10_REV);
const bool es31_compute_shader =
consts->AllowGLSLCrossStageInterpolationMismatch = options->allow_glsl_cross_stage_interpolation_mismatch;
+ consts->PrimitiveRestartFixedIndex =
+ screen->get_param(screen, PIPE_CAP_PRIMITIVE_RESTART_FIXED_INDEX);
+
/* Technically we are turning on the EXT_gpu_shader5 extension,
* ARB_gpu_shader5 does not exist in GLES, but this flag is what
* switches on EXT_gpu_shader5:
*/
if (GLSLVersion >= 130 &&
extensions->ARB_uniform_buffer_object &&
- extensions->NV_primitive_restart &&
+ (extensions->NV_primitive_restart ||
+ consts->PrimitiveRestartFixedIndex) &&
screen->get_shader_param(screen, PIPE_SHADER_VERTEX,
PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS) >= 16 &&
/* Requirements for ETC2 emulation. */