03:01 cphealy: In the past, I have worked with vendor GPU drivers (old Adreno) and their "PerfStudio" Windows tool that allows connecting to a running system and overriding some driver behaviour for performance testing purposes. One of the testing features allowed forcing the GPU driver to skip all draw calls essentially making the GPU infinitely fast. This was helpful for identifying CPU side bottlenecks among other things. Does such
03:01 cphealy: functionality exist with Mesa as a whole or as part of any of the individual GPU drivers in Mesa?
03:03 HdkR: That's a per backend thing. Like i965 has a `INTEL_NO_HW` environment variable to skip job submission
03:04 imirkin: cphealy: should be very easy to add to the state tracker if it's not there alrady
03:04 imirkin: i.e. get it to skip the actual draw calls
03:05 cphealy: When you say the state tracker, is this generic to all drivers or per driver backend?
03:05 imirkin: it's generic to all gallium drivers
03:05 imirkin: so ... no GeForce 4 Ti for you!
03:05 imirkin: not to mention Radeon 7000
03:05 cphealy: Ha, I never get to deal with HW that powerful... ;-)
03:05 mattst88: imirkin: "state tracker" -> "frontend" these days :)
03:06 imirkin: mattst88: src/mesa/state_tracker
03:06 mattst88: imirkin: git pull :)
03:06 imirkin: did something change in the past 2 days?
03:06 mattst88: d6287a94b697ffe12a4e576a38943cdf4e90cdb0
03:06 imirkin: mattst88: uh huh...
03:07 imirkin: note how it's still src/mesa/state_tracker
03:07 mattst88: weird that we still have src/mesa/state_tracker
03:07 mattst88: regardless, "frontend" in src/gallium which is what you were talking about :)
03:07 imirkin: cphealy is talking about dropping draw calls in GL, i.e. src/mesa/state_tracker
03:07 imirkin: i stand by my wording.
03:08 mattst88: okay
03:08 cphealy: Another feature this old Adreno PerfStudio had was the ability to force simple pixel shaders and all textures to be really small. The idea was to help identify bottlenecks, be it the pixel shaders or texture sampling bandwidth. Do either of these exist with Mesa either?
03:08 imirkin: cphealy: frameretrace has something like that, but it's not built into mesa
03:08 imirkin: although for a different purpose
03:09 cphealy: Oh, yea, I'm thinking of something that could be enabled/disabled during runtime with an app.
03:09 imirkin: cphealy: those all sound like useful things, so ... patches welcome :)
03:09 imirkin: cphealy: gotta be a bit careful which fragment shaders you replace. wouldn't want e.g. a shader used to effect a PBO transfer to trigger this
03:09 imirkin: (i.e. an internal shader). or a blit shader
03:10 cphealy: Yea, I could easily imagine debug features like this breaking app behaviour.
03:11 imirkin: well - i just mean mesa internally generates shaders for all sorts of things
03:11 imirkin: so have to be careful about where the replacement is done
03:12 imirkin: like when you do glReadPixels and have a PBO bound and various conditions are met, we'll do a render where it uses images to write to the PBO (or texturing to read form a PBO if it's used for uploading)
14:01 Vanfanel: emersion: Since SDL2 can potentially have to display different image sizes, on the KMSDRM side I am currently re-constructing the GBM surface each time SDL2 changes image size. Should it be a good solution to just create the GBM surface with the maximum possible resolution supported by the connector, then just use drmModeAddFB() with different width and height parameters to support different image
14:01 Vanfanel: sizes?
14:02 emersion: re-creatign the GBM surface should be fine, as resizing doesn't happen too often anyways
14:03 emersion: addfb with different size _should_ work as long as you provide the right stride
14:03 emersion: but never tried it
14:05 Vanfanel: emersion: the problem is that, because of how SDL2 works internally, when it sets to fullscreen-desktop mode for example, it doesn't give me the new size until a pageflip is requested. So recreating the GBM surface is fine, but I am relying on my own speculated values, but what SDL gives me.
14:07 Vanfanel: emersion: sorry for the seemingly absurd explanation.
18:21 imirkin: are there no piglits in mesa which round-trip large textures?
18:21 imirkin: i.e. upload data + download to make sure that it's "ok"?
18:22 imirkin: i just discovered that such uploads are busted on nv50 past 4k
19:04 imirkin: (when the format is 128-bit wide, i.e. any lines over 64k)
21:38 imirkin: ajax: on the off chance you care about BE with LE GPU's, feel free to glance at https://gitlab.freedesktop.org/mesa/mesa/-/issues/1167