v3dv: hook up robust buffer access
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
committed by
Marge Bot
parent
23c727dd67
commit
4acf5985a4
@@ -1306,6 +1306,11 @@ v3dv_CreateDevice(VkPhysicalDevice physicalDevice,
|
||||
device->devinfo = physical_device->devinfo;
|
||||
device->enabled_extensions = enabled_extensions;
|
||||
|
||||
if (pCreateInfo->pEnabledFeatures) {
|
||||
memcpy(&device->features, pCreateInfo->pEnabledFeatures,
|
||||
sizeof(device->features));
|
||||
}
|
||||
|
||||
int ret = drmSyncobjCreate(device->render_fd,
|
||||
DRM_SYNCOBJ_CREATE_SIGNALED,
|
||||
&device->last_job_sync);
|
||||
|
||||
@@ -1008,7 +1008,8 @@ shader_debug_output(const char *message, void *data)
|
||||
static void
|
||||
pipeline_populate_v3d_key(struct v3d_key *key,
|
||||
const struct v3dv_pipeline_stage *p_stage,
|
||||
uint32_t ucp_enables)
|
||||
uint32_t ucp_enables,
|
||||
bool robust_buffer_access)
|
||||
{
|
||||
/* The following values are default values used at pipeline create. We use
|
||||
* there 16 bit as default return size.
|
||||
@@ -1054,6 +1055,8 @@ pipeline_populate_v3d_key(struct v3d_key *key,
|
||||
*/
|
||||
key->ucp_enables = ucp_enables;
|
||||
|
||||
key->robust_buffer_access = robust_buffer_access;
|
||||
|
||||
key->environment = V3D_ENVIRONMENT_VULKAN;
|
||||
}
|
||||
|
||||
@@ -1100,7 +1103,8 @@ pipeline_populate_v3d_fs_key(struct v3d_fs_key *key,
|
||||
{
|
||||
memset(key, 0, sizeof(*key));
|
||||
|
||||
pipeline_populate_v3d_key(&key->base, p_stage, ucp_enables);
|
||||
const bool rba = p_stage->pipeline->device->features.robustBufferAccess;
|
||||
pipeline_populate_v3d_key(&key->base, p_stage, ucp_enables, rba);
|
||||
|
||||
const VkPipelineInputAssemblyStateCreateInfo *ia_info =
|
||||
pCreateInfo->pInputAssemblyState;
|
||||
@@ -1222,7 +1226,8 @@ pipeline_populate_v3d_vs_key(struct v3d_vs_key *key,
|
||||
{
|
||||
memset(key, 0, sizeof(*key));
|
||||
|
||||
pipeline_populate_v3d_key(&key->base, p_stage, 0);
|
||||
const bool rba = p_stage->pipeline->device->features.robustBufferAccess;
|
||||
pipeline_populate_v3d_key(&key->base, p_stage, 0, rba);
|
||||
|
||||
/* Vulkan doesn't appear to specify (anv does the same) */
|
||||
key->clamp_color = false;
|
||||
@@ -3098,7 +3103,8 @@ pipeline_compile_compute(struct v3dv_pipeline *pipeline,
|
||||
|
||||
struct v3d_key *key = &p_stage->key.base;
|
||||
memset(key, 0, sizeof(*key));
|
||||
pipeline_populate_v3d_key(key, p_stage, 0);
|
||||
pipeline_populate_v3d_key(key, p_stage, 0,
|
||||
pipeline->device->features.robustBufferAccess);
|
||||
|
||||
VkResult result;
|
||||
p_stage->current_variant =
|
||||
|
||||
@@ -330,6 +330,8 @@ struct v3dv_device {
|
||||
uint32_t bo_count;
|
||||
|
||||
struct v3dv_pipeline_cache default_pipeline_cache;
|
||||
|
||||
VkPhysicalDeviceFeatures features;
|
||||
};
|
||||
|
||||
struct v3dv_device_memory {
|
||||
|
||||
Reference in New Issue
Block a user