Conclusion:I think the idea of a "Graphics" subcommittee is great. Graphics and C++ are already intricately joined at the hip, and programmers all over the world operate at an insanely sophisticated level to do amazing things with C++. Addressing it in this way, however, feels misguided, and it feels likely that if this were to ship, there would be a fair bit of regret. Problems I think are worth tackling:1. An abstraction around a vulkan context and OpenGL context. Why not? Vulkan and OpenGL are open standards, widely compatible, and we can provide a compile time check so the user can determine if it's available or not. At runtime, it can be used to query for valid gfx devices and provide a context if possible. It should be thin and devolve to the vulkan/OpenGL headers as soon as possible, but this interoperability would drastically lower the barrier to doing all sorts of things (as a kid, I would have loved this instead of wrangling with OpenGL extension pointers and proc addresses). For the engine developers that need support for a non-Vulkan/OpenGL context, they already know how to do that, but again, this lowers the barrier.2. Texture/image formats. This area is an actual problem in the industry that is difficult to deal with and also lies in a grey area between the CPU/GPU. Different formats compress better for different types of data (alpha, no alpha, normal map, specular map, font, etc). Reading data and writing data in some set of interchange formats that are natively supported by most hardware with fallback conversions for others would be incredibly useful.3. Graphics related operations on the CPU that would benefit from a standard existing. I'm thinking SIMD, AVX, usage of ultra-wide registers, etc which could in turn be leveraged in a library like Eigen or BLAS. Minimally, I could see these operators intermingling with standard graphics pipelines or compute pipelines.4. Handling OS events (window resize, position change, mouse input events, keyboard events, multi-text input for unicode, etc), with extension ranges for platform specific events. Managing the OS event loops in a cross platform way is a huge hassle but abstractions exist that are ossified enough that I think a standard around it would provide real value (that doesn't depreciate too quickly).
On Fri, Feb 23, 2018 at 4:23 PM, Jeremy Ong <jer...@plexchat.com> wrote:Conclusion:I think the idea of a "Graphics" subcommittee is great. Graphics and C++ are already intricately joined at the hip, and programmers all over the world operate at an insanely sophisticated level to do amazing things with C++. Addressing it in this way, however, feels misguided, and it feels likely that if this were to ship, there would be a fair bit of regret. Problems I think are worth tackling:1. An abstraction around a vulkan context and OpenGL context. Why not? Vulkan and OpenGL are open standards, widely compatible, and we can provide a compile time check so the user can determine if it's available or not. At runtime, it can be used to query for valid gfx devices and provide a context if possible. It should be thin and devolve to the vulkan/OpenGL headers as soon as possible, but this interoperability would drastically lower the barrier to doing all sorts of things (as a kid, I would have loved this instead of wrangling with OpenGL extension pointers and proc addresses). For the engine developers that need support for a non-Vulkan/OpenGL context, they already know how to do that, but again, this lowers the barrier.2. Texture/image formats. This area is an actual problem in the industry that is difficult to deal with and also lies in a grey area between the CPU/GPU. Different formats compress better for different types of data (alpha, no alpha, normal map, specular map, font, etc). Reading data and writing data in some set of interchange formats that are natively supported by most hardware with fallback conversions for others would be incredibly useful.3. Graphics related operations on the CPU that would benefit from a standard existing. I'm thinking SIMD, AVX, usage of ultra-wide registers, etc which could in turn be leveraged in a library like Eigen or BLAS. Minimally, I could see these operators intermingling with standard graphics pipelines or compute pipelines.4. Handling OS events (window resize, position change, mouse input events, keyboard events, multi-text input for unicode, etc), with extension ranges for platform specific events. Managing the OS event loops in a cross platform way is a huge hassle but abstractions exist that are ossified enough that I think a standard around it would provide real value (that doesn't depreciate too quickly).Note: I have no stake in this.None of the above is a proposal. Where are the papers? Who is committing to champion them? Has anybody implemented it? Etc., etc.
SD-4: WG21 Practices and Procedures: "Delay vs. bird in the hand. We cannot act on ideas without papers, and we do not significantly delay progress on concrete proposals in order to wait for alternative proposals we might get in the future."
--Nevin ":-)" Liber <mailto:ne...@eviloverlord.com> +1-847-691-1404
--
You received this message because you are subscribed to the Google Groups "SG13 - HMI" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sg13+uns...@isocpp.org.
To post to this group, send email to sg...@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/sg13/.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/sg13/CAGg_6%2BPMsASwZ8UTk56a-rgTiBcr020i2HJVK-61KFpQFNYmbw%40mail.gmail.com.
Hello SG13,My name is Jeremy and I am the CTO of a startup which builds a large-scale chat application with heavy client and server-side complexity. C++ is used heavily, albeit predominantly on the backend for scaling to hundreds of thousands of users. Formerly, I was a graphics engine developer, working on MMOs, but also games you have likely played before if you're a PC gamer. C++ is the lingua franca in this space, and I've personally written a number of home-grown renderers for experimentation purposes, but also just for fun to explore APIs such as Vulkan, Metal, D3D12, and OpenGL, SDL, and other such libraries before that. Graphics was what got me into C++ in the first place, now over 14 years ago, and I was heavily inspired by early work done in games such as Doom and Starcraft. I started on the fixed function OpenGL 2.0 pipeline while simultaneously getting acquainted with QT. I've also written some low level code that performs layout rendering, and interfaced with window managers such as X11 and the Windows system.Basically, I've been around the block a fair bit, and have been encouraged (in a Reddit thread no less: https://www.reddit.com/r/cpp/comments/7z50oa/batteries_not_included_what_should_go_in_the_c/) to express my lack of enthusiasm for this proposal here.The goal as stated by the proposal is as follows: "The audience for this technology consists of developers who need to render or display 2D graphics, regardless of what type (games or other)."
I am writing to express a professional opinion that this proposal and implementation will not service the stated goals.
It is widely unsuitable for games,
will be a constant thorn in the side of the standards committee, and will need to co-evolve with other existing open standards (OpenGL, Vulkan) as hardware changes are made.
1. Cairo as a basis is misguided.As a quick note: the proposal erroneously states that Firefox uses it, however, Firefox already switched off of it to https://skia.org/ in March of last year (Firefox 52). Skia is also used for Android and Chrome OS. That aside however, I believe this is a completely backwards choice in the modern era, suitable primarily for people who want to relive the old days of how we used to think about "graphics." Historically, C++ standards evolved by starting with lower level abstractions and bubbling up to accommodate more functionality. This holistic approach allows implementers to leverage preexisting standards and mechanisms. It also allows new implementations to surface in the wild (e.g. Boost) for further consideration and real-world testing.
Cairo skips too many steps. With it, you bring in all this baggage regarding image formats, window surfaces, GPU contexts, and more in a SINGLE proposal.
Better is to independently decide for each such decision what our stance is, release something, and then iterate. Cairo is "battle tested" in the sense that people have used it for a while, strictly for 2D things, NOT for games (a stated goal?), and people are ready to move on from it to something more modern. Bundling all of it together is high risk, and an implementer's worst nightmare. As far as a standard goes, do we really want to bring in a large dependency that is already on the cusp of deprecation? As far as I can tell, the industry is moving past using such libraries in order to better take advantage of the hardware (CSS transforms/transitions are hardware accelerated, Android is leveraging more OpenGLES capabilities directly, etc).
2. This library is far too opinionated on how UI should be done
Painting to a canvas is a very specific high level abstraction for presenting graphical elements to the end user. Starting here, again, skips too many steps. Sometimes you want a bezier curve, but other times for performance, a mipmapped texture works far better and provides more flexibility. The library has opinions on colors, memory sizing, fonts, and more. If we want to tackle these things correctly, going slower and providing incremental value to engine/library developers will get us to a better place. Even for 2D, font rendering can be surprisingly tricky (games often use signed distance textures to prevent bad aliasing). For rendering many glyphs in large unicode fonts, library implementers have to be aware of various tradeoffs, or more likely than not, present the user with a less-than-desirable result with no recourse to actually fix it.
3. The library is underspecifiedThe parts that are hard but critical (window surface, choice of driver backend, input) are vastly underspecified. It turns out, these are the things that are useful to standardize! The biggest value that additions to the C++ standard library provides is when I as a programmer can do something that I know works on all platforms and saves me time. The <atomic> and <thread> primitives are great examples of this. They did the upfront hard work of identifying an abstraction for memory ordering models on all sorts of different architectures, and presents a unified cross-platform API that is both robust and practical. Simply fantastic. In contrast, here we have a lot of geometry and color spaces that is comparatively an easier problem. This is backwards. Problems should be tackled in order of difficulty and highest risk.
4. Performance is a concernC++ as a language is, for better or worse, largely designed to facilitate programming a CPU, aka some processing unit that is branchy, smart, and moderately parallelizable. The GPU, conversely, hates branches, has limited registers/ALU operators, and is heavily parallel. The proposal recognizes to a certain degree that submission of data to the GPU can be slow, and synchronization is likely to lead to stalls on either the CPU or the GPU. However, the fundamental problem here is that the job of the CPU is to queue and submit work to the GPU (in a way that doesn't violate memory constraints). In the case of this proposal, it feels like we are overreaching beyond the general purpose nature of the programming language, and should instead, seek to interoperate with other GPU programming constructs more.
5. I can modify a library, a standard not so muchThere are a plethora of libraries that provide the functionality this proposal includes. QT, cairo, fog, skia, IMGUI, SDL, SFML, and more. Granted there are different paradigms here, and we need to mix paradigms, but the same is true for other languages. What's important is that if the library doesn't do what I want, I can modify it easily and swiftly. I can read the source code for my particular platform, and identify why there's a bottleneck. The above tools may even provide tracers or tools to profile performance or debug artifacts. If a new capability is released for some platform, they can be expected to update reasonably quickly with support for that capability. Can the same be said for a standard which needs to ship to all platforms simultaneously?
Conclusion:I think the idea of a "Graphics" subcommittee is great.
Graphics and C++ are already intricately joined at the hip, and programmers all over the world operate at an insanely sophisticated level to do amazing things with C++. Addressing it in this way, however, feels misguided, and it feels likely that if this were to ship, there would be a fair bit of regret. Problems I think are worth tackling:
1. An abstraction around a vulkan context and OpenGL context. Why not? Vulkan and OpenGL are open standards, widely compatible, and we can provide a compile time check so the user can determine if it's available or not. At runtime, it can be used to query for valid gfx devices and provide a context if possible. It should be thin and devolve to the vulkan/OpenGL headers as soon as possible, but this interoperability would drastically lower the barrier to doing all sorts of things (as a kid, I would have loved this instead of wrangling with OpenGL extension pointers and proc addresses). For the engine developers that need support for a non-Vulkan/OpenGL context, they already know how to do that, but again, this lowers the barrier.
2. Texture/image formats. This area is an actual problem in the industry that is difficult to deal with and also lies in a grey area between the CPU/GPU. Different formats compress better for different types of data (alpha, no alpha, normal map, specular map, font, etc). Reading data and writing data in some set of interchange formats that are natively supported by most hardware with fallback conversions for others would be incredibly useful.
3. Graphics related operations on the CPU that would benefit from a standard existing. I'm thinking SIMD, AVX, usage of ultra-wide registers, etc which could in turn be leveraged in a library like Eigen or BLAS. Minimally, I could see these operators intermingling with standard graphics pipelines or compute pipelines.
4. Handling OS events (window resize, position change, mouse input events, keyboard events, multi-text input for unicode, etc), with extension ranges for platform specific events. Managing the OS event loops in a cross platform way is a huge hassle but abstractions exist that are ossified enough that I think a standard around it would provide real value (that doesn't depreciate too quickly).
Thanks for reading,Jeremy
--
You received this message because you are subscribed to the Google Groups "SG13 - HMI" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sg13+uns...@isocpp.org.
To post to this group, send email to sg...@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/sg13/.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/sg13/efb3ba0b-3c84-4f46-b7dc-5c8fcb5402b7%40isocpp.org.
On Fri, Feb 23, 2018 at 4:05 PM, Nevin Liber <ne...@eviloverlord.com> wrote:None of the above is a proposal. Where are the papers? Who is committing to champion them? Has anybody implemented it? Etc., etc.Nobody is working on those. I only offer it primarily as a suggestion for a more productive starting point. It is implemented in the form of libraries mentioned above.
SD-4: WG21 Practices and Procedures: "Delay vs. bird in the hand. We cannot act on ideas without papers, and we do not significantly delay progress on concrete proposals in order to wait for alternative proposals we might get in the future."If people want to bulldoze ahead in spite of professionally stated opinions to the contrary, fine.
However, I don't agree with this principle from a pragmatic standpoint.
Having a concrete vision is important, and it is precisely the vision for this working group that I have misgivings toward. Certainly the merits of the proposal need to be considered, no matter how "concrete" it is. Personally, I don't like the idea of any compiler authorship group laboring against how to more efficiently rasterize vector graphics on their platforms. MacOS can't even ship C++17 for crying out loud.
Yes it's been in progress for four years, and frankly, I'm not convinced it's been subject to enough rigor from the right people. Late feedback is annoying and suboptimal, but I'm not sure what other recourse there was.
I don't care if nobody works on what I've suggested. I'm saying that if we were going to work on it, we're better of starting with a smaller scope and at a lower level abstraction and building upwards.
I think this proposal will do more harm than good, fragment compilers/platforms more instead of bringing them together, and waste unnecessary cycles that could be productively spent working on other initiatives.
The goal as stated by the proposal is as follows: "The audience for this technology consists of developers who need to render or display 2D graphics, regardless of what type (games or other)."I am writing to express a professional opinion that this proposal and implementation will not service the stated goals. It is widely unsuitable for games, will be a constant thorn in the side of the standards committee, and will need to co-evolve with other existing open standards (OpenGL, Vulkan) as hardware changes are made.
--
You received this message because you are subscribed to the Google Groups "SG13 - HMI" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sg13+uns...@isocpp.org.
To post to this group, send email to sg...@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/sg13/.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/sg13/CAOU91ONmU8ruRv%2BK_MGRQRgi13j9XTHr_OFwZq1j8-HA%2Bgi77Q%40mail.gmail.com.
On Feb 24, 2018, at 1:43 PM, Thiago Macieira <thi...@macieira.org> wrote:
On Saturday, 24 February 2018 12:31:16 PST Olivier Giroux wrote:
From the start we have advised to layer around hosting a web browser’s
engine and whisper higher-level HTML5/SVG constructs to it, with DPI/format
agnosticism by default. Every vendor has massive investments in this; it
would serve the community much more to create modern-feeling « apps » than
present Win95/X11 constructs. I’ll note that JF brought this up as a
question in his reply to the steering group’s paper.
Finally, I don’t know what our position would be on a 3D proposal. The bar
would be high, that’s all I know.
I don't think either of the two options would fit all cases.
Yes, HTML5/SVG-
like declarative constructs have their place and definitely DPI-independence.
I assume you were talking about writing in C++ the engine that takes that
input, as opposed to writing declarative in C++.
3D will likely take up
another niche and could but will not necessarily overlap HTML5 engine.
There's another niche which is that of constrained devices that only need 2D.
Just think of all the IoT devices that may pop up in the next 5 years and will
have displays (the vast majority of IoT won't). This is what I think the
current papers most attempt to address.
So to be honest, I don't think those
papers are wrong, they are just insufficient. That's not a reason to stop
them. But we need to understand the limitations and use-cases.
Then there's of course all the new technologies, like AR/VR/MR, CV, and input
sensors that go with it.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
--
You received this message because you are subscribed to the Google Groups "SG13 - HMI" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sg13+uns...@isocpp.org.
To post to this group, send email to sg...@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/sg13/.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/sg13/12617695.pnEiOrK3G8%40tjmaciei-mobl1.
On Fri, Feb 23, 2018 at 4:23 PM, Jeremy Ong <jer...@plexchat.com> wrote:
Conclusion:
Note: I have no stake in this.None of the above is a proposal. Where are the papers? Who is committing to champion them? Has anybody implemented it? Etc., etc.SD-4: WG21 Practices and Procedures: "Delay vs. bird in the hand. We cannot act on ideas without papers, and we do not significantly delay progress on concrete proposals in order to wait for alternative proposals we might get in the future."
--Nevin ":-)" Liber <mailto:ne...@eviloverlord.com> +1-847-691-1404