case PIPE_CAP_SM3:
case PIPE_CAP_PRIMITIVE_RESTART:
- return (screen->gpu_id >= 300) ? 1 : 0;
+ return is_a3xx(screen) || is_a4xx(screen);
case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
return 256;
case PIPE_CAP_GLSL_FEATURE_LEVEL:
- return ((screen->gpu_id >= 300) && glsl130) ? 130 : 120;
+ return ((is_a3xx(screen) || is_a4xx(screen)) && glsl130) ? 130 : 120;
/* Unsupported features. */
case PIPE_CAP_INDEP_BLEND_ENABLE:
return 11;
case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS:
- return (screen->gpu_id >= 300) ? 256 : 0;
+ return (is_a3xx(screen) || is_a4xx(screen)) ? 256 : 0;
/* Render targets. */
case PIPE_CAP_MAX_RENDER_TARGETS:
case PIPE_CAP_QUERY_TIMESTAMP:
return 0;
case PIPE_CAP_OCCLUSION_QUERY:
- return (screen->gpu_id >= 300) ? 1 : 0;
+ /* TODO still missing on a4xx, but we lie to get gl2..
+ * it's not a feature, it's a bug!
+ */
+ return is_a3xx(screen) || is_a4xx(screen);
case PIPE_CAP_MIN_TEXTURE_GATHER_OFFSET:
case PIPE_CAP_MIN_TEXEL_OFFSET:
* split between VS and FS. Use lower limit of 256 to
* avoid getting into impossible situations:
*/
- return ((screen->gpu_id >= 300) ? 256 : 64) * sizeof(float[4]);
+ return ((is_a3xx(screen) || is_a4xx(screen)) ? 256 : 64) * sizeof(float[4]);
case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
return 1;
case PIPE_SHADER_CAP_MAX_PREDS:
case PIPE_SHADER_CAP_INTEGERS:
/* we should be able to support this on a3xx, but not
* implemented yet:
+ *
+ * TODO looks like a4xx will require some additional
+ * work for integer varying fetch..
*/
- return ((screen->gpu_id >= 300) && glsl130) ? 1 : 0;
+ return (is_a3xx(screen) && glsl130) ? 1 : 0;
case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS:
return 16;