File tree 2 files changed +8
-0
lines changed
filament/backend/src/metal
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ struct MetalContext {
155
155
156
156
RenderPassFlags currentRenderPassFlags;
157
157
MetalRenderTarget* currentRenderTarget = nullptr ;
158
+ bool validPipelineBound = false ;
158
159
159
160
// State trackers.
160
161
PipelineStateTracker pipelineState;
Original file line number Diff line number Diff line change 1657
1657
// during the draw call when the program is invalid. The shader compile error has already been
1658
1658
// dumped to the console at this point, so it's fine to simply return early.
1659
1659
if (FILAMENT_ENABLE_MATDBG && UTILS_UNLIKELY (!functions)) {
1660
+ mContext ->validPipelineBound = false ;
1660
1661
return ;
1661
1662
}
1662
1663
1789
1790
clamp: 0.0 ];
1790
1791
mContext ->currentPolygonOffset = ps.polygonOffset ;
1791
1792
}
1793
+
1794
+ mContext ->validPipelineBound = true ;
1792
1795
}
1793
1796
1794
1797
void MetalDriver::bindRenderPrimitive (Handle <HwRenderPrimitive> rph) {
1886
1889
<< " draw() without a valid command encoder." ;
1887
1890
DEBUG_LOG (" draw2(...)\n " );
1888
1891
1892
+ if (FILAMENT_ENABLE_MATDBG && UTILS_UNLIKELY (!mContext ->validPipelineBound )) {
1893
+ return ;
1894
+ }
1895
+
1889
1896
// Bind the offset data.
1890
1897
if (mContext ->dynamicOffsets .isDirty ()) {
1891
1898
const auto [size, data] = mContext ->dynamicOffsets .getOffsets ();
You can’t perform that action at this time.
0 commit comments