2021-05-10
00:17pthariensflame has joined #asahi-gpu
00:19pthariensflame has quit [Client Quit]
02:38PhilippvK has joined #asahi-gpu
02:41phiologe has quit [Ping timeout: 246 seconds]
03:11bloomagx_update_shader(struct agx_context *ctx, struct agx_compiled_shader **out, enum pipe_shader_type stage, struct asahi_shader_key *key)
06:55tomtastic has quit [Ping timeout: 246 seconds]
06:57tomtastic has joined #asahi-gpu
09:52azonenberg has joined #asahi-gpu
09:52azonenbergWondering what the status of OpenGL is. Specifically how plausible it is to get GL_ARB_compute_shader in mesa working on the M1 GPU
09:52azonenbergNot an immediate priority but i have a friend getting a M1 mac who is interested in using glscopeclient on it
09:53azonenbergright now that's not possible
09:54azonenbergthe glscopeclient renderer is basically a software rasterizer in compute shaders that takes advantage of the specialized characteristics of waveform data
09:54azonenbergnamely that points are sorted in strict left to right order and in many cases at regular intervals (I have optimizations i can ifdef for that to build two different versions of the shader)
09:55azonenbergThe output is a monochrome fp32 texture that i then splat onto a full-viewport pair of triangles and use a fragment shader to tone map to colors
09:56segher has joined #asahi-gpu
09:56monochroma has joined #asahi-gpu
09:58azonenbergThe glscopeclient renderer displays a total of three fullscreen "quads" of two triangles per render pass
09:58azonenbergall with a single texture and very simple shader
09:58azonenbergFirst one is Cairo for the grid, background gradient, etc
09:58azonenbergsecond is the compute shader generated waveform
09:59azonenbergthird is Cairo again for axis labels, protocol decode annotations, and cursors
09:59azonenbergThe waveform rendering itself is basically
09:59azonenbergspawn one compute thread for each pixel along the x axis
09:59azonenbergwithin each thread: loop over all samples whose timestamp is in that pixel
10:00azonenbergfind min/max Y value, interpolating if the segment from that sample to the previous/next crosses outside the pixel
10:00azonenbergfor y=min to max waveform[x][y] += alpha
10:00azonenbergi integrate in shared memory using a couple of threads, then splat out to global memory at the very end since that's slow
10:04azonenbergNot in the shader. there's a sinc filter you can apply to a waveform with arbitrary upsample rate if you want it
10:04azonenbergand then render the upsampled waveform with the shader
10:05azonenbergbut it's just another DSP block you can put in the pipeline
10:05azonenbergglscopeclient works a lot like gnuradio or VTK/ITK
10:05azonenbergsignal sources (channels or imported files), sinks (displayed plots), and processing blocks between them in an arbitrary DAG
10:07lain has joined #asahi-gpu
10:10azonenbergAnyway, so right now it won't run on any apple platform unless it's an x86 that you dual boot linux on
10:10azonenbergHence being interested in potential for it to work on M1 at least under linux
10:10azonenberglong term a community opengl 4.x implementation that runs under osx would be nice :p
12:55choozy has joined #asahi-gpu
14:19choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
15:35choozy has joined #asahi-gpu
16:30odmir has joined #asahi-gpu
16:35odmir has quit [Ping timeout: 268 seconds]
18:31azonenbergOut of curiosity if you're not reversing any apple driver code or decapping the chip, how are you figuring out anything about the register interface?
18:31azonenbergpoking registers at random seems likely to end badly and not tell you very much
18:32azonenbergi assumed most of this kind of stuff had to be done by finding someone in a suitably friendly jurisdiction to reverse the relevant tidbits then write a clean-room spec
18:32azonenbergbut judging by the topic that's not the case
18:33azonenbergor is dynamic analysis fair game?
18:33azonenbergwatching memory accesses via jtag or something while calling various APIs?
18:34azonenbergthe last time i was faced with such a problem it was a xilinx fpga bitstream
18:34azonenbergand my solution was to decap the chip and trace out the circuits :p
18:34azonenberginterestingly enough, under US law semiconductor RE is explicitly protected and legal
18:35azonenbergso it's less gray than anything software related
18:35azonenbergYou're even explicitly allowed to use your findings to inform the design of a new chip as long as you aren't making a verbatim copy of the mask layout, or infringing on patents
19:04bloomsegher: I figure poking randomly from unprivileged userspace in a machine with SIP/etc in tact is fair game
19:25tomtastic has quit [Ping timeout: 265 seconds]
19:29tomtastic has joined #asahi-gpu
19:29dottedmag has quit [Quit: QUIT]
19:31dottedmag has joined #asahi-gpu
19:31dottedmag has joined #asahi-gpu
19:51segheranything that can destroy hardware needs some specific sequence these days (since the 90's or so), not just one poke
19:58jixi did poke random MSRs on my ryzen to find the chicken bit to make rr work and I didn't even manage to crash my machine doing that... was much less exciting than I thought it would be ;)
19:58opticronheh...reminds me of a PCI card produced at a company I worked for a long time ago. there was a two-color LED on the back panel, the hardware was missing an interlock, and the driver had a bug that allowed the wrong transistors to be turned on at the same time during a race condition which blew out the LED trace and could cause a fire
20:06opticronI think there *was* a resistor there, but it just wasn't across both of the two possible power-to-ground paths
20:23monochromajix: rr?
20:53jixyeah, that rr, some speculation that amd does affects performance counters in a way that breaks rr... so you need to turn that off https://hackmd.io/sH315lO2RuicY-SEt7ynGA?view has a write up of all that (I didn't do much apart from making educated guesses where to find the bit and trying those on my HW, others already figured out what the issue is and that some chicken bit to disable it is
21:13qyousef has joined #asahi-gpu
21:15choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
21:16qyousef_ has quit [Ping timeout: 268 seconds]
21:27sorear has joined #asahi-gpu
21:35qyousef_ has joined #asahi-gpu
21:38qyousef has quit [Ping timeout: 240 seconds]
23:11juh has joined #asahi-gpu
23:21juh has left #asahi-gpu ["departed"]