RHI

A strange reason for QRhiGraphicsPipeline create failure

Recently while learning the Qt RHI graphics rendering framework I encountered a strange problem: QRhiGraphicsPipeline inexplicably returned false on create! During the time this problem appeared, I was debugging the fragment shader, specifically studying HDR display shaders, and frequently toggling Windows HDR on and off. At one point I thought it was a system issue, so I tried switching to SDR, but the error persisted.

Later, after spending some time reverting modifications, I finally isolated the cause…

First, note that the program framework was basically copied from the Qt official documentation example: https://doc.qt.io/qt-6/qtgui-rhiwindow-example.html. The error occurs at the following code location:

Continue reading…