<div dir="auto">Thank you Apinherio, Jason, Jacob, Dave and all other mesa devs for being patient with my questions. For now I am able to make progress with debug build of vulkan loader.<div dir="auto"><br></div><div dir="auto">There are still many things to learn.</div><div dir="auto"><br></div><div dir="auto">-Vivek</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 24 Aug, 2020, 3:34 pm apinheiro, <<a href="mailto:apinheiro@igalia.com" target="_blank" rel="noreferrer">apinheiro@igalia.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<div>On 24/8/20 11:58, vivek pandya wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Aug 24, 2020 at 3:26
PM apinheiro <<a href="mailto:apinheiro@igalia.com" rel="noreferrer noreferrer" target="_blank">apinheiro@igalia.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p><br>
</p>
<div>On 24/8/20 11:39, vivek pandya wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Aug 24,
2020 at 3:06 PM apinheiro <<a href="mailto:apinheiro@igalia.com" rel="noreferrer noreferrer" target="_blank">apinheiro@igalia.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p><br>
</p>
<div>On 24/8/20 11:23, vivek pandya wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div><span>Following output is generated
due to my printfs. <br>
</span></div>
<div><span><br>
</span></div>
<div><span>GetInstanceProcAddr called for:
vkCreateInstance </span></div>
<div><span></span></div>
<span> GetInstanceProcAddr called for:
vkEnumerateInstanceExtensionProperties <br>
GetInstanceProcAddr called for:
vkDestroyInstance <br>
</span></div>
<div dir="ltr"><span><br>
</span></div>
<div><span>Also I see the correct path from
where ICD is being loaded.</span></div>
</div>
</blockquote>
<p>Where those printfs are placed? As far as I
see those are on the loader directly. My
advice was about to put the printf on your
vulkan method implementations, to confirm if
they are being called.</p>
</div>
</blockquote>
<div>With Debugger I have checked that it reaches
upto CreateInstance() implementation in my
device.c</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<blockquote type="cite">
<div dir="ltr">
<div><span><br>
</span></div>
<div><span>I don't have any other vulkan
tests for now. I will build mesa-demos
and test. <br>
</span></div>
</div>
</blockquote>
<p><br>
</p>
<p>Then it will be really likely that more
methods that the bare minimum would be called.
Taking into account that your plan is starting
as small as possible, I think that you should
start writing a small vulkan test calling as
less as possible vulkan methods, even if it
doesn't do anything at all. At least until you
get your vulkan methods implementation being
properly loaded and called.</p>
</div>
</blockquote>
<div>Could you please recall how you have tested
initial commits? <br>
</div>
</div>
</div>
</blockquote>
<p><br>
</p>
<p>Those commits were not enough to get any test working.
As mentioned it was just the basic skeleton. Most of
those methods are just empty stubs that doesn't do
anything. So getting those methods called was the first
starting point.</p>
<p>After that, our objective was trying to get a really
basic Vulkan tests working. As mentioned, we started
with a real basic test that just did a clear, as in that
way, we didn't need to bother with the compiler yet. We
didn't save that test though. In any case, it was really
simple, so it should be easy to recreate.</p>
</div>
</blockquote>
<div>Okay I will write a very simple test. <br>
</div>
<div>One last thing, for your change and with simple test,
were you able to reach upto <code><span>v3dv_CreateShaderModule</span><span></span></code>() in debugger?</div>
</div>
</div>
</blockquote>
<p><br>
</p>
<p>As I already mentioned (twice) that simple program only did a
clear, so we could test without needing to work on the compiler
side of things yet. So that program didn't even call
v3dv_CreateShaderModule.</p>
<p>BR<br>
</p>
<p><br>
</p>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_quote">
<div><br>
</div>
<div>Thanks,</div>
<div>Vivek<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>BR<br>
</p>
<p><br>
</p>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p><br>
</p>
<blockquote type="cite">
<div dir="ltr">
<div> </div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon,
Aug 24, 2020 at 2:44 PM apinheiro <<a href="mailto:apinheiro@igalia.com" rel="noreferrer noreferrer" target="_blank">apinheiro@igalia.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p><br>
</p>
<div>On 24/8/20 10:25, vivek pandya
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Removing a few people who may
not be interested in low level
testing details.<br>
</div>
<div>As far as <a href="https://gitlab.freedesktop.org/apinheiro/mesa/-/commit/07d01ebf6aae2f9ae71a8bea13a5d8acccb6280e" rel="noreferrer noreferrer" target="_blank">https://gitlab.freedesktop.org/apinheiro/mesa/-/commit/07d01ebf6aae2f9ae71a8bea13a5d8acccb6280e</a></div>
<div>this commit is concerned
following output seems correct
as there are no extensions
enabled so loader will just
destroy the instance am I
correct?<br>
</div>
</div>
</blockquote>
<p><br>
</p>
<p>I'm not sure why not having
extension is related at all to what
the loader does. That commit
includes a basic implementation for
that method. And as we are not
supporting extensions, it is really
likely that the output would be
mostly empty.</p>
<p>The loader would be just there to
load the entrypoints. What your
program does with the info coming
from calling those methods it is
independent of the loader. I really
doubt the loader to do something
like destroy the instance just
because
vkEnumerateInstanceExtensionProperties
returns an empty set. It is more
likely that it is your program the
one calling vkDestroyInstance.<br>
</p>
<br>
<blockquote type="cite">
<div dir="ltr">
<div><br>
</div>
<div>DEBUG: Searching for ICD
drivers named
/home/vivek/install/lib/x86_64-linux-gnu/libvulkan_libresoc.so<br>
GetInstanceProcAddr called for:
vkCreateInstance <br>
GetInstanceProcAddr called for:
vkEnumerateInstanceExtensionProperties <br>
DEBUG: Build ICD instance
extension list<br>
DEBUG: Build ICD instance
extension list<br>
GetInstanceProcAddr called for:
vkDestroyInstance <br>
WARNING: <br>
WARNING: [Loader Message] Code 0
: terminator_CreateInstance:
Failed to CreateInstance and
find entrypoints with ICD.
Skipping ICD.<br>
</div>
</div>
</blockquote>
<p><br>
</p>
<p>Are you sure that you are using the
correct ICD and that your stubs are
being called? you can use gdb or
just silly printfs to verify that.<br>
</p>
<p><br>
</p>
<blockquote type="cite">
<div dir="ltr">
<div>WARNING:
terminator_CreateInstance:
Failed to CreateInstance and
find entrypoints with ICD.
Skipping ICD.<br>
Cannot create Vulkan instance.<br>
This problem is often caused by
a faulty installation of the
Vulkan driver or attempting to
use a GPU that does not support
Vulkan.<br>
/build/vulkan-tools-KEbD_A/vulkan-tools-1.2.131.1+dfsg1/vulkaninfo/vulkaninfo.h:371:
failed with
ERROR_INCOMPATIBLE_DRIVER</div>
<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On
Mon, Aug 24, 2020 at 7:18 AM
Jacob Lifshay <<a href="mailto:programmerjake@gmail.com" rel="noreferrer noreferrer" target="_blank">programmerjake@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="auto">
<div>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On
Sun, Aug 23, 2020, 18:38
Dave Airlie <<a href="mailto:airlied@gmail.com" rel="noreferrer noreferrer" target="_blank">airlied@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On
Mon, 24 Aug 2020 at
10:12, Jacob Lifshay
<<a href="mailto:programmerjake@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">programmerjake@gmail.com</a>>
wrote:<br>
> no, that is the
existing LLVM backend
from AMD's opengl/opencl
drivers. amdvlk came
later.<br>
<br>
Those are the same
codebase, amdvlk just
uses a fork of llvm, but
the<br>
differences are only
minor changes for
impedance mismatch and
release<br>
timing, they never
diverge more than
necessary.<br>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">yeah, what I
had meant is that the llvm
amdgpu backend was not
originally created for
amdvlk, since amdvlk didn't
exist then.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Jacob</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
</blockquote></div>