00:05
<
anarsoul >
ddevault: does it work now?
00:05
<
ddevault >
rebuilding mesa
00:06
<
ddevault >
I have to do it from scratch each time if I want to avoid a native build
00:06
<
ddevault >
for reasons, don't judge me <_<
00:06
<
anarsoul >
I build it natively
00:06
<
anarsoul >
it's pretty fast on rockpro64
00:06
<
anarsoul >
and it's OKish on pine64-lts
00:06
<
anarsoul >
just make sure you have ccache
00:07
<
anarsoul >
I don't really believe in cross-compilation. It's almost always broken one way or another
00:07
<
ddevault >
I'm using postmarketOS, they make it pretty trivial
00:08
<
anarsoul >
fair enough
00:12
<
ddevault >
does not seem to have worked
00:12
<
anarsoul >
can you show your diff?
00:12
<
anarsoul >
(pastebin please)
00:12
<
ddevault >
certainly
00:14
<
anarsoul >
LIMA_PIXEL_FORMAT_FP16 should be 0x06, not 0x26
00:14
<
anarsoul >
it's only 5 bits
00:14
<
anarsoul >
let me check the rest...
00:18
<
ddevault >
good catch, but that shouldn't affect the extension appearing
00:18
<
ddevault >
I might want to restart some things
00:19
<
anarsoul >
well, that's weird
00:19
<
ddevault >
no, rebooting the display server doesn't help. Didn't think it would but might as well try
00:19
<
anarsoul >
it should have appeared since you exposed PIPE_FORMAT_R16G16B16A16_FLOAT
00:20
<
anarsoul >
can you show output of es2_info?
00:20
<
anarsoul >
PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR just indicates that hw supports linear filter
00:20
<
anarsoul >
*filtering
00:22
<
ddevault >
by my reading of src/mesa/state_tracker/st_extensions.c
00:22
<
ddevault >
grep for rendertarget_mapping
00:22
<
ddevault >
these first few lines should control half-float support
00:22
<
ddevault >
linear is something else
00:22
<
anarsoul >
are you sure you've applied the patch?
00:23
<
ddevault >
wait, no
00:23
<
ddevault >
I might still be running the previous patch version
00:24
<
ddevault >
lemme build things again to be sure
00:24
<
ddevault >
and get that constant fix in while I'm at it
00:24
<
anarsoul >
can you just check the sources in your build dir?
00:24
<
ddevault >
not really
00:24
<
ddevault >
I'm rebuilding the package, and shit gets cleaned up
00:24
<
ddevault >
annoying, I know
00:25
<
ddevault >
okay, the build I'm running now def has the latest patch
00:25
<
ddevault >
will get back to you when it's done
00:56
<
ddevault >
okay, progress
00:56
<
ddevault >
now it shows in es2_info, but the application I'm trying to run still doesn't think it works
00:57
<
anarsoul >
how exactly it decides that it doesn't work?
00:57
<
ddevault >
reading the code now
00:58
<
anarsoul >
(I wonder if it expects fp32 to be working...)
00:58
<
ddevault >
according to author it should work with just half float
00:58
<
ddevault >
reading code to ascertain truth
00:59
<
anarsoul >
I don't think that ver[0] >= 3 :)
00:59
<
ddevault >
wait, it shouldn't matter
00:59
<
anarsoul >
so it doesn't even need float textures
00:59
<
ddevault >
that's just one of several branches here
00:59
<
ddevault >
see the second branch
01:00
<
anarsoul >
yeah, even if it doesn't have it
01:00
<
ddevault >
the error I get is from the last line of this function, 95
01:00
<
anarsoul >
I don't see why it should fail
01:00
<
ddevault >
well, if all three branches fail, then the triples list is empty
01:00
<
ddevault >
then the for loop iterates zero times and goes to the failure branch
01:00
<
ddevault >
in theory the second branch is working now (will verify), but it could still fail in the loop
01:01
<
anarsoul >
what is tt.internalFormat?
01:01
<
ddevault >
the first member of the struct
01:02
<
ddevault >
so either R16F (first branch) or RGBA (other branches)
01:02
<
anarsoul >
are you sure it still fails there? :)
01:03
<
ddevault >
yep, just verified it
01:03
<
ddevault >
gonna try to extract glError
01:03
<
ddevault >
it hits the second branch and adds the GL_OES_texture_half_float triple
01:05
<
ddevault >
hm, glerror is zero here
01:06
<
ddevault >
well, it definitely makes it this far
01:06
<
anarsoul >
but st != gl.FRAMEBUFFER_COMPLETE ?
01:06
<
ddevault >
printing st now...
01:06
* ddevault
consults GLES.h
01:06
<
anarsoul >
GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
01:07
<
ddevault >
wrong pixel format?
01:08
<
ddevault >
can I crank up lima logging a bit
01:09
<
anarsoul >
I don't think it fails in lima
01:10
<
ddevault >
ah yeah it fails on amdgpu too if I force the second branch
01:10
<
anarsoul >
LIBGL_DEBUG=verbose <your app>
01:11
<
ddevault >
doesn't add anything of interest
01:11
<
ddevault >
lemme read some specs
01:11
<
anarsoul >
MESA_DEBUG=incomplete_fbo
01:11
<
anarsoul >
or MESA_DEBUG=1 :)
01:11
<
ddevault >
it's almost like it was tailor-made for me <3
01:12
<
ddevault >
except that it doesn't add any details
01:12
<
anarsoul >
likely you built mesa without any debug :)
01:13
<
ddevault >
dammit, here goes another mesa build
01:13
<
anarsoul >
btw you want release build once you're done
01:13
<
anarsoul >
otherwise it's gonna be pretty slow
01:13
<
anarsoul >
especially on compiling shaders
01:14
<
ddevault >
at the moment I'm only interested in this device as a development platform
01:14
<
anarsoul >
pinephone I assume?
01:14
<
ddevault >
I have to write quite a bit more code before it's ready to be my daily driver
01:14
<
ddevault >
I want to build gio so that I can use it to write a dialer and maybe an SMS app
01:14
<
anarsoul >
and wait for someone to fix modem audio
01:15
<
anarsoul >
and implement anx7688 driver so usb-c actually works
01:15
<
anarsoul >
and that's probably it?
01:16
<
ddevault >
rig up something nice for alsa, write a new on-screen keyboard, rig up my lock screen better, make idle behavior more configurable in sway, improve power management, find and improve some touch-friendly application launcher
01:16
<
ddevault >
touch bindings for sway
01:16
<
anarsoul >
why there's only 24h hours in a day...
01:16
<
ddevault >
plus SMS & calling app
01:16
<
anarsoul >
can someone make our planet spinning slower? :)
01:16
<
ddevault >
figure out video acceleration
01:16
<
ddevault >
slowing the planet would not slow the passage of time, unfortunately
01:16
<
anarsoul >
that's pretty ambitious plans
01:17
<
ddevault >
in my experience, you just have to start doing them, then people show up and help
01:17
<
ddevault >
and in any case, I'm fine with placing phone calls and sending messages at the terminal
01:18
<
ddevault >
my first SMS program is probably going to store SMS in a maildir and implement a sendmail->sms shim so I can repurpose a mail reader
01:18
<
anarsoul >
who uses SMS nowadays anyway
01:19
<
anarsoul >
looks good
01:19
<
ddevault >
oh yeah, I have to replace that bar
01:19
<
ddevault >
add that to the list :<
01:19
<
anarsoul >
you may as well start writing your own compositor
01:19
<
anarsoul >
another wlroots based compositor for phones
01:19
<
ddevault >
I am the maintainer of several wayland compositors
01:19
<
ddevault >
for the moment, I just plan on making some conservative improvements to sway to this end
01:19
deesix has quit [Ping timeout: 276 seconds]
01:20
<
ddevault >
I'm sick of writing greenfield wayland compositors -_-
01:20
<
ddevault >
oh, at some point I should also probably find something better than mpv * --shuffle as my audio player
01:20
<
ddevault >
lots to do but I'm still excited about this phone, it's all I've ever wanted from a phone :D
01:21
deesix has joined #lima
01:21
<
anarsoul >
anything wayland-based could be used in other distros/environments as well
01:22
<
anarsoul >
not sure I'm ready to replace my android phone with pinephone atm :)
01:22
<
anarsoul >
but who knows, maybe some day
01:22
<
anarsoul >
(I do have pinephone btw)
01:22
<
ddevault >
neither can I, but working towards that goal
01:23
<
anarsoul >
that's definitely exciting times
01:26
<
anarsoul >
ddevault: btw note that using fp16 textures and render targets would be 2x slower than rgba8888
01:26
<
ddevault >
for this use-case it doesn't really matter
01:27
<
ddevault >
but I will pass your warning on to the dev
01:27
<
anarsoul >
it does if you're planning to run full-screen app
01:27
<
anarsoul >
if it uses more memory bandwidth -> it uses more energy -> shorter battery life
01:27
<
ddevault >
only if it redraws often
01:28
<
anarsoul >
yeah, but still
01:28
<
ddevault >
¯\_(ツ)_/¯
01:28
<
ddevault >
this is not the power performance bottleneck right now
01:29
<
anarsoul >
there's no good reason for using fp textures on mobile devices :)
01:29
<
ddevault >
listen, this guy is saving me from writing my own GUI framework
01:29
<
ddevault >
I can only shave so many yaks
01:45
<
ddevault >
okay, now have a debug build
01:45
<
ddevault >
_lima_resource_create_with_modifiers: pres=0xaaaaf6fb53e0 width=256 height=256 depth=1 target=2 bind=a usage=0 tile=1 last_level=0
01:45
<
ddevault >
this is the only thing I get while this function is executing
01:45
<
ddevault >
not much here
01:45
<
anarsoul >
and about MESA_DEBUG=1?
01:45
<
ddevault >
that is MESA_DEBUG=1
01:46
<
anarsoul >
and MESA_DEBUG=incomplete_fbo?
01:47
<
ddevault >
no difference
01:47
<
anarsoul >
so it created pipe_resource successfully
01:48
<
ddevault >
just out of curiosity...
01:48
<
ddevault >
nevermind, that was a dead end
01:48
<
ddevault >
but it did allude to the next problem we'll face once this is done with
01:49
<
anarsoul >
try it with MESA_LOG_FILE?
01:50
<
ddevault >
set to? 1?
01:50
<
anarsoul >
to some filename
01:50
<
ddevault >
guessed that, didn't help
01:50
<
ddevault >
digging through the mesa logging code, I'm probably turning it on wrong
01:52
<
anarsoul >
what flags do you build it with?
01:53
<
ddevault >
s/buildtype=release/buildtype=debug/ +my patch
01:53
<
anarsoul >
you also need to drop -Db_ndebug=true
01:54
<
ddevault >
see you in 40 minutes
01:54
<
anarsoul >
setup yourself ccache
01:54
<
anarsoul >
I'm pretty sure it's doable
01:54
<
ddevault >
it's alledgely set up by default in pmbootstrap
01:54
<
ddevault >
I have booze, so it's not so bad
02:00
<
ddevault >
in case you were wondering
02:00
<
ddevault >
the next issue I expect we're going to face is sRGB
02:00
<
anarsoul >
we're faking sRGB support for GL2
02:00
<
ddevault >
why can't people just stick to GLES2 and call it a day
02:01
<
anarsoul >
it's not supported by hw anyway
02:02
<
anarsoul >
see R8G8B8A8_SRGB and B8G8R8A8_SRGB in lima_formats.c
02:04
<
ddevault >
source: I changed the code to pretend that the first attempted triple worked, and got an sRGB error from later in the pipeline
02:23
<
ddevault >
finally something useful
02:23
<
ddevault >
Mesa: attachment incomplete: bad internal format
02:24
<
ddevault >
see src/mesa/main/fbobject.c:909 (grep OES_texture_float)
02:25
<
ddevault >
I could get a little further by just adding PIPE_CAP_VERTEX_COLOR_UNCLAMPED, but I'm not sure what that implies
02:26
megi has quit [Ping timeout: 268 seconds]
02:54
<
ddevault >
yes, that works
02:54
<
ddevault >
now we have the sRGB issue
02:54
<
ddevault >
it's looking for GL_EXT_sRGB
02:55
<
ddevault >
by my reading of the code, it should already be there... but it's not
02:58
<
ddevault >
I have a lead, testing it
03:00
<
ddevault >
my lead is the lack of an *X8_SRGB format
03:00
<
ddevault >
st_extensions.c seems to be happy with *A8_SRGB
03:00
<
ddevault >
but st_format.c less so?
03:00
<
ddevault >
can't hurt, anyway
03:03
<
ddevault >
grepping for srgb does little on this page
03:03
<
anarsoul >
that's for VERTEX_COLOR_UNCLAMPED
03:04
<
ddevault >
this GPU allegedly supports DX9, so enabling it doesn't seem wrong per-se
03:04
<
anarsoul >
probably
03:05
* ddevault
isn't sure if he could hedge his bets any harder than that
03:05
<
anarsoul >
I'm not sure why it needs it though
03:05
<
anarsoul >
well, you can run the tests :)
03:06
<
ddevault >
I feel like I'm missing something when it comes to sRGB
03:07
<
ddevault >
st_extensions enables EXT_sRGB if any of the A8B8G8R8 (in any order) pipe formats are supported for SRGB
03:07
<
ddevault >
which lima qualifies for
03:07
<
ddevault >
so why isn't it enabled...
03:07
<
anarsoul >
piglit has glsl-clamp-vertex-color test
03:08
<
anarsoul >
are you sure that sRGB is part of gles2?
03:08
<
ddevault >
not in the slightest
03:08
<
ddevault >
but I am sure that the gio dude is going to make me pry sRGB out of his cold, dead hands
03:09
<
ddevault >
in fact it seems to be part of GLES 1
03:14
<
anarsoul >
I'm not sure why it doesn't get enabled for you
03:15
<
ddevault >
let's see if adding X8 formats helps
03:25
<
anarsoul >
ddevault: btw you should probably build mesa natively (if you have enough storage) and just install it into your local prefix
03:25
<
anarsoul >
that should be more convenient for development
03:29
<
ddevault >
yeah, I know how to build mesa
03:29
<
ddevault >
I'm just lazy, I'll set it up tomorrow if this continues until then
03:29
<
anarsoul >
sounds good
03:30
<
anarsoul >
1.5h for you till tomorrow :)
03:30
<
ddevault >
I'll be asleep by then
03:30
<
ddevault >
if this mesa I'm building now doesn't cut it, I'm done for tonight
03:37
<
ddevault >
did not work
03:38
<
ddevault >
good night!
03:38
<
ddevault >
thanks for all of your help, anarsoul
03:38
<
anarsoul >
np, thanks for working on this
03:38
<
anarsoul >
good night
05:12
Barada has joined #lima
07:38
_whitelogger has joined #lima
08:18
mripard_ is now known as mripard
08:22
yann has quit [Ping timeout: 240 seconds]
08:31
jernej has quit [Ping timeout: 246 seconds]
08:49
jernej has joined #lima
09:22
yann has joined #lima
09:41
ecloud_ has joined #lima
09:47
ecloud_ has quit [Ping timeout: 265 seconds]
10:09
megi has joined #lima
11:31
chewitt has joined #lima
12:18
warpme_ has joined #lima
12:37
chewitt has quit [Quit: Zzz..]
12:44
chewitt has joined #lima
13:57
Barada has quit [Quit: Barada]
14:15
<
anarsoul >
ddevault: we may get support for single-channel FP16 textures, but I'm not sure about render targets
14:15
<
anarsoul >
ddevault: as for sRGB: Mali4x0 doesn't support sRGB at all. So we're faking support and rendering will differ on different devices :)
14:16
<
ddevault >
understood
14:16
<
ddevault >
I'm just trying to get fake support to work :)
14:16
<
ddevault >
but first I need to figure out this FP issue. I had gotten past this earlier
14:58
chewitt has quit [Quit: Zzz..]
15:00
<
ddevault >
looks like EXT_color_buffer_half_float support will be non-trivial
15:01
<
ddevault >
it seems no mesa drivers support it at all
15:03
<
ddevault >
bleh, I have exhausted my patience for this workstream
15:03
<
ddevault >
if this guy wants gio to work on mobile devices he's going to have to be a lot more conservative with his OpenGL profile
15:08
megi has quit [Ping timeout: 250 seconds]
15:09
megi has joined #lima
16:16
yann has quit [Ping timeout: 252 seconds]
16:16
yann has joined #lima
16:33
yann has quit [Ping timeout: 245 seconds]
16:37
<
anarsoul >
ddevault: why EXT_color_buffer_half_float will be non-trivial?
16:37
<
ddevault >
because there's no support code for it at all in mesa
16:37
<
ddevault >
unlike EXT_color_buffer_float, which is just plug A into B
16:38
<
ddevault >
there is no A or B for half float
16:39
<
anarsoul >
ddevault: just duplicate EXT_color_buffer_float stuff?
16:39
dddddd has joined #lima
16:39
<
ddevault >
but more than I have time for right now
16:45
<
anarsoul >
ddevault: yeah, I'd say that float textures is quite unusual requirement for UI framework
16:47
<
ddevault >
to be fair, he has his own vector drawing library which is optimize me harder tier
16:47
<
ddevault >
I imagine it's used for that
16:49
robher has joined #lima
16:56
<
anarsoul >
btw, regarding "Are you saying the Lima driver somehow restricts the shader precision to mediump when outputting to a half float fbo"
16:56
<
anarsoul >
fragment shader on Mali4x0 is only mediump
16:56
<
anarsoul >
it doesn't support highp in hardware
16:58
<
rellla >
i'm not sure, if i did texture descriptor right, so any review is appreciated :)
17:06
<
anarsoul >
rellla: I'll look into it later today
17:42
dddddd has quit [Ping timeout: 240 seconds]
17:42
deesix has quit [Ping timeout: 252 seconds]
17:44
deesix has joined #lima
17:54
dddddd has joined #lima
18:36
yann has joined #lima
18:44
warpme_ has quit [Quit: Connection closed for inactivity]
20:26
warpme_ has joined #lima
20:33
robertfoss has quit [Ping timeout: 250 seconds]
20:35
robertfoss has joined #lima