GL_ARB_conservative_depth DONE (softpipe)
GL_ARB_shading_language_420pack not started
GL_ARB_internalformat_query not started
-GL_ARB_map_buffer_alignment not started
+GL_ARB_map_buffer_alignment DONE (r300, r600, radeonsi)
GL 4.3:
</p>
<ul>
-<li>tbd</li>
+<li>GL_ARB_map_buffer_alignment</li>
</ul>
pipe_draw_info::start_instance.
* ``PIPE_CAP_QUERY_TIMESTAMP``: Whether PIPE_QUERY_TIMESTAMP and
the pipe_screen::get_timestamp hook are implemented.
+* ``PIPE_CAP_TEXTURE_MULTISAMPLE``: Whether all MSAA resources supported
+ for rendering are also supported for texturing.
+* ``PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT``: The minimum alignment that should be
+ expected for a pointer returned by transfer_map if the resource is
+ PIPE_BUFFER. In other words, the pointer returned by transfer_map is
+ always aligned to this value.
.. _pipe_capf:
case PIPE_CAP_START_INSTANCE:
case PIPE_CAP_QUERY_TIMESTAMP:
case PIPE_CAP_TEXTURE_MULTISAMPLE:
+ case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
return 0;
case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
case PIPE_CAP_START_INSTANCE:
case PIPE_CAP_QUERY_TIMESTAMP:
case PIPE_CAP_TEXTURE_MULTISAMPLE:
+ case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
return 0;
}
/* should only get here on unhandled cases */
case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
case PIPE_CAP_START_INSTANCE:
case PIPE_CAP_TEXTURE_MULTISAMPLE:
+ case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
return 0;
case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_VERTEX_BUFFER_STRIDE_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_TEXTURE_MULTISAMPLE:
+ case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
return 0;
default:
NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_TEXTURE_MULTISAMPLE:
+ case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
return 0;
default:
NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
case PIPE_CAP_USER_CONSTANT_BUFFERS:
return 1;
+ case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
+ return 64;
+
case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
return 16;
{
struct r300_resource *rbuf = r300_resource(buf);
- FREE(rbuf->malloced_buffer);
+ align_free(rbuf->malloced_buffer);
if (rbuf->buf)
pb_reference(&rbuf->buf, NULL);
if (templ->bind & PIPE_BIND_CONSTANT_BUFFER ||
(!r300screen->caps.has_tcl &&
(templ->bind & (PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER)))) {
- rbuf->malloced_buffer = MALLOC(templ->width0);
+ rbuf->malloced_buffer = align_malloc(templ->width0, 64);
return &rbuf->b.b;
}
case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
return 1;
+ case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
+ return 64;
+
case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
return 256;
case PIPE_CAP_NPOT_TEXTURES:
return 1;
+ case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
+ return 64;
+
case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
return 256;
case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_START_INSTANCE:
case PIPE_CAP_TEXTURE_MULTISAMPLE:
+ case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
return 0;
case PIPE_CAP_QUERY_TIMESTAMP:
return 1;
case PIPE_CAP_START_INSTANCE:
case PIPE_CAP_QUERY_TIMESTAMP:
case PIPE_CAP_TEXTURE_MULTISAMPLE:
+ case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
return 0;
case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
return 1;
PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT = 71,
PIPE_CAP_START_INSTANCE = 72,
PIPE_CAP_QUERY_TIMESTAMP = 73,
- PIPE_CAP_TEXTURE_MULTISAMPLE = 74
+ PIPE_CAP_TEXTURE_MULTISAMPLE = 74,
+ PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT = 75
};
/**
}
if (st->options.force_glsl_extensions_warn)
ctx->Const.ForceGLSLExtensionsWarn = 1;
+
+ ctx->Const.MinMapBufferAlignment =
+ screen->get_param(screen, PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT);
+ if (ctx->Const.MinMapBufferAlignment >= 64) {
+ ctx->Extensions.ARB_map_buffer_alignment = GL_TRUE;
+ }
}