<daniels>
it looks like the main check is whether or not the account is 6 months old
<daniels>
and by 'main', I mean only
<karolherbst>
mhhh...
<karolherbst>
though I've seen other comments from the bot
leizhou has quit [Ping timeout: 480 seconds]
leizhou has joined #dri-devel
glennk has quit [Remote host closed the connection]
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
nerdopolis has joined #dri-devel
leizhou has quit [Ping timeout: 480 seconds]
warpme has quit []
itoral has quit [Remote host closed the connection]
warpme has joined #dri-devel
guludo has joined #dri-devel
vyivel has quit [Remote host closed the connection]
nerdopolis has quit [Ping timeout: 480 seconds]
leizhou has joined #dri-devel
leizhou has quit [Remote host closed the connection]
leizhou has joined #dri-devel
jfalempe has joined #dri-devel
<karolherbst>
in gallium, what's the best approach to copy data between buffers and images? Is that something expected of `resource_copy_region` or would I need to write a custom copy shader for those cases?
mvlad has joined #dri-devel
nerdopolis has joined #dri-devel
<zmike>
some drivers can do it with resource_copy_region
<zmike>
others probably need a compute shader
warpme has quit []
<karolherbst>
right, but if not all can do that it's not really useful. Do we have a cap or something to indicate that a specific driver can do it?
Haaninjo has quit [Ping timeout: 480 seconds]
<karolherbst>
well.. some drivers will just use a shader inside resource_copy_region anyway, I'm mostly interested if resource_copy_region is supposed to copy between buffers and images/textures or if it's valid for drivers to just crash/assert/whatever there?
warpme has joined #dri-devel
bmodem has quit [Ping timeout: 480 seconds]
<mareko>
karolherbst: can you see the messages I sent ~5 minutes ago?
<karolherbst>
mareko: I can't
<mareko>
karolherbst: resource_copy_region can only memcpy between 2 buffers and between 2 textures where the formats are equal
<mareko>
karolherbst: for copies between buffers and textures, it's missing the stride parameter at least
<karolherbst>
oh right...
<karolherbst>
though in CL the APIs for Buffer -> Image and Image -> Buffer copies use implicit strides.... but I need a custom copy shader for copy operations with custom strides (which CL also has) anyway... I know that some hardware (e.g. nvidia) could do all of this via their copy engine, but I need the shader for other hardware anyway.
<karolherbst>
maybe something for later, not that it matters much I guess...
<mareko>
if Vulkan can copy between buffers and images, it would be worth adding a pipe_context function for it because it's pretty unlikely that shaders in common code would be fast on AMD
<karolherbst>
it can
<karolherbst>
there is vkCmdCopyBufferToImage and vkCmdCopyImageToBuffer
<mareko>
karolherbst: the dedicated copy engine is usually slow and only useful for transfers over PCIe where the bandwidth is low; if you want to utilize all VRAM bandwidth (or even infinity cache bandwidth), it's very likely you have to use compute shaders
<karolherbst>
right.. but drivers like radeonsi would choose to do that internally if they care about performance here, no?
<mareko>
yes
<karolherbst>
but I think I'd start with a custom shader for now
<mareko>
karolherbst: radeonsi wouldn't even use the copy engine because it's a separate queue and there is noticable CPU overhead of submitting a command buffer to any queue that isn't gfx
<mareko>
because the gfx queue doesn't have to submit/flush
<mareko>
usually
<karolherbst>
I see
<karolherbst>
mareko: I was just looking at si_buffer_subdata and it looks almost identical to u_default_buffer_subdata except it doesn't set PIPE_MAP_DISCARD_WHOLE_RESOURCE when applicable. Is that on purpose or is that just a left over function which could be replaced with u_default_buffer_subdata?
Daanct12 has quit [Quit: WeeChat 4.3.5]
feaneron has quit [Quit: feaneron]
Company has joined #dri-devel
ella-0 has quit [Remote host closed the connection]
rosefromthedead has quit [Remote host closed the connection]
kchibisov has quit [Remote host closed the connection]
mainiomano has quit [Write error: connection closed]
kuruczgy_ has quit [Remote host closed the connection]
atiltedtree has quit [Remote host closed the connection]
rpigott has quit [Remote host closed the connection]
nucfreq has quit [Remote host closed the connection]
hummer12007 has quit [Remote host closed the connection]
ifreund has quit [Remote host closed the connection]
sumoon has quit [Remote host closed the connection]
pitust has quit [Remote host closed the connection]
kennylevinsen has quit [Remote host closed the connection]
alethkit has quit [Remote host closed the connection]
mainiomano has joined #dri-devel
rpigott has joined #dri-devel
kchibisov has joined #dri-devel
nerdopolis has quit [Ping timeout: 480 seconds]
ifreund has joined #dri-devel
atiltedtree has joined #dri-devel
pitust has joined #dri-devel
sumoon has joined #dri-devel
hummer12007 has joined #dri-devel
rosefromthedead has joined #dri-devel
kennylevinsen has joined #dri-devel
kuruczgy has joined #dri-devel
ella-0 has joined #dri-devel
alethkit has joined #dri-devel
nucfreq has joined #dri-devel
alih has quit []
ity has joined #dri-devel
ity1 has quit [Ping timeout: 480 seconds]
Haaninjo has joined #dri-devel
nucfreq has quit [Ping timeout: 480 seconds]
fab has joined #dri-devel
tango_ is now known as Guest1052
tango_ has joined #dri-devel
Guest1052 has quit [Ping timeout: 480 seconds]
glennk has joined #dri-devel
fab has quit [Ping timeout: 480 seconds]
rasterman has quit [Quit: Gettin' stinky!]
kts has joined #dri-devel
<Company>
MESA_VK_DEVICE_SELECT=10005:0 to force llvmpipe - does that work everywhere or does that magic device number change?
* Company
wondering if he can dump that into issues when asking users to reproduce something
<gfxstrand>
That should be stable
<gfxstrand>
It's hard-coded into lvp_device.c
<Company>
sweet
<gfxstrand>
Well, the 0 is. The 0x10005 is hard-coded into the Vulkan spec
smpl has joined #dri-devel
kzd has joined #dri-devel
<mareko>
karolherbst: radeonsi promotes DISCARD_RANGE to DISCARD_WHOLE_RESOURCE automatically, the reason si_buffer_subdata exists is to inline the map/unmap calls
kts_ has joined #dri-devel
kts has quit [Ping timeout: 480 seconds]
croissant_ has quit []
krushia has joined #dri-devel
croissant has joined #dri-devel
<karolherbst>
so mainly a CPU optimization here
chamlis has quit [Remote host closed the connection]
chamlis has joined #dri-devel
warpme has quit []
warpme has joined #dri-devel
warpme has quit []
heat has joined #dri-devel
Company has quit [Quit: Leaving]
Duke`` has joined #dri-devel
davispuh has quit [Ping timeout: 480 seconds]
vyivel has joined #dri-devel
asrivats has joined #dri-devel
kts_ has quit [Ping timeout: 480 seconds]
leizhou has quit [Remote host closed the connection]
leizhou has joined #dri-devel
greenjustin_ has joined #dri-devel
greenjustin is now known as Guest1067
greenjustin_ is now known as greenjustin
Guest1067 has quit [Ping timeout: 480 seconds]
jhli has joined #dri-devel
vyivel has quit [Remote host closed the connection]
vyivel has joined #dri-devel
rasterman has joined #dri-devel
vyivel has quit [Remote host closed the connection]
vyivel has joined #dri-devel
chamlis has quit [Remote host closed the connection]
chamlis has joined #dri-devel
LeviYun has quit [Ping timeout: 480 seconds]
leizhou has quit [Remote host closed the connection]
leizhou has joined #dri-devel
Company has joined #dri-devel
jhli has quit [Ping timeout: 480 seconds]
a_Tom has joined #dri-devel
jhli has joined #dri-devel
warpme has joined #dri-devel
LeviYun has joined #dri-devel
lynxeye has quit [Quit: Leaving.]
leizhou has quit [Remote host closed the connection]
<Lynne>
what happened was that shaderc had an error, didn't compile anything, but didn't return an error, so the driver got a 0-byte spv, which somehow made it as far as radv
leizhou has quit [Remote host closed the connection]
<Lynne>
I don't think the driver should segfault on bad shaders, an assert would be a good idea
smpl has quit [Ping timeout: 480 seconds]
<airlied>
Lynne: you were of course running with validation layers :-P
<Lynne>
I'm the type to remove batteries from smoke detectors :)
<HdkR>
Sounds like a good place to enjoy segfaults :)
<Lynne>
and shut off validation layers if they blatantly lie
LeviYun has quit [Ping timeout: 480 seconds]
LeviYun has joined #dri-devel
nerdopolis has joined #dri-devel
glennk has quit [Ping timeout: 480 seconds]
leizhou has joined #dri-devel
LeviYun has quit [Ping timeout: 480 seconds]
pcercuei has quit [Quit: dodo]
<Lynne>
glslang simply gives up and errors if it cannot optimize a piece of code, further cementing its status as the third worst piece of software in history
LeviYun has joined #dri-devel
LeviYun has quit [Ping timeout: 480 seconds]
<Lynne>
the validation layers don't support coop matrices, and will error out if they encounter them too
<Company>
why has nobody written a better glsl compiler yet actually?
<Company>
because I'm slowly running out of appreciation for spirv and the idea of precompiling my shaders and need a runtime spirv generator
<Company>
and there doesn't seem to be a good option other than glslang (or various wrappers around it)
<Lynne>
but they did, they're called the mesa project, I hear they're using it for something called zink
nerdopolis has quit [Ping timeout: 480 seconds]
<Company>
can I use it?
<Company>
or do I have to fork Mesa for that?
<Lynne>
sure, just rip out all the shader code out of mesa, from glsl, to nir, to spirv
<Company>
the sad part is that I am seriously considering that option
<Lynne>
so do I, and haasn
<Lynne>
but /time
<Lynne>
also pretty sure the glsl mesa frontend doesn't support vulkan syntax
<Company>
oof, right
<Lynne>
probably not difficult to add, but its something mesa has no use for
<Company>
but I need to compile cicp colorspace converters, and if I put those in the same spirv, it gets huge
<Company>
whn in GL I can just strcat() the 15 lines I need
<Company>
and if I don't compile the converter with constants and try to use vertex attribs or uniforms or whatever, it gets too slow
<Company>
I should check how mpv deals with that
<jenatali>
Company: We use Mesa for cross-compiling to DXIL as a standalone tool so we don't have to go back to shader source code
<jenatali>
I don't see why you couldn't use it as a standalone GLSL -> SPIR-V compiler
LeviYun has joined #dri-devel
<Company>
I think what I really want is a proper linker for spirv
<jenatali>
SPIRV-Tools isn't good enough?
<Company>
at runtime
<Company>
but I haven't check what spirv-tools can do
<jenatali>
You can link spirv-tools into an app
<jenatali>
That's how CLOn12 and rusticl do CL kernel linking
leizhou has quit [Remote host closed the connection]
<Company>
I will check it out
<Lynne>
isn't all that just a glslang wrapper?
<Company>
don't lower my mood again
<Company>
it looks like it just works with spirv, but it might have a glslang-based compiler in there somewhere
<jenatali>
Spirv-tools? It's got nothing to do with glslang
leizhou has joined #dri-devel
<Company>
but this definitely goes on my todo list for next cycle
<Lynne>
why would khronos write not one but two (glsl) to spirv implementations?
apinheiro has quit [Quit: Leaving]
<jenatali>
Spirv-tools doesn't touch GLSL. It only transforms SPIR-V
<jenatali>
It's got things like an optimizer, linker, and validator