[Mesa-users] Vulkan VK_ICD_FILENAMES and /dev/dri/renderD128 permissions

Cordell George Bloor cgbloor at ucalgary.ca
Sat Feb 20 09:20:34 UTC 2016


Whoops. It appears VK_ERROR_OUT_OF_HOST_MEMORY was due to running the cube program from the wrong directory. The cube example lacks error checking and if the file cannot be read, it ends up passing an uninitialized value as the shader size. In my case, it was a ridiculously large value.

Fixing that, my new assertion comes after these messages. (I added the printout at anv_gem.c:190 in my local branch):

anv_descriptor_set.c:256: FINISHME: VkDescriptorPool is a stub
anv_gem.c:190: anv_gem_execbuffer: device->fd: 4, errno: 5, strerr: Input/output error
anv_device.c:747: execbuf2 failed: Input/output error (VK_ERROR_OUT_OF_DEVICE_MEMORY)
anv_gem.c:190: anv_gem_execbuffer: device->fd: 4, errno: 5, strerr: Input/output error
anv_device.c:747: execbuf2 failed: Input/output error (VK_ERROR_OUT_OF_DEVICE_MEMORY)
anv_gem.c:190: anv_gem_execbuffer: device->fd: 4, errno: 5, strerr: Input/output error
anv_device.c:1018: execbuf2 failed: Input/output error (VK_ERROR_OUT_OF_DEVICE_MEMORY)
cube: ../cube.c:473: demo_flush_init_cmd: Assertion `!err' failed.
Aborted (core dumped)

Sincerely,
Cory Bloor

________________________________________
From: Cordell George Bloor
Sent: Friday, February 19, 2016 6:31 PM
To: Olivier Galibert
Cc: mesa-users at lists.freedesktop.org
Subject: Re: [Mesa-users] Vulkan VK_ICD_FILENAMES and /dev/dri/renderD128 permissions

It's actually a laptop, so I am logged in. I suppose whatever script responsible for doing that must be missing on Ubuntu 14.04. Since I'm the only user of this machine, I temporarily hacked around the problem using `sudo chmod 666 /dev/dri/renderD128`

vulkaninfo seems to complete successfully now. However, the LunarG cube example does not run. It starts with this warning:

    WARNING: Haswell Vulkan support is incomplete
    anv_device.c:407: FINISHME: Get correct values for VkPhysicalDeviceLimits

It spews a few dozen lines with more info, then dies with this error:

    anv_pipeline.c:57: VK_ERROR_OUT_OF_HOST_MEMORY
    cube: ../cube.c:1448: demo_prepare_shader_module: Assertion `!err' failed.

I may abandon this effort, as I'm using the Ubuntu 14.04 LTS Enablement stack to get the newer kernel. That would be fine, but I'm experiencing the occasional crash with Mesa 11.0.2 in my day-to-day usage. It seems the vulkan driver is not finished for my hardware anyways. I might as well wait for Ubuntu 16.04 and try again then.

I created a detailed guide of my process thus far:
https://gist.github.com/cgmb/7f5ee12c00af5c655235

My full logs are here:
https://gist.github.com/cgmb/369687ce9ddca97c6b53

Thanks,
Cory Bloor

________________________________________
From: Olivier Galibert <galibert at pobox.com>
Sent: Friday, February 19, 2016 3:44 AM
To: Cordell George Bloor
Cc: mesa-users at lists.freedesktop.org
Subject: Re: [Mesa-users] Vulkan VK_ICD_FILENAMES and /dev/dri/renderD128 permissions

   Hi,

You need to log into the system, I guess.  The login process adds an
acl to give you access to /dev/dri/renderD128 when you log in, and
removes it when you log out (and probably change vt).  If direct
rendering works, then it works.  Did you try to do your tests remotely
with the system still on the login page? Been there, done that, got
the T-shirt.

Also, if the environment variable annoys you, the loader looks into
/etc/vulkan/icd.d for the json files, so you can symlink it there and
it'll just work.

Best,

  OG.


On Fri, Feb 19, 2016 at 3:48 AM, Cordell George Bloor
<cgbloor at ucalgary.ca> wrote:
> Hello,
>
>
> I've been hacking away to try to get the vulkan branch working on Ubuntu
> 14.04 with kernel 4.2.
>
>
> I noticed that in the vulkan branch, README.intel-vulkan.txt suggests using
> `export VK_ICD_FILENAMES="$MESA_TOP/src/vulkan/anv_icd.json"` (link).
> However, there doesn't seem to be a anv_icd.json file anywhere in the
> repository. I tried `export
> VK_ICD_FILENAMES="$MESA_TOP/src/intel/vulkan/dev_icd.json"`, which seemed to
> work better. I presume somebody just forgot to update the readme after
> changing the name.
>
>
> Of course, vulkaninfo still fails. It just gets further than it did before.
> I'm a little stuck on the next error:
>
> anv_device.c:66: failed to open /dev/dri/renderD128: Permission denied
> (VK_ERROR_INITIALIZATION_FAILED)
>
>
> I haven't changed its permissions from the defaults it came with:
> 'crw-rw---- 1 root video 226, 128 Feb 18 16:18 /dev/dri/renderD128'.
>
>
> Any suggestions? Did I miss something I needed to do?
>
>
> Thanks,
>
> Cory Bloor
>
>
> _______________________________________________
> mesa-users mailing list
> mesa-users at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-users
>


More information about the mesa-users mailing list