Sign in with Twitter


Patrick Walton @pcwalton San Francisco, CA

Research engineer at Mozilla

490 Following   9,320 Followers   8,861 Tweets

Joined Twitter 11/9/09

@cnlohr @whitequark Mesa swrast in a VM, Xwayland. @cnlohr @whitequark The problem is that the internal “is GLX initialized?” check is unsynchronized and process-wide… @cnlohr @whitequark No, that’s not true. Your first GLX call from multiple threads will call __glxInitialize unsync… @cnlohr @whitequark That isn’t enough. It causes races. @rikarends @chadaustin The other reason for surfman's existence is to let the app choose the GPU on multi-GPU syste… @rikarends @chadaustin It's for sharing textures across threads/processes. Support for that is the main reason why… @rikarends @chadaustin Of course if you aren't using OpenGL there is no need for GLX :) But we have to support WebGL. @rikarends @chadaustin (Also I'm unsure how reliable texture from pixmap is with EGL, especially on NVIDIA. There i… @rikarends @chadaustin GLX works in more environments, like macOS/XQuartz @chadaustin Unfortunately I can't use that solution. There are two original sins: 1. GLX is an *Xlib* standard, no…
(The real answer is: Use a library—like the one I’m about to release :)—to interface with the GPU. Don’t use GLX di… GLX is not thread safe, even if you use XLockDisplay()/XUnlockDisplay(). Xlib-XCB does not fix this. First Goo… to all of the rav1e contributors bringing us up to speed! (and higher quality too, which isn't measured by P…
Retweeted by Patrick Walton @msully4321 It’s not just compiler authors, though: I’m referring to things like having to write typename, or people had an appreciation for just how much havoc the lexer hack causes in C and C++, there wouldn't be anywher…’s on the nose
@ciphergoth GLX so noXSetErrorHandler() may be the worst API I have ever seen. Every time I look I find more horrors, from the lack of a… @slava_pestov @Catfish_Man But don’t forget closing costs. Those are big (3%). And if you sell your house you lose…"Nefarious websites have analyzed other web browser engines and found flaws that have not been disclosed, and explo…
Retweeted by Patrick Walton @johnregehr Good taste in board games
@jckarter Or… y’know… vectorsI'm proud work on this! In this version we've added some @rustlang (we'll have more to say about this in the future…
Retweeted by Patrick Walton @jckarter I mean, sure, if you have an unfathomably large number of hand-drawn small-size bitmap fonts for every po… think in practice this tends to be most noticeable as small text appearing a little fuzzy under trilinear filteri…’s a bound for single-pixel error for a cached image vs. an SVG rendered via analytic AA. If you offset the cac… @imoldfella However, rendering vector content fast is still helpful, both because of dynamic content and because if… @imoldfella I think rendering each frame from scratch isn’t tenable for static content. Even if you hit 60 FPS you’…’m always second-guessing what problem my work is trying to solve to try to avoid this trap. e.g. I’m currently sk… think this trap applies to research, too. It’s way too easy to slip away from “what problem are people trying to…
@zendrawe Performance. It's almost impossible to beat texture filtering in performance, even with a fast vector ras… finished my latest thesis^H^H^H^H^H^H blog post:
Retweeted by Patrick Walton just makes me so sad. First Chrome refused to remove the behavior back when Firefox didn't…
Retweeted by Patrick Walton @avibryant It's trilinear filtering, which is linear interpolation between upscaling and downscaling. Helps to avoid abrupt transitions.
I think you could mathematically compute an error bound even...It's *really* hard to tell the difference between an SVG rendered at a certain size and a raster image of that SVG…
@superfunc @yiningkarlli SameWorse, C-style for loops are flexible in ways that don't matter and are inflexible in ways that do. They hardwire t…’s really weird that people think C-style for loops are less flexible than iterators and therefore easier to read… @x86instructions ARM
@johnregehr It saves typing :) @johnregehr This makes it more tolerable: ln -s `xcrun --show-sdk-path` /opt/sdkAgreed. @__AllanB With respect: This is easy for you to say, but minorities in China under surveillance by their governments may think differently. @_fruchtose As someone who lives in one of these buildings and knows the neighbors, this is a lie, and it's insulti… am I supposed to believe that modern C++ takes memory safety seriously when people don’t even use .at() instead… weird C++ belief: Modern C++ doesn’t use raw pointers. If that were true, modern C++ can’t use methods, bec… of the weirdest C++ beliefs is that changing “Foo *” to “Foo &” and “foo->x” to “foo.x” suddenly makes all memo… @anniefryman @jasoncrawford @Altimor @NeverSassyLaura @msgHankinson It’s pretty funny reading the NIMBYs in the com…
@whitequark @bascule GPUs were a mistake @Gankra_ @isislovecruft (To be fair, I also have a DirectX Ghidra project) @Gankra_ @isislovecruft It’s not just me, huh? @Gankra_ This is somewhat tongue in cheek, but, like, Intel made the move to 256-bit and actually got very little u… @Gankra_ I actually mostly think that 128 bits is enough for anyone. @TedMielczarek Even though it’s not faster anymore, though, GLSL’s vector syntax is really great just for readability. @TedMielczarek Actually, it’s ironic because shader-level vector code typically isn’t any faster than scalar code o… @fu5ha @Lokathor I’d like to plug pathfinder_simd too :) @TedMielczarek It’s because GLSL puts a lot of effort into ergonomics of vector code. The syntactic sugar runs in t… is no defensible reason why SIMD code should be harder to write than scalar code. GLSL has been around since… taking or returning reference counted objects (if not using smart pointers), please document whether your func… @Michael81936098 Because the memory management scheme fundamentally affects how you write the program. If you try t… @Gankra_ I think in practice when people talk about Rust strictness they’re 90% referring to lifetimes and the &/&m… @Roguelazer Lots of examples of this in the literature, going back to Tofte and Talpin’s ML Kit. That’s classic reg… safety with no GC (while still allowing dynamic allocation) is really hard. I’m skeptical it’s possible to d… @marshray You can turn that warning off, though?If your answer to “Rust is too strict during development” is “throw out safety during both development *and* deploy…’s really easy to criticize Rust for being too “strict”. It’s a lot harder to say what specific changes you’d mak… most C++ thing is looking at NULL and deciding that what it needs is to be spelled differently.
Retweeted by Patrick Walton @stephentyrone @shafikyaghmour Even using “0” as null isn’t going to go away.
@Digital_Cold Yes, but not with the APIs that OS vendors provide—you need a layer on top @WatsonLadd GLSL is OpenGL only, but there’s Direct3D, Metal, Vulkan, CUDA, OpenCL, … @weskerfoot (The reasons the OS vendors won't succeed are (1) nobody has enough market share; (2) they don't realiz… @weskerfoot I don't have high hopes. The big players want to use their APIs to achieve vendor lock-in. They won't s… @crzwdjk The problem isn't Khronos... they're doing the right thing. The problem is that the economics encourage in…
Credit the Web for forcing the vendors to collaborate on something (WebGPU), even though it's confined to browsers at the moment.I think the situation might be less bad if OS's provided no shader compilers at all. At least then we could just us…'s pretty sad that projects like gfx-rs have to spend enormous effort to provide a cross-platform abstraction ove… @kookie13 @ProfSchleich @CSElmendorf @carla_org @Yimby_Law Curious: If this is a slam-dunk argument, why is appeal being seen as a risk? @khuey_ It’s gonna be awesome when SB 50 passes only to have it be struck down along with RHNA, the density bonus, SB 330, and the HAAi love how whenever rust stabilizes a subset of a larger feature people usually find a way to hack back the larger…
Retweeted by Patrick Walton @whitequark Yeah, but presumably __STDC_VERSION__ allows more than one digit per version number component @paulbaumgart The thing is, OpenGL is on version 4 so I don’t think any more 1.x versions can ever be released!I’m not sure whether this code to check (major < 2 || (major == 2 && minor <= 1)) is clever or extremely cursed as I tweet that I realize that this principle would exclude all I/O tests as the Linux kernel has no testsIs it pointless to write unit tests for Rust libraries that wrap libraries that don’t have any tests themselves?Current status: Lies, damn lies, and GLX documentation.
@ciphergoth The most important thing is that using the lack of stack probes on ARM as an excuse to write in C is ri… @ciphergoth It's something we would like to implement on ARM. Mostly requires some LLVM work. @ciphergoth And in the very unlikely event that this were exploitable on ARM or whatever (remember, you would have… @ciphergoth There's always a guard page and at least on most platforms there is a stack probe as well for large act… a *checked* stack overflow a "buffer overflow" is totally disingenuous. wrote __probestack for this. "Could be exploitable?" Come on.
@hsivonen Working on stable Rust is the big one. I also prefer GLSL-style .xyzw syntax to the shuffle macro, though… @RichFelker Right.pathfinder_simd is a simple 128-bit SIMD abstraction with a scalar fallback. It has implementations for x86-64 and… published a couple of useful Rust libraries that I use for several of my projects: and… @fugueish I’m pretty sure the state is going to take away the BoS’ toys fairly soon so it won’t matter much.
@yawaramin @jckarter @superfunc That is the most Facebook project I have ever seen @jckarter @superfunc ocaml_of_php @jckarter @Gankra_ I wonder what the perf would be like if you had the ability to generate specialized bytecode at…