diff --git a/3rdparty/bgfx/.appveyor.yml b/3rdparty/bgfx/.appveyor.yml index 15bcc62ba2..f0424f05bb 100644 --- a/3rdparty/bgfx/.appveyor.yml +++ b/3rdparty/bgfx/.appveyor.yml @@ -5,7 +5,6 @@ os: environment: matrix: - - TOOLSET: vs2015 - TOOLSET: vs2017 configuration: diff --git a/3rdparty/bgfx/3rdparty/dear-imgui/imgui.cpp b/3rdparty/bgfx/3rdparty/dear-imgui/imgui.cpp index 6c5cb8c545..5b53e4f3cb 100644 --- a/3rdparty/bgfx/3rdparty/dear-imgui/imgui.cpp +++ b/3rdparty/bgfx/3rdparty/dear-imgui/imgui.cpp @@ -2301,7 +2301,7 @@ void ImGui::RenderNavHighlight(const ImRect& bb, ImGuiID id, ImGuiNavHighlightFl return; if (g.NavDisableHighlight && !(flags & ImGuiNavHighlightFlags_AlwaysDraw)) return; - ImGuiWindow* window = ImGui::GetCurrentWindow(); + ImGuiWindow* window = g.CurrentWindow; if (window->DC.NavHideHighlightOneFrame) return; @@ -2970,7 +2970,7 @@ static void ImGui::UpdateMouseInputs() // Round mouse position to avoid spreading non-rounded position (e.g. UpdateManualResize doesn't support them well) if (IsMousePosValid(&g.IO.MousePos)) - g.IO.MousePos = ImFloor(g.IO.MousePos); + g.IO.MousePos = g.LastValidMousePos = ImFloor(g.IO.MousePos); // If mouse just appeared or disappeared (usually denoted by -FLT_MAX components) we cancel out movement in MouseDelta if (IsMousePosValid(&g.IO.MousePos) && IsMousePosValid(&g.IO.MousePosPrev)) @@ -3636,7 +3636,7 @@ void ImGui::Render() IM_ASSERT(g.Initialized); if (g.FrameCountEnded != g.FrameCount) - ImGui::EndFrame(); + EndFrame(); g.FrameCountRendered = g.FrameCount; // Gather ImDrawList to render (for each active window) @@ -4224,13 +4224,18 @@ static void SetWindowConditionAllowFlags(ImGuiWindow* window, ImGuiCond flags, b window->SetWindowCollapsedAllowFlags = enabled ? (window->SetWindowCollapsedAllowFlags | flags) : (window->SetWindowCollapsedAllowFlags & ~flags); } -ImGuiWindow* ImGui::FindWindowByName(const char* name) +ImGuiWindow* ImGui::FindWindowByID(ImGuiID id) { ImGuiContext& g = *GImGui; - ImGuiID id = ImHash(name, 0); return (ImGuiWindow*)g.WindowsById.GetVoidPtr(id); } +ImGuiWindow* ImGui::FindWindowByName(const char* name) +{ + ImGuiID id = ImHash(name, 0); + return FindWindowByID(id); +} + static ImGuiWindow* CreateNewWindow(const char* name, ImVec2 size, ImGuiWindowFlags flags) { ImGuiContext& g = *GImGui; @@ -5099,7 +5104,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) /* if (g.ActiveId == move_id) if (g.IO.KeyCtrl && IsKeyPressedMap(ImGuiKey_C)) - ImGui::LogToClipboard(); + LogToClipboard(); */ // Inner rectangle @@ -5167,13 +5172,13 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_first_use, { // Old API feature: we could pass the initial window size as a parameter. This was misleading because it only had an effect if the window didn't have data in the .ini file. if (size_first_use.x != 0.0f || size_first_use.y != 0.0f) - ImGui::SetNextWindowSize(size_first_use, ImGuiCond_FirstUseEver); + SetNextWindowSize(size_first_use, ImGuiCond_FirstUseEver); // Old API feature: override the window background alpha with a parameter. if (bg_alpha_override >= 0.0f) - ImGui::SetNextWindowBgAlpha(bg_alpha_override); + SetNextWindowBgAlpha(bg_alpha_override); - return ImGui::Begin(name, p_open, flags); + return Begin(name, p_open, flags); } #endif // IMGUI_DISABLE_OBSOLETE_FUNCTIONS @@ -5646,11 +5651,11 @@ bool ImGui::IsWindowHovered(ImGuiHoveredFlags flags) bool ImGui::IsWindowFocused(ImGuiFocusedFlags flags) { ImGuiContext& g = *GImGui; - IM_ASSERT(g.CurrentWindow); // Not inside a Begin()/End() if (flags & ImGuiFocusedFlags_AnyWindow) return g.NavWindow != NULL; + IM_ASSERT(g.CurrentWindow); // Not inside a Begin()/End() switch (flags & (ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows)) { case ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows: @@ -6419,8 +6424,8 @@ void ImGui::OpenPopupEx(ImGuiID id) popup_ref.ParentWindow = parent_window; popup_ref.OpenFrameCount = g.FrameCount; popup_ref.OpenParentId = parent_window->IDStack.back(); - popup_ref.OpenMousePos = g.IO.MousePos; popup_ref.OpenPopupPos = NavCalcPreferredRefPos(); + popup_ref.OpenMousePos = IsMousePosValid(&g.IO.MousePos) ? g.IO.MousePos : popup_ref.OpenPopupPos; //printf("[%05d] OpenPopupEx(0x%08X)\n", g.FrameCount, id); if (g.OpenPopupStack.Size < current_stack_size + 1) @@ -7097,13 +7102,20 @@ static ImVec2 ImGui::NavCalcPreferredRefPos() { ImGuiContext& g = *GImGui; if (g.NavDisableHighlight || !g.NavDisableMouseHover || !g.NavWindow) - return ImFloor(g.IO.MousePos); - - // When navigation is active and mouse is disabled, decide on an arbitrary position around the bottom left of the currently navigated item - const ImRect& rect_rel = g.NavWindow->NavRectRel[g.NavLayer]; - ImVec2 pos = g.NavWindow->Pos + ImVec2(rect_rel.Min.x + ImMin(g.Style.FramePadding.x*4, rect_rel.GetWidth()), rect_rel.Max.y - ImMin(g.Style.FramePadding.y, rect_rel.GetHeight())); - ImRect visible_rect = GetViewportRect(); - return ImFloor(ImClamp(pos, visible_rect.Min, visible_rect.Max)); // ImFloor() is important because non-integer mouse position application in back-end might be lossy and result in undesirable non-zero delta. + { + // Mouse (we need a fallback in case the mouse becomes invalid after being used) + if (IsMousePosValid(&g.IO.MousePos)) + return g.IO.MousePos; + return g.LastValidMousePos; + } + else + { + // When navigation is active and mouse is disabled, decide on an arbitrary position around the bottom left of the currently navigated item. + const ImRect& rect_rel = g.NavWindow->NavRectRel[g.NavLayer]; + ImVec2 pos = g.NavWindow->Pos + ImVec2(rect_rel.Min.x + ImMin(g.Style.FramePadding.x * 4, rect_rel.GetWidth()), rect_rel.Max.y - ImMin(g.Style.FramePadding.y, rect_rel.GetHeight())); + ImRect visible_rect = GetViewportRect(); + return ImFloor(ImClamp(pos, visible_rect.Min, visible_rect.Max)); // ImFloor() is important because non-integer mouse position application in back-end might be lossy and result in undesirable non-zero delta. + } } float ImGui::GetNavInputAmount(ImGuiNavInput n, ImGuiInputReadMode mode) @@ -8734,7 +8746,7 @@ static void SettingsHandlerWindow_WriteAll(ImGuiContext* imgui_ctx, ImGuiSetting // [SECTION] PLATFORM DEPENDENT HELPERS //----------------------------------------------------------------------------- -#if defined(_WIN32) && !defined(_WINDOWS_) && (!defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS) || !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS)) +#if defined(_WIN32) && !defined(_WINDOWS_) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS) && (!defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS) || !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS)) #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif @@ -8746,7 +8758,7 @@ static void SettingsHandlerWindow_WriteAll(ImGuiContext* imgui_ctx, ImGuiSetting #endif // Win32 API clipboard implementation -#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS) +#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS) #ifdef _MSC_VER #pragma comment(lib, "user32") diff --git a/3rdparty/bgfx/3rdparty/dear-imgui/imgui.h b/3rdparty/bgfx/3rdparty/dear-imgui/imgui.h index 66f6f5de9b..1805a46fb2 100644 --- a/3rdparty/bgfx/3rdparty/dear-imgui/imgui.h +++ b/3rdparty/bgfx/3rdparty/dear-imgui/imgui.h @@ -733,7 +733,7 @@ enum ImGuiFocusedFlags_ ImGuiFocusedFlags_None = 0, ImGuiFocusedFlags_ChildWindows = 1 << 0, // IsWindowFocused(): Return true if any children of the window is focused ImGuiFocusedFlags_RootWindow = 1 << 1, // IsWindowFocused(): Test from root window (top most parent of the current hierarchy) - ImGuiFocusedFlags_AnyWindow = 1 << 2, // IsWindowFocused(): Return true if any window is focused + ImGuiFocusedFlags_AnyWindow = 1 << 2, // IsWindowFocused(): Return true if any window is focused. Important: If you are trying to tell how to dispatch your low-level inputs, do NOT use this. Use ImGui::GetIO().WantCaptureMouse instead. ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows }; diff --git a/3rdparty/bgfx/3rdparty/dear-imgui/imgui_internal.h b/3rdparty/bgfx/3rdparty/dear-imgui/imgui_internal.h index bac04ae6af..d149af6bc2 100644 --- a/3rdparty/bgfx/3rdparty/dear-imgui/imgui_internal.h +++ b/3rdparty/bgfx/3rdparty/dear-imgui/imgui_internal.h @@ -63,6 +63,7 @@ typedef int ImGuiNavDirSourceFlags; // -> enum ImGuiNavDirSourceFlags_ // Flags: typedef int ImGuiNavMoveFlags; // -> enum ImGuiNavMoveFlags_ // Flags: for navigation requests typedef int ImGuiSeparatorFlags; // -> enum ImGuiSeparatorFlags_ // Flags: for Separator() - internal typedef int ImGuiSliderFlags; // -> enum ImGuiSliderFlags_ // Flags: for SliderBehavior() +typedef int ImGuiDragFlags; // -> enum ImGuiDragFlags_ // Flags: for DragBehavior() //------------------------------------------------------------------------- // STB libraries @@ -249,6 +250,12 @@ enum ImGuiSliderFlags_ ImGuiSliderFlags_Vertical = 1 << 0 }; +enum ImGuiDragFlags_ +{ + ImGuiDragFlags_None = 0, + ImGuiDragFlags_Vertical = 1 << 0 +}; + enum ImGuiColumnsFlags_ { // Default: 0 @@ -680,8 +687,9 @@ struct ImGuiContext ImGuiInputSource ActiveIdSource; // Activating with mouse or nav (gamepad/keyboard) ImGuiID LastActiveId; // Store the last non-zero ActiveId, useful for animation. float LastActiveIdTimer; // Store the last non-zero ActiveId timer since the beginning of activation, useful for animation. + ImVec2 LastValidMousePos; ImGuiWindow* MovingWindow; // Track the window we clicked on (in order to preserve focus). The actually window that is moved is generally MovingWindow->RootWindow. - ImVector ColorModifiers; // Stack for PushStyleColor()/PopStyleColor() + ImVector ColorModifiers; // Stack for PushStyleColor()/PopStyleColor() ImVector StyleModifiers; // Stack for PushStyleVar()/PopStyleVar() ImVector FontStack; // Stack for PushFont()/PopFont() ImVector OpenPopupStack; // Which popups are open (persistent) @@ -826,6 +834,7 @@ struct ImGuiContext ActiveIdSource = ImGuiInputSource_None; LastActiveId = 0; LastActiveIdTimer = 0.0f; + LastValidMousePos = ImVec2(0.0f, 0.0f); MovingWindow = NULL; NextTreeNodeOpenVal = false; NextTreeNodeOpenCond = 0; @@ -1114,6 +1123,7 @@ namespace ImGui // - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. inline ImGuiWindow* GetCurrentWindowRead() { ImGuiContext& g = *GImGui; return g.CurrentWindow; } inline ImGuiWindow* GetCurrentWindow() { ImGuiContext& g = *GImGui; g.CurrentWindow->WriteAccessed = true; return g.CurrentWindow; } + IMGUI_API ImGuiWindow* FindWindowByID(ImGuiID id); IMGUI_API ImGuiWindow* FindWindowByName(const char* name); IMGUI_API void FocusWindow(ImGuiWindow* window); IMGUI_API void FocusPreviousWindowIgnoringOne(ImGuiWindow* ignore_window); @@ -1246,7 +1256,7 @@ namespace ImGui // Widgets low-level behaviors IMGUI_API bool ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags = 0); - IMGUI_API bool DragBehavior(ImGuiID id, ImGuiDataType data_type, void* v, float v_speed, const void* v_min, const void* v_max, const char* format, float power); + IMGUI_API bool DragBehavior(ImGuiID id, ImGuiDataType data_type, void* v, float v_speed, const void* v_min, const void* v_max, const char* format, float power, ImGuiDragFlags flags); IMGUI_API bool SliderBehavior(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, void* v, const void* v_min, const void* v_max, const char* format, float power, ImGuiSliderFlags flags, ImRect* out_grab_bb); IMGUI_API bool SplitterBehavior(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend = 0.0f, float hover_visibility_delay = 0.0f); IMGUI_API bool TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* label, const char* label_end = NULL); @@ -1256,7 +1266,7 @@ namespace ImGui // Template functions are instantiated in imgui_widgets.cpp for a finite number of types. // To use them externally (for custom widget) you may need an "extern template" statement in your code in order to link to existing instances and silence Clang warnings (see #2036). // e.g. " extern template IMGUI_API float RoundScalarWithFormatT(const char* format, ImGuiDataType data_type, float v); " - template IMGUI_API bool DragBehaviorT(ImGuiDataType data_type, T* v, float v_speed, const T v_min, const T v_max, const char* format, float power); + template IMGUI_API bool DragBehaviorT(ImGuiDataType data_type, T* v, float v_speed, const T v_min, const T v_max, const char* format, float power, ImGuiDragFlags flags); template IMGUI_API bool SliderBehaviorT(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, T* v, const T v_min, const T v_max, const char* format, float power, ImGuiSliderFlags flags, ImRect* out_grab_bb); template IMGUI_API float SliderCalcRatioFromValueT(ImGuiDataType data_type, T v, T v_min, T v_max, float power, float linear_zero_pos); template IMGUI_API T RoundScalarWithFormatT(const char* format, ImGuiDataType data_type, T v); diff --git a/3rdparty/bgfx/3rdparty/dear-imgui/imgui_widgets.cpp b/3rdparty/bgfx/3rdparty/dear-imgui/imgui_widgets.cpp index a3667cbf00..0c05679663 100644 --- a/3rdparty/bgfx/3rdparty/dear-imgui/imgui_widgets.cpp +++ b/3rdparty/bgfx/3rdparty/dear-imgui/imgui_widgets.cpp @@ -1706,9 +1706,10 @@ TYPE ImGui::RoundScalarWithFormatT(const char* format, ImGuiDataType data_type, // This is called by DragBehavior() when the widget is active (held by mouse or being manipulated with Nav controls) template -bool ImGui::DragBehaviorT(ImGuiDataType data_type, TYPE* v, float v_speed, const TYPE v_min, const TYPE v_max, const char* format, float power) +bool ImGui::DragBehaviorT(ImGuiDataType data_type, TYPE* v, float v_speed, const TYPE v_min, const TYPE v_max, const char* format, float power, ImGuiDragFlags flags) { ImGuiContext& g = *GImGui; + const ImGuiAxis axis = (flags & ImGuiDragFlags_Vertical) ? ImGuiAxis_Y : ImGuiAxis_X; const bool is_decimal = (data_type == ImGuiDataType_Float) || (data_type == ImGuiDataType_Double); const bool has_min_max = (v_min != v_max); @@ -1720,7 +1721,7 @@ bool ImGui::DragBehaviorT(ImGuiDataType data_type, TYPE* v, float v_speed, const float adjust_delta = 0.0f; if (g.ActiveIdSource == ImGuiInputSource_Mouse && IsMousePosValid() && g.IO.MouseDragMaxDistanceSqr[0] > 1.0f*1.0f) { - adjust_delta = g.IO.MouseDelta.x; + adjust_delta = g.IO.MouseDelta[axis]; if (g.IO.KeyAlt) adjust_delta *= 1.0f / 100.0f; if (g.IO.KeyShift) @@ -1729,11 +1730,15 @@ bool ImGui::DragBehaviorT(ImGuiDataType data_type, TYPE* v, float v_speed, const else if (g.ActiveIdSource == ImGuiInputSource_Nav) { int decimal_precision = is_decimal ? ImParseFormatPrecision(format, 3) : 0; - adjust_delta = GetNavInputAmount2d(ImGuiNavDirSourceFlags_Keyboard | ImGuiNavDirSourceFlags_PadDPad, ImGuiInputReadMode_RepeatFast, 1.0f / 10.0f, 10.0f).x; + adjust_delta = GetNavInputAmount2d(ImGuiNavDirSourceFlags_Keyboard | ImGuiNavDirSourceFlags_PadDPad, ImGuiInputReadMode_RepeatFast, 1.0f / 10.0f, 10.0f)[axis]; v_speed = ImMax(v_speed, GetMinimumStepAtDecimalPrecision(decimal_precision)); } adjust_delta *= v_speed; + // For vertical drag we currently assume that Up=higher value (like we do with vertical sliders). This may become a parameter. + if (axis == ImGuiAxis_Y) + adjust_delta = -adjust_delta; + // Clear current value on activation // Avoid altering values and clamping when we are _already_ past the limits and heading in the same direction, so e.g. if range is 0..255, current value is 300 and we are pushing to the right side, keep the 300. bool is_just_activated = g.ActiveIdIsJustActivated; @@ -1804,7 +1809,7 @@ bool ImGui::DragBehaviorT(ImGuiDataType data_type, TYPE* v, float v_speed, const return true; } -bool ImGui::DragBehavior(ImGuiID id, ImGuiDataType data_type, void* v, float v_speed, const void* v_min, const void* v_max, const char* format, float power) +bool ImGui::DragBehavior(ImGuiID id, ImGuiDataType data_type, void* v, float v_speed, const void* v_min, const void* v_max, const char* format, float power, ImGuiDragFlags flags) { ImGuiContext& g = *GImGui; if (g.ActiveId == id) @@ -1819,12 +1824,12 @@ bool ImGui::DragBehavior(ImGuiID id, ImGuiDataType data_type, void* v, float v_s switch (data_type) { - case ImGuiDataType_S32: return DragBehaviorT(data_type, (ImS32*)v, v_speed, v_min ? *(const ImS32* )v_min : IM_S32_MIN, v_max ? *(const ImS32* )v_max : IM_S32_MAX, format, power); - case ImGuiDataType_U32: return DragBehaviorT(data_type, (ImU32*)v, v_speed, v_min ? *(const ImU32* )v_min : IM_U32_MIN, v_max ? *(const ImU32* )v_max : IM_U32_MAX, format, power); - case ImGuiDataType_S64: return DragBehaviorT(data_type, (ImS64*)v, v_speed, v_min ? *(const ImS64* )v_min : IM_S64_MIN, v_max ? *(const ImS64* )v_max : IM_S64_MAX, format, power); - case ImGuiDataType_U64: return DragBehaviorT(data_type, (ImU64*)v, v_speed, v_min ? *(const ImU64* )v_min : IM_U64_MIN, v_max ? *(const ImU64* )v_max : IM_U64_MAX, format, power); - case ImGuiDataType_Float: return DragBehaviorT(data_type, (float*)v, v_speed, v_min ? *(const float* )v_min : -FLT_MAX, v_max ? *(const float* )v_max : FLT_MAX, format, power); - case ImGuiDataType_Double: return DragBehaviorT(data_type, (double*)v, v_speed, v_min ? *(const double*)v_min : -DBL_MAX, v_max ? *(const double*)v_max : DBL_MAX, format, power); + case ImGuiDataType_S32: return DragBehaviorT(data_type, (ImS32*)v, v_speed, v_min ? *(const ImS32* )v_min : IM_S32_MIN, v_max ? *(const ImS32* )v_max : IM_S32_MAX, format, power, flags); + case ImGuiDataType_U32: return DragBehaviorT(data_type, (ImU32*)v, v_speed, v_min ? *(const ImU32* )v_min : IM_U32_MIN, v_max ? *(const ImU32* )v_max : IM_U32_MAX, format, power, flags); + case ImGuiDataType_S64: return DragBehaviorT(data_type, (ImS64*)v, v_speed, v_min ? *(const ImS64* )v_min : IM_S64_MIN, v_max ? *(const ImS64* )v_max : IM_S64_MAX, format, power, flags); + case ImGuiDataType_U64: return DragBehaviorT(data_type, (ImU64*)v, v_speed, v_min ? *(const ImU64* )v_min : IM_U64_MIN, v_max ? *(const ImU64* )v_max : IM_U64_MAX, format, power, flags); + case ImGuiDataType_Float: return DragBehaviorT(data_type, (float*)v, v_speed, v_min ? *(const float* )v_min : -FLT_MAX, v_max ? *(const float* )v_max : FLT_MAX, format, power, flags); + case ImGuiDataType_Double: return DragBehaviorT(data_type, (double*)v, v_speed, v_min ? *(const double*)v_min : -DBL_MAX, v_max ? *(const double*)v_max : DBL_MAX, format, power, flags); case ImGuiDataType_COUNT: break; } IM_ASSERT(0); @@ -1889,7 +1894,7 @@ bool ImGui::DragScalar(const char* label, ImGuiDataType data_type, void* v, floa // Actual drag behavior ItemSize(total_bb, style.FramePadding.y); - const bool value_changed = DragBehavior(id, data_type, v, v_speed, v_min, v_max, format, power); + const bool value_changed = DragBehavior(id, data_type, v, v_speed, v_min, v_max, format, power, ImGuiDragFlags_None); if (value_changed) MarkItemEdited(id); @@ -2096,20 +2101,20 @@ bool ImGui::SliderBehaviorT(const ImRect& bb, ImGuiID id, ImGuiDataType data_typ ImGuiContext& g = *GImGui; const ImGuiStyle& style = g.Style; - const bool is_horizontal = (flags & ImGuiSliderFlags_Vertical) == 0; + const ImGuiAxis axis = (flags & ImGuiSliderFlags_Vertical) ? ImGuiAxis_Y : ImGuiAxis_X; const bool is_decimal = (data_type == ImGuiDataType_Float) || (data_type == ImGuiDataType_Double); const bool is_power = (power != 1.0f) && is_decimal; const float grab_padding = 2.0f; - const float slider_sz = is_horizontal ? (bb.GetWidth() - grab_padding * 2.0f) : (bb.GetHeight() - grab_padding * 2.0f); + const float slider_sz = (bb.Max[axis] - bb.Min[axis]) - grab_padding * 2.0f; float grab_sz = style.GrabMinSize; SIGNEDTYPE v_range = (v_min < v_max ? v_max - v_min : v_min - v_max); if (!is_decimal && v_range >= 0) // v_range < 0 may happen on integer overflows grab_sz = ImMax((float)(slider_sz / (v_range + 1)), style.GrabMinSize); // For integer sliders: if possible have the grab size represent 1 unit grab_sz = ImMin(grab_sz, slider_sz); const float slider_usable_sz = slider_sz - grab_sz; - const float slider_usable_pos_min = (is_horizontal ? bb.Min.x : bb.Min.y) + grab_padding + grab_sz*0.5f; - const float slider_usable_pos_max = (is_horizontal ? bb.Max.x : bb.Max.y) - grab_padding - grab_sz*0.5f; + const float slider_usable_pos_min = bb.Min[axis] + grab_padding + grab_sz*0.5f; + const float slider_usable_pos_max = bb.Max[axis] - grab_padding - grab_sz*0.5f; // For power curve sliders that cross over sign boundary we want the curve to be symmetric around 0.0f float linear_zero_pos; // 0.0->1.0f @@ -2140,9 +2145,9 @@ bool ImGui::SliderBehaviorT(const ImRect& bb, ImGuiID id, ImGuiDataType data_typ } else { - const float mouse_abs_pos = is_horizontal ? g.IO.MousePos.x : g.IO.MousePos.y; + const float mouse_abs_pos = g.IO.MousePos[axis]; clicked_t = (slider_usable_sz > 0.0f) ? ImClamp((mouse_abs_pos - slider_usable_pos_min) / slider_usable_sz, 0.0f, 1.0f) : 0.0f; - if (!is_horizontal) + if (axis == ImGuiAxis_Y) clicked_t = 1.0f - clicked_t; set_new_value = true; } @@ -2150,7 +2155,7 @@ bool ImGui::SliderBehaviorT(const ImRect& bb, ImGuiID id, ImGuiDataType data_typ else if (g.ActiveIdSource == ImGuiInputSource_Nav) { const ImVec2 delta2 = GetNavInputAmount2d(ImGuiNavDirSourceFlags_Keyboard | ImGuiNavDirSourceFlags_PadDPad, ImGuiInputReadMode_RepeatFast, 0.0f, 0.0f); - float delta = is_horizontal ? delta2.x : -delta2.y; + float delta = (axis == ImGuiAxis_X) ? delta2.x : -delta2.y; if (g.NavActivatePressedId == id && !g.ActiveIdIsJustActivated) { ClearActiveID(); @@ -2242,10 +2247,10 @@ bool ImGui::SliderBehaviorT(const ImRect& bb, ImGuiID id, ImGuiDataType data_typ // Output grab position so it can be displayed by the caller float grab_t = SliderCalcRatioFromValueT(data_type, *v, v_min, v_max, power, linear_zero_pos); - if (!is_horizontal) + if (axis == ImGuiAxis_Y) grab_t = 1.0f - grab_t; const float grab_pos = ImLerp(slider_usable_pos_min, slider_usable_pos_max, grab_t); - if (is_horizontal) + if (axis == ImGuiAxis_X) *out_grab_bb = ImRect(grab_pos - grab_sz*0.5f, bb.Min.y + grab_padding, grab_pos + grab_sz*0.5f, bb.Max.y - grab_padding); else *out_grab_bb = ImRect(bb.Min.x + grab_padding, grab_pos - grab_sz*0.5f, bb.Max.x - grab_padding, grab_pos + grab_sz*0.5f); diff --git a/3rdparty/bgfx/3rdparty/dxsdk/include/d3d12.h b/3rdparty/bgfx/3rdparty/dxsdk/include/d3d12.h index 0f5de49d15..0c2e7cea8b 100644 --- a/3rdparty/bgfx/3rdparty/dxsdk/include/d3d12.h +++ b/3rdparty/bgfx/3rdparty/dxsdk/include/d3d12.h @@ -246,6 +246,48 @@ typedef interface ID3D12Device4 ID3D12Device4; #endif /* __ID3D12Device4_FWD_DEFINED__ */ +#ifndef __ID3D12LifetimeOwner_FWD_DEFINED__ +#define __ID3D12LifetimeOwner_FWD_DEFINED__ +typedef interface ID3D12LifetimeOwner ID3D12LifetimeOwner; + +#endif /* __ID3D12LifetimeOwner_FWD_DEFINED__ */ + + +#ifndef __ID3D12SwapChainAssistant_FWD_DEFINED__ +#define __ID3D12SwapChainAssistant_FWD_DEFINED__ +typedef interface ID3D12SwapChainAssistant ID3D12SwapChainAssistant; + +#endif /* __ID3D12SwapChainAssistant_FWD_DEFINED__ */ + + +#ifndef __ID3D12LifetimeTracker_FWD_DEFINED__ +#define __ID3D12LifetimeTracker_FWD_DEFINED__ +typedef interface ID3D12LifetimeTracker ID3D12LifetimeTracker; + +#endif /* __ID3D12LifetimeTracker_FWD_DEFINED__ */ + + +#ifndef __ID3D12StateObject_FWD_DEFINED__ +#define __ID3D12StateObject_FWD_DEFINED__ +typedef interface ID3D12StateObject ID3D12StateObject; + +#endif /* __ID3D12StateObject_FWD_DEFINED__ */ + + +#ifndef __ID3D12StateObjectProperties_FWD_DEFINED__ +#define __ID3D12StateObjectProperties_FWD_DEFINED__ +typedef interface ID3D12StateObjectProperties ID3D12StateObjectProperties; + +#endif /* __ID3D12StateObjectProperties_FWD_DEFINED__ */ + + +#ifndef __ID3D12Device5_FWD_DEFINED__ +#define __ID3D12Device5_FWD_DEFINED__ +typedef interface ID3D12Device5 ID3D12Device5; + +#endif /* __ID3D12Device5_FWD_DEFINED__ */ + + #ifndef __ID3D12Resource1_FWD_DEFINED__ #define __ID3D12Resource1_FWD_DEFINED__ typedef interface ID3D12Resource1 ID3D12Resource1; @@ -267,6 +309,20 @@ typedef interface ID3D12GraphicsCommandList3 ID3D12GraphicsCommandList3; #endif /* __ID3D12GraphicsCommandList3_FWD_DEFINED__ */ +#ifndef __ID3D12MetaCommand_FWD_DEFINED__ +#define __ID3D12MetaCommand_FWD_DEFINED__ +typedef interface ID3D12MetaCommand ID3D12MetaCommand; + +#endif /* __ID3D12MetaCommand_FWD_DEFINED__ */ + + +#ifndef __ID3D12GraphicsCommandList4_FWD_DEFINED__ +#define __ID3D12GraphicsCommandList4_FWD_DEFINED__ +typedef interface ID3D12GraphicsCommandList4 ID3D12GraphicsCommandList4; + +#endif /* __ID3D12GraphicsCommandList4_FWD_DEFINED__ */ + + #ifndef __ID3D12Tools_FWD_DEFINED__ #define __ID3D12Tools_FWD_DEFINED__ typedef interface ID3D12Tools ID3D12Tools; @@ -290,6 +346,7 @@ extern "C"{ /* [local] */ #include +#pragma region App Family #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) #ifndef _D3D12_CONSTANTS #define _D3D12_CONSTANTS @@ -853,6 +910,22 @@ extern "C"{ #define D3D12_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT ( 0.5f ) #define D3D12_RAW_UAV_SRV_BYTE_ALIGNMENT ( 16 ) +#define D3D12_RAYTRACING_AABB_BYTE_ALIGNMENT ( 8 ) + +#define D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BYTE_ALIGNMENT ( 256 ) + +#define D3D12_RAYTRACING_INSTANCE_DESCS_BYTE_ALIGNMENT ( 16 ) + +#define D3D12_RAYTRACING_MAX_ATTRIBUTE_SIZE_IN_BYTES ( 32 ) + +#define D3D12_RAYTRACING_MAX_DECLARABLE_TRACE_RECURSION_DEPTH ( 31 ) + +#define D3D12_RAYTRACING_SHADER_RECORD_BYTE_ALIGNMENT ( 32 ) + +#define D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT ( 64 ) + +#define D3D12_RAYTRACING_TRANSFORM3X4_BYTE_ALIGNMENT ( 16 ) + #define D3D12_REQ_BLEND_OBJECT_COUNT_PER_DEVICE ( 4096 ) #define D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP ( 27 ) @@ -908,6 +981,8 @@ extern "C"{ #define D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES ( 0xffffffff ) +#define D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES ( 32 ) + #define D3D12_SHADER_MAJOR_VERSION ( 5 ) #define D3D12_SHADER_MAX_INSTANCES ( 65535 ) @@ -1004,6 +1079,8 @@ extern "C"{ #define D3D12_TILED_RESOURCE_TILE_SIZE_IN_BYTES ( 65536 ) +#define D3D12_TRACKED_WORKLOAD_MAX_INSTANCES ( 32 ) + #define D3D12_UAV_COUNTER_PLACEMENT_ALIGNMENT ( 4096 ) #define D3D12_UAV_SLOT_COUNT ( 64 ) @@ -1839,7 +1916,8 @@ enum D3D12_FEATURE D3D12_FEATURE_EXISTING_HEAPS = 22, D3D12_FEATURE_D3D12_OPTIONS4 = 23, D3D12_FEATURE_SERIALIZATION = 24, - D3D12_FEATURE_CROSS_NODE = 25 + D3D12_FEATURE_CROSS_NODE = 25, + D3D12_FEATURE_D3D12_OPTIONS5 = 27 } D3D12_FEATURE; typedef @@ -2052,7 +2130,9 @@ enum D3D_SHADER_MODEL D3D_SHADER_MODEL_5_1 = 0x51, D3D_SHADER_MODEL_6_0 = 0x60, D3D_SHADER_MODEL_6_1 = 0x61, - D3D_SHADER_MODEL_6_2 = 0x62 + D3D_SHADER_MODEL_6_2 = 0x62, + D3D_SHADER_MODEL_6_3 = 0x63, + D3D_SHADER_MODEL_6_4 = 0x64 } D3D_SHADER_MODEL; typedef struct D3D12_FEATURE_DATA_SHADER_MODEL @@ -2170,6 +2250,28 @@ typedef struct D3D12_FEATURE_DATA_CROSS_NODE BOOL AtomicShaderInstructions; } D3D12_FEATURE_DATA_CROSS_NODE; +typedef +enum D3D12_RENDER_PASS_TIER + { + D3D12_RENDER_PASS_TIER_0 = 0, + D3D12_RENDER_PASS_TIER_1 = 1, + D3D12_RENDER_PASS_TIER_2 = 2 + } D3D12_RENDER_PASS_TIER; + +typedef +enum D3D12_RAYTRACING_TIER + { + D3D12_RAYTRACING_TIER_NOT_SUPPORTED = 0, + D3D12_RAYTRACING_TIER_1_0 = 10 + } D3D12_RAYTRACING_TIER; + +typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS5 + { + _Out_ BOOL SRVOnlyTiledResourceTier3; + _Out_ D3D12_RENDER_PASS_TIER RenderPassesTier; + _Out_ D3D12_RAYTRACING_TIER RaytracingTier; + } D3D12_FEATURE_DATA_D3D12_OPTIONS5; + typedef struct D3D12_RESOURCE_ALLOCATION_INFO { UINT64 SizeInBytes; @@ -2426,7 +2528,9 @@ enum D3D12_RESOURCE_STATES D3D12_RESOURCE_STATE_VIDEO_DECODE_READ = 0x10000, D3D12_RESOURCE_STATE_VIDEO_DECODE_WRITE = 0x20000, D3D12_RESOURCE_STATE_VIDEO_PROCESS_READ = 0x40000, - D3D12_RESOURCE_STATE_VIDEO_PROCESS_WRITE = 0x80000 + D3D12_RESOURCE_STATE_VIDEO_PROCESS_WRITE = 0x80000, + D3D12_RESOURCE_STATE_VIDEO_ENCODE_READ = 0x200000, + D3D12_RESOURCE_STATE_VIDEO_ENCODE_WRITE = 0x800000 } D3D12_RESOURCE_STATES; DEFINE_ENUM_FLAG_OPERATORS( D3D12_RESOURCE_STATES ); @@ -3229,7 +3333,8 @@ enum D3D12_DESCRIPTOR_RANGE_FLAGS D3D12_DESCRIPTOR_RANGE_FLAG_DESCRIPTORS_VOLATILE = 0x1, D3D12_DESCRIPTOR_RANGE_FLAG_DATA_VOLATILE = 0x2, D3D12_DESCRIPTOR_RANGE_FLAG_DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4, - D3D12_DESCRIPTOR_RANGE_FLAG_DATA_STATIC = 0x8 + D3D12_DESCRIPTOR_RANGE_FLAG_DATA_STATIC = 0x8, + D3D12_DESCRIPTOR_RANGE_FLAG_DESCRIPTORS_STATIC_KEEPING_BUFFER_BOUNDS_CHECKS = 0x10000 } D3D12_DESCRIPTOR_RANGE_FLAGS; DEFINE_ENUM_FLAG_OPERATORS( D3D12_DESCRIPTOR_RANGE_FLAGS ); @@ -3930,6 +4035,10 @@ EXTERN_C const IID IID_ID3D12Heap; + + + + #endif /* __ID3D12Heap_INTERFACE_DEFINED__ */ @@ -4133,6 +4242,10 @@ EXTERN_C const IID IID_ID3D12Resource; + + + + #endif /* __ID3D12Resource_INTERFACE_DEFINED__ */ @@ -4800,6 +4913,18 @@ EXTERN_C const IID IID_ID3D12DescriptorHeap; + + + + + + + + + + + + #endif /* __ID3D12DescriptorHeap_INTERFACE_DEFINED__ */ @@ -7580,6 +7705,10 @@ EXTERN_C const IID IID_ID3D12CommandQueue; + + + + #endif /* __ID3D12CommandQueue_INTERFACE_DEFINED__ */ @@ -8256,6 +8385,18 @@ EXTERN_C const IID IID_ID3D12Device; + + + + + + + + + + + + #endif /* __ID3D12Device_INTERFACE_DEFINED__ */ @@ -10526,6 +10667,10 @@ EXTERN_C const IID IID_ID3D12ProtectedResourceSession; + + + + #endif /* __ID3D12ProtectedResourceSession_INTERFACE_DEFINED__ */ @@ -11159,123 +11304,77 @@ EXTERN_C const IID IID_ID3D12Device4; + + + + #endif /* __ID3D12Device4_INTERFACE_DEFINED__ */ -#ifndef __ID3D12Resource1_INTERFACE_DEFINED__ -#define __ID3D12Resource1_INTERFACE_DEFINED__ +/* interface __MIDL_itf_d3d12_0000_0029 */ +/* [local] */ -/* interface ID3D12Resource1 */ +typedef +enum D3D12_LIFETIME_STATE + { + D3D12_LIFETIME_STATE_IN_USE = 0, + D3D12_LIFETIME_STATE_NOT_IN_USE = ( D3D12_LIFETIME_STATE_IN_USE + 1 ) + } D3D12_LIFETIME_STATE; + + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0029_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0029_v0_0_s_ifspec; + +#ifndef __ID3D12LifetimeOwner_INTERFACE_DEFINED__ +#define __ID3D12LifetimeOwner_INTERFACE_DEFINED__ + +/* interface ID3D12LifetimeOwner */ /* [unique][local][object][uuid] */ -EXTERN_C const IID IID_ID3D12Resource1; +EXTERN_C const IID IID_ID3D12LifetimeOwner; #if defined(__cplusplus) && !defined(CINTERFACE) - MIDL_INTERFACE("9D5E227A-4430-4161-88B3-3ECA6BB16E19") - ID3D12Resource1 : public ID3D12Resource + MIDL_INTERFACE("e667af9f-cd56-4f46-83ce-032e595d70a8") + ID3D12LifetimeOwner : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetProtectedResourceSession( - REFIID riid, - _COM_Outptr_opt_ void **ppProtectedSession) = 0; + virtual void STDMETHODCALLTYPE LifetimeStateUpdated( + D3D12_LIFETIME_STATE NewState) = 0; }; #else /* C style interface */ - typedef struct ID3D12Resource1Vtbl + typedef struct ID3D12LifetimeOwnerVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ID3D12Resource1 * This, + ID3D12LifetimeOwner * This, REFIID riid, _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( - ID3D12Resource1 * This); + ID3D12LifetimeOwner * This); ULONG ( STDMETHODCALLTYPE *Release )( - ID3D12Resource1 * This); - - HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( - ID3D12Resource1 * This, - _In_ REFGUID guid, - _Inout_ UINT *pDataSize, - _Out_writes_bytes_opt_( *pDataSize ) void *pData); - - HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( - ID3D12Resource1 * This, - _In_ REFGUID guid, - _In_ UINT DataSize, - _In_reads_bytes_opt_( DataSize ) const void *pData); - - HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( - ID3D12Resource1 * This, - _In_ REFGUID guid, - _In_opt_ const IUnknown *pData); - - HRESULT ( STDMETHODCALLTYPE *SetName )( - ID3D12Resource1 * This, - _In_z_ LPCWSTR Name); - - HRESULT ( STDMETHODCALLTYPE *GetDevice )( - ID3D12Resource1 * This, - REFIID riid, - _COM_Outptr_opt_ void **ppvDevice); - - HRESULT ( STDMETHODCALLTYPE *Map )( - ID3D12Resource1 * This, - UINT Subresource, - _In_opt_ const D3D12_RANGE *pReadRange, - _Outptr_opt_result_bytebuffer_(_Inexpressible_("Dependent on resource")) void **ppData); - - void ( STDMETHODCALLTYPE *Unmap )( - ID3D12Resource1 * This, - UINT Subresource, - _In_opt_ const D3D12_RANGE *pWrittenRange); - - D3D12_RESOURCE_DESC ( STDMETHODCALLTYPE *GetDesc )( - ID3D12Resource1 * This); - - D3D12_GPU_VIRTUAL_ADDRESS ( STDMETHODCALLTYPE *GetGPUVirtualAddress )( - ID3D12Resource1 * This); - - HRESULT ( STDMETHODCALLTYPE *WriteToSubresource )( - ID3D12Resource1 * This, - UINT DstSubresource, - _In_opt_ const D3D12_BOX *pDstBox, - _In_ const void *pSrcData, - UINT SrcRowPitch, - UINT SrcDepthPitch); - - HRESULT ( STDMETHODCALLTYPE *ReadFromSubresource )( - ID3D12Resource1 * This, - _Out_ void *pDstData, - UINT DstRowPitch, - UINT DstDepthPitch, - UINT SrcSubresource, - _In_opt_ const D3D12_BOX *pSrcBox); - - HRESULT ( STDMETHODCALLTYPE *GetHeapProperties )( - ID3D12Resource1 * This, - _Out_opt_ D3D12_HEAP_PROPERTIES *pHeapProperties, - _Out_opt_ D3D12_HEAP_FLAGS *pHeapFlags); + ID3D12LifetimeOwner * This); - HRESULT ( STDMETHODCALLTYPE *GetProtectedResourceSession )( - ID3D12Resource1 * This, - REFIID riid, - _COM_Outptr_opt_ void **ppProtectedSession); + void ( STDMETHODCALLTYPE *LifetimeStateUpdated )( + ID3D12LifetimeOwner * This, + D3D12_LIFETIME_STATE NewState); END_INTERFACE - } ID3D12Resource1Vtbl; + } ID3D12LifetimeOwnerVtbl; - interface ID3D12Resource1 + interface ID3D12LifetimeOwner { - CONST_VTBL struct ID3D12Resource1Vtbl *lpVtbl; + CONST_VTBL struct ID3D12LifetimeOwnerVtbl *lpVtbl; }; @@ -11283,58 +11382,18 @@ EXTERN_C const IID IID_ID3D12Resource1; #ifdef COBJMACROS -#define ID3D12Resource1_QueryInterface(This,riid,ppvObject) \ +#define ID3D12LifetimeOwner_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ID3D12Resource1_AddRef(This) \ +#define ID3D12LifetimeOwner_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) -#define ID3D12Resource1_Release(This) \ +#define ID3D12LifetimeOwner_Release(This) \ ( (This)->lpVtbl -> Release(This) ) -#define ID3D12Resource1_GetPrivateData(This,guid,pDataSize,pData) \ - ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) - -#define ID3D12Resource1_SetPrivateData(This,guid,DataSize,pData) \ - ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) - -#define ID3D12Resource1_SetPrivateDataInterface(This,guid,pData) \ - ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) - -#define ID3D12Resource1_SetName(This,Name) \ - ( (This)->lpVtbl -> SetName(This,Name) ) - - -#define ID3D12Resource1_GetDevice(This,riid,ppvDevice) \ - ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) - - - -#define ID3D12Resource1_Map(This,Subresource,pReadRange,ppData) \ - ( (This)->lpVtbl -> Map(This,Subresource,pReadRange,ppData) ) - -#define ID3D12Resource1_Unmap(This,Subresource,pWrittenRange) \ - ( (This)->lpVtbl -> Unmap(This,Subresource,pWrittenRange) ) - -#define ID3D12Resource1_GetDesc(This) \ - ( (This)->lpVtbl -> GetDesc(This) ) - -#define ID3D12Resource1_GetGPUVirtualAddress(This) \ - ( (This)->lpVtbl -> GetGPUVirtualAddress(This) ) - -#define ID3D12Resource1_WriteToSubresource(This,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) \ - ( (This)->lpVtbl -> WriteToSubresource(This,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) ) - -#define ID3D12Resource1_ReadFromSubresource(This,pDstData,DstRowPitch,DstDepthPitch,SrcSubresource,pSrcBox) \ - ( (This)->lpVtbl -> ReadFromSubresource(This,pDstData,DstRowPitch,DstDepthPitch,SrcSubresource,pSrcBox) ) - -#define ID3D12Resource1_GetHeapProperties(This,pHeapProperties,pHeapFlags) \ - ( (This)->lpVtbl -> GetHeapProperties(This,pHeapProperties,pHeapFlags) ) - - -#define ID3D12Resource1_GetProtectedResourceSession(This,riid,ppProtectedSession) \ - ( (This)->lpVtbl -> GetProtectedResourceSession(This,riid,ppProtectedSession) ) +#define ID3D12LifetimeOwner_LifetimeStateUpdated(This,NewState) \ + ( (This)->lpVtbl -> LifetimeStateUpdated(This,NewState) ) #endif /* COBJMACROS */ @@ -11344,88 +11403,2891 @@ EXTERN_C const IID IID_ID3D12Resource1; -#endif /* __ID3D12Resource1_INTERFACE_DEFINED__ */ +#endif /* __ID3D12LifetimeOwner_INTERFACE_DEFINED__ */ -#ifndef __ID3D12Heap1_INTERFACE_DEFINED__ -#define __ID3D12Heap1_INTERFACE_DEFINED__ +#ifndef __ID3D12SwapChainAssistant_INTERFACE_DEFINED__ +#define __ID3D12SwapChainAssistant_INTERFACE_DEFINED__ -/* interface ID3D12Heap1 */ +/* interface ID3D12SwapChainAssistant */ /* [unique][local][object][uuid] */ -EXTERN_C const IID IID_ID3D12Heap1; +EXTERN_C const IID IID_ID3D12SwapChainAssistant; #if defined(__cplusplus) && !defined(CINTERFACE) - MIDL_INTERFACE("572F7389-2168-49E3-9693-D6DF5871BF6D") - ID3D12Heap1 : public ID3D12Heap + MIDL_INTERFACE("f1df64b6-57fd-49cd-8807-c0eb88b45c8f") + ID3D12SwapChainAssistant : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetProtectedResourceSession( + virtual LUID STDMETHODCALLTYPE GetLUID( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSwapChainObject( REFIID riid, - _COM_Outptr_opt_ void **ppProtectedSession) = 0; + _COM_Outptr_ void **ppv) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentResourceAndCommandQueue( + REFIID riidResource, + _COM_Outptr_ void **ppvResource, + REFIID riidQueue, + _COM_Outptr_ void **ppvQueue) = 0; + + virtual HRESULT STDMETHODCALLTYPE InsertImplicitSync( void) = 0; }; #else /* C style interface */ - typedef struct ID3D12Heap1Vtbl + typedef struct ID3D12SwapChainAssistantVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ID3D12Heap1 * This, + ID3D12SwapChainAssistant * This, REFIID riid, _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( - ID3D12Heap1 * This); + ID3D12SwapChainAssistant * This); ULONG ( STDMETHODCALLTYPE *Release )( - ID3D12Heap1 * This); + ID3D12SwapChainAssistant * This); - HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( - ID3D12Heap1 * This, - _In_ REFGUID guid, - _Inout_ UINT *pDataSize, - _Out_writes_bytes_opt_( *pDataSize ) void *pData); + LUID ( STDMETHODCALLTYPE *GetLUID )( + ID3D12SwapChainAssistant * This); - HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( - ID3D12Heap1 * This, - _In_ REFGUID guid, - _In_ UINT DataSize, - _In_reads_bytes_opt_( DataSize ) const void *pData); + HRESULT ( STDMETHODCALLTYPE *GetSwapChainObject )( + ID3D12SwapChainAssistant * This, + REFIID riid, + _COM_Outptr_ void **ppv); - HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( - ID3D12Heap1 * This, - _In_ REFGUID guid, - _In_opt_ const IUnknown *pData); + HRESULT ( STDMETHODCALLTYPE *GetCurrentResourceAndCommandQueue )( + ID3D12SwapChainAssistant * This, + REFIID riidResource, + _COM_Outptr_ void **ppvResource, + REFIID riidQueue, + _COM_Outptr_ void **ppvQueue); + + HRESULT ( STDMETHODCALLTYPE *InsertImplicitSync )( + ID3D12SwapChainAssistant * This); + + END_INTERFACE + } ID3D12SwapChainAssistantVtbl; + + interface ID3D12SwapChainAssistant + { + CONST_VTBL struct ID3D12SwapChainAssistantVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12SwapChainAssistant_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12SwapChainAssistant_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12SwapChainAssistant_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12SwapChainAssistant_GetLUID(This) \ + ( (This)->lpVtbl -> GetLUID(This) ) + +#define ID3D12SwapChainAssistant_GetSwapChainObject(This,riid,ppv) \ + ( (This)->lpVtbl -> GetSwapChainObject(This,riid,ppv) ) + +#define ID3D12SwapChainAssistant_GetCurrentResourceAndCommandQueue(This,riidResource,ppvResource,riidQueue,ppvQueue) \ + ( (This)->lpVtbl -> GetCurrentResourceAndCommandQueue(This,riidResource,ppvResource,riidQueue,ppvQueue) ) + +#define ID3D12SwapChainAssistant_InsertImplicitSync(This) \ + ( (This)->lpVtbl -> InsertImplicitSync(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + + + + + +#endif /* __ID3D12SwapChainAssistant_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12LifetimeTracker_INTERFACE_DEFINED__ +#define __ID3D12LifetimeTracker_INTERFACE_DEFINED__ + +/* interface ID3D12LifetimeTracker */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12LifetimeTracker; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3fd03d36-4eb1-424a-a582-494ecb8ba813") + ID3D12LifetimeTracker : public ID3D12DeviceChild + { + public: + virtual HRESULT STDMETHODCALLTYPE DestroyOwnedObject( + _In_ ID3D12DeviceChild *pObject) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12LifetimeTrackerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12LifetimeTracker * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12LifetimeTracker * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12LifetimeTracker * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12LifetimeTracker * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12LifetimeTracker * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12LifetimeTracker * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12LifetimeTracker * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12LifetimeTracker * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + HRESULT ( STDMETHODCALLTYPE *DestroyOwnedObject )( + ID3D12LifetimeTracker * This, + _In_ ID3D12DeviceChild *pObject); + + END_INTERFACE + } ID3D12LifetimeTrackerVtbl; + + interface ID3D12LifetimeTracker + { + CONST_VTBL struct ID3D12LifetimeTrackerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12LifetimeTracker_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12LifetimeTracker_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12LifetimeTracker_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12LifetimeTracker_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12LifetimeTracker_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12LifetimeTracker_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12LifetimeTracker_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12LifetimeTracker_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + +#define ID3D12LifetimeTracker_DestroyOwnedObject(This,pObject) \ + ( (This)->lpVtbl -> DestroyOwnedObject(This,pObject) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12LifetimeTracker_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12_0000_0032 */ +/* [local] */ + +typedef +enum D3D12_META_COMMAND_PARAMETER_TYPE + { + D3D12_META_COMMAND_PARAMETER_TYPE_FLOAT = 0, + D3D12_META_COMMAND_PARAMETER_TYPE_UINT64 = 1, + D3D12_META_COMMAND_PARAMETER_TYPE_GPU_VIRTUAL_ADDRESS = 2, + D3D12_META_COMMAND_PARAMETER_TYPE_CPU_DESCRIPTOR_HANDLE_HEAP_TYPE_CBV_SRV_UAV = 3, + D3D12_META_COMMAND_PARAMETER_TYPE_GPU_DESCRIPTOR_HANDLE_HEAP_TYPE_CBV_SRV_UAV = 4 + } D3D12_META_COMMAND_PARAMETER_TYPE; + +typedef +enum D3D12_META_COMMAND_PARAMETER_FLAGS + { + D3D12_META_COMMAND_PARAMETER_FLAG_INPUT = 0x1, + D3D12_META_COMMAND_PARAMETER_FLAG_OUTPUT = 0x2 + } D3D12_META_COMMAND_PARAMETER_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_META_COMMAND_PARAMETER_FLAGS ); +typedef +enum D3D12_META_COMMAND_PARAMETER_STAGE + { + D3D12_META_COMMAND_PARAMETER_STAGE_CREATION = 0, + D3D12_META_COMMAND_PARAMETER_STAGE_INITIALIZATION = 1, + D3D12_META_COMMAND_PARAMETER_STAGE_EXECUTION = 2 + } D3D12_META_COMMAND_PARAMETER_STAGE; + +typedef struct D3D12_META_COMMAND_PARAMETER_DESC + { + LPCWSTR Name; + D3D12_META_COMMAND_PARAMETER_TYPE Type; + D3D12_META_COMMAND_PARAMETER_FLAGS Flags; + D3D12_RESOURCE_STATES RequiredResourceState; + UINT StructureOffset; + } D3D12_META_COMMAND_PARAMETER_DESC; + +typedef +enum D3D12_GRAPHICS_STATES + { + D3D12_GRAPHICS_STATE_NONE = 0, + D3D12_GRAPHICS_STATE_IA_VERTEX_BUFFERS = ( 1 << 0 ) , + D3D12_GRAPHICS_STATE_IA_INDEX_BUFFER = ( 1 << 1 ) , + D3D12_GRAPHICS_STATE_IA_PRIMITIVE_TOPOLOGY = ( 1 << 2 ) , + D3D12_GRAPHICS_STATE_DESCRIPTOR_HEAP = ( 1 << 3 ) , + D3D12_GRAPHICS_STATE_GRAPHICS_ROOT_SIGNATURE = ( 1 << 4 ) , + D3D12_GRAPHICS_STATE_COMPUTE_ROOT_SIGNATURE = ( 1 << 5 ) , + D3D12_GRAPHICS_STATE_RS_VIEWPORTS = ( 1 << 6 ) , + D3D12_GRAPHICS_STATE_RS_SCISSOR_RECTS = ( 1 << 7 ) , + D3D12_GRAPHICS_STATE_PREDICATION = ( 1 << 8 ) , + D3D12_GRAPHICS_STATE_OM_RENDER_TARGETS = ( 1 << 9 ) , + D3D12_GRAPHICS_STATE_OM_STENCIL_REF = ( 1 << 10 ) , + D3D12_GRAPHICS_STATE_OM_BLEND_FACTOR = ( 1 << 11 ) , + D3D12_GRAPHICS_STATE_PIPELINE_STATE = ( 1 << 12 ) , + D3D12_GRAPHICS_STATE_SO_TARGETS = ( 1 << 13 ) , + D3D12_GRAPHICS_STATE_OM_DEPTH_BOUNDS = ( 1 << 14 ) , + D3D12_GRAPHICS_STATE_SAMPLE_POSITIONS = ( 1 << 15 ) , + D3D12_GRAPHICS_STATE_VIEW_INSTANCE_MASK = ( 1 << 16 ) + } D3D12_GRAPHICS_STATES; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_GRAPHICS_STATES ); +typedef struct D3D12_META_COMMAND_DESC + { + GUID Id; + LPCWSTR Name; + D3D12_GRAPHICS_STATES InitializationDirtyState; + D3D12_GRAPHICS_STATES ExecutionDirtyState; + } D3D12_META_COMMAND_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0032_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0032_v0_0_s_ifspec; + +#ifndef __ID3D12StateObject_INTERFACE_DEFINED__ +#define __ID3D12StateObject_INTERFACE_DEFINED__ + +/* interface ID3D12StateObject */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12StateObject; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("47016943-fca8-4594-93ea-af258b55346d") + ID3D12StateObject : public ID3D12Pageable + { + public: + }; + + +#else /* C style interface */ + + typedef struct ID3D12StateObjectVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12StateObject * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12StateObject * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12StateObject * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12StateObject * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12StateObject * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12StateObject * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12StateObject * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12StateObject * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + END_INTERFACE + } ID3D12StateObjectVtbl; + + interface ID3D12StateObject + { + CONST_VTBL struct ID3D12StateObjectVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12StateObject_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12StateObject_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12StateObject_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12StateObject_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12StateObject_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12StateObject_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12StateObject_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12StateObject_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12StateObject_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12StateObjectProperties_INTERFACE_DEFINED__ +#define __ID3D12StateObjectProperties_INTERFACE_DEFINED__ + +/* interface ID3D12StateObjectProperties */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12StateObjectProperties; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("de5fa827-9bf9-4f26-89ff-d7f56fde3860") + ID3D12StateObjectProperties : public IUnknown + { + public: + virtual void *STDMETHODCALLTYPE GetShaderIdentifier( + _In_ LPCWSTR pExportName) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetShaderStackSize( + _In_ LPCWSTR pExportName) = 0; + + virtual UINT64 STDMETHODCALLTYPE GetPipelineStackSize( void) = 0; + + virtual void STDMETHODCALLTYPE SetPipelineStackSize( + UINT64 PipelineStackSizeInBytes) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12StateObjectPropertiesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12StateObjectProperties * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12StateObjectProperties * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12StateObjectProperties * This); + + void *( STDMETHODCALLTYPE *GetShaderIdentifier )( + ID3D12StateObjectProperties * This, + _In_ LPCWSTR pExportName); + + UINT64 ( STDMETHODCALLTYPE *GetShaderStackSize )( + ID3D12StateObjectProperties * This, + _In_ LPCWSTR pExportName); + + UINT64 ( STDMETHODCALLTYPE *GetPipelineStackSize )( + ID3D12StateObjectProperties * This); + + void ( STDMETHODCALLTYPE *SetPipelineStackSize )( + ID3D12StateObjectProperties * This, + UINT64 PipelineStackSizeInBytes); + + END_INTERFACE + } ID3D12StateObjectPropertiesVtbl; + + interface ID3D12StateObjectProperties + { + CONST_VTBL struct ID3D12StateObjectPropertiesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12StateObjectProperties_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12StateObjectProperties_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12StateObjectProperties_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12StateObjectProperties_GetShaderIdentifier(This,pExportName) \ + ( (This)->lpVtbl -> GetShaderIdentifier(This,pExportName) ) + +#define ID3D12StateObjectProperties_GetShaderStackSize(This,pExportName) \ + ( (This)->lpVtbl -> GetShaderStackSize(This,pExportName) ) + +#define ID3D12StateObjectProperties_GetPipelineStackSize(This) \ + ( (This)->lpVtbl -> GetPipelineStackSize(This) ) + +#define ID3D12StateObjectProperties_SetPipelineStackSize(This,PipelineStackSizeInBytes) \ + ( (This)->lpVtbl -> SetPipelineStackSize(This,PipelineStackSizeInBytes) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12StateObjectProperties_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12_0000_0034 */ +/* [local] */ + +typedef +enum D3D12_STATE_SUBOBJECT_TYPE + { + D3D12_STATE_SUBOBJECT_TYPE_STATE_OBJECT_CONFIG = 0, + D3D12_STATE_SUBOBJECT_TYPE_GLOBAL_ROOT_SIGNATURE = 1, + D3D12_STATE_SUBOBJECT_TYPE_LOCAL_ROOT_SIGNATURE = 2, + D3D12_STATE_SUBOBJECT_TYPE_NODE_MASK = 3, + D3D12_STATE_SUBOBJECT_TYPE_DXIL_LIBRARY = 5, + D3D12_STATE_SUBOBJECT_TYPE_EXISTING_COLLECTION = 6, + D3D12_STATE_SUBOBJECT_TYPE_SUBOBJECT_TO_EXPORTS_ASSOCIATION = 7, + D3D12_STATE_SUBOBJECT_TYPE_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION = 8, + D3D12_STATE_SUBOBJECT_TYPE_RAYTRACING_SHADER_CONFIG = 9, + D3D12_STATE_SUBOBJECT_TYPE_RAYTRACING_PIPELINE_CONFIG = 10, + D3D12_STATE_SUBOBJECT_TYPE_HIT_GROUP = 11, + D3D12_STATE_SUBOBJECT_TYPE_MAX_VALID = ( D3D12_STATE_SUBOBJECT_TYPE_HIT_GROUP + 1 ) + } D3D12_STATE_SUBOBJECT_TYPE; + +typedef struct D3D12_STATE_SUBOBJECT + { + D3D12_STATE_SUBOBJECT_TYPE Type; + const void *pDesc; + } D3D12_STATE_SUBOBJECT; + +typedef +enum D3D12_STATE_OBJECT_FLAGS + { + D3D12_STATE_OBJECT_FLAG_NONE = 0, + D3D12_STATE_OBJECT_FLAG_ALLOW_LOCAL_DEPENDENCIES_ON_EXTERNAL_DEFINITIONS = 0x1, + D3D12_STATE_OBJECT_FLAG_ALLOW_EXTERNAL_DEPENDENCIES_ON_LOCAL_DEFINITIONS = 0x2 + } D3D12_STATE_OBJECT_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_STATE_OBJECT_FLAGS ); +typedef struct D3D12_STATE_OBJECT_CONFIG + { + D3D12_STATE_OBJECT_FLAGS Flags; + } D3D12_STATE_OBJECT_CONFIG; + +typedef struct D3D12_GLOBAL_ROOT_SIGNATURE + { + ID3D12RootSignature *pGlobalRootSignature; + } D3D12_GLOBAL_ROOT_SIGNATURE; + +typedef struct D3D12_LOCAL_ROOT_SIGNATURE + { + ID3D12RootSignature *pLocalRootSignature; + } D3D12_LOCAL_ROOT_SIGNATURE; + +typedef struct D3D12_NODE_MASK + { + UINT NodeMask; + } D3D12_NODE_MASK; + +typedef +enum D3D12_EXPORT_FLAGS + { + D3D12_EXPORT_FLAG_NONE = 0 + } D3D12_EXPORT_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_EXPORT_FLAGS ); +typedef struct D3D12_EXPORT_DESC + { + LPCWSTR Name; + _In_opt_ LPCWSTR ExportToRename; + D3D12_EXPORT_FLAGS Flags; + } D3D12_EXPORT_DESC; + +typedef struct D3D12_DXIL_LIBRARY_DESC + { + D3D12_SHADER_BYTECODE DXILLibrary; + UINT NumExports; + _In_reads_(NumExports) D3D12_EXPORT_DESC *pExports; + } D3D12_DXIL_LIBRARY_DESC; + +typedef struct D3D12_EXISTING_COLLECTION_DESC + { + ID3D12StateObject *pExistingCollection; + UINT NumExports; + _In_reads_(NumExports) D3D12_EXPORT_DESC *pExports; + } D3D12_EXISTING_COLLECTION_DESC; + +typedef struct D3D12_SUBOBJECT_TO_EXPORTS_ASSOCIATION + { + const D3D12_STATE_SUBOBJECT *pSubobjectToAssociate; + UINT NumExports; + _In_reads_(NumExports) LPCWSTR *pExports; + } D3D12_SUBOBJECT_TO_EXPORTS_ASSOCIATION; + +typedef struct D3D12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION + { + LPCWSTR SubobjectToAssociate; + UINT NumExports; + _In_reads_(NumExports) LPCWSTR *pExports; + } D3D12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION; + +typedef +enum D3D12_HIT_GROUP_TYPE + { + D3D12_HIT_GROUP_TYPE_TRIANGLES = 0, + D3D12_HIT_GROUP_TYPE_PROCEDURAL_PRIMITIVE = 0x1 + } D3D12_HIT_GROUP_TYPE; + +typedef struct D3D12_HIT_GROUP_DESC + { + LPCWSTR HitGroupExport; + D3D12_HIT_GROUP_TYPE Type; + _In_opt_ LPCWSTR AnyHitShaderImport; + _In_opt_ LPCWSTR ClosestHitShaderImport; + _In_opt_ LPCWSTR IntersectionShaderImport; + } D3D12_HIT_GROUP_DESC; + +typedef struct D3D12_RAYTRACING_SHADER_CONFIG + { + UINT MaxPayloadSizeInBytes; + UINT MaxAttributeSizeInBytes; + } D3D12_RAYTRACING_SHADER_CONFIG; + +typedef struct D3D12_RAYTRACING_PIPELINE_CONFIG + { + UINT MaxTraceRecursionDepth; + } D3D12_RAYTRACING_PIPELINE_CONFIG; + +typedef +enum D3D12_STATE_OBJECT_TYPE + { + D3D12_STATE_OBJECT_TYPE_COLLECTION = 0, + D3D12_STATE_OBJECT_TYPE_RAYTRACING_PIPELINE = 3 + } D3D12_STATE_OBJECT_TYPE; + +typedef struct D3D12_STATE_OBJECT_DESC + { + D3D12_STATE_OBJECT_TYPE Type; + UINT NumSubobjects; + _In_reads_(NumSubobjects) const D3D12_STATE_SUBOBJECT *pSubobjects; + } D3D12_STATE_OBJECT_DESC; + +typedef +enum D3D12_RAYTRACING_GEOMETRY_FLAGS + { + D3D12_RAYTRACING_GEOMETRY_FLAG_NONE = 0, + D3D12_RAYTRACING_GEOMETRY_FLAG_OPAQUE = 0x1, + D3D12_RAYTRACING_GEOMETRY_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION = 0x2 + } D3D12_RAYTRACING_GEOMETRY_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_RAYTRACING_GEOMETRY_FLAGS ); +typedef +enum D3D12_RAYTRACING_GEOMETRY_TYPE + { + D3D12_RAYTRACING_GEOMETRY_TYPE_TRIANGLES = 0, + D3D12_RAYTRACING_GEOMETRY_TYPE_PROCEDURAL_PRIMITIVE_AABBS = ( D3D12_RAYTRACING_GEOMETRY_TYPE_TRIANGLES + 1 ) + } D3D12_RAYTRACING_GEOMETRY_TYPE; + +typedef +enum D3D12_RAYTRACING_INSTANCE_FLAGS + { + D3D12_RAYTRACING_INSTANCE_FLAG_NONE = 0, + D3D12_RAYTRACING_INSTANCE_FLAG_TRIANGLE_CULL_DISABLE = 0x1, + D3D12_RAYTRACING_INSTANCE_FLAG_TRIANGLE_FRONT_COUNTERCLOCKWISE = 0x2, + D3D12_RAYTRACING_INSTANCE_FLAG_FORCE_OPAQUE = 0x4, + D3D12_RAYTRACING_INSTANCE_FLAG_FORCE_NON_OPAQUE = 0x8 + } D3D12_RAYTRACING_INSTANCE_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_RAYTRACING_INSTANCE_FLAGS ); +typedef struct D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE + { + D3D12_GPU_VIRTUAL_ADDRESS StartAddress; + UINT64 StrideInBytes; + } D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE; + +typedef struct D3D12_GPU_VIRTUAL_ADDRESS_RANGE + { + D3D12_GPU_VIRTUAL_ADDRESS StartAddress; + UINT64 SizeInBytes; + } D3D12_GPU_VIRTUAL_ADDRESS_RANGE; + +typedef struct D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE + { + D3D12_GPU_VIRTUAL_ADDRESS StartAddress; + UINT64 SizeInBytes; + UINT64 StrideInBytes; + } D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE; + +typedef struct D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC + { + D3D12_GPU_VIRTUAL_ADDRESS Transform3x4; + DXGI_FORMAT IndexFormat; + DXGI_FORMAT VertexFormat; + UINT IndexCount; + UINT VertexCount; + D3D12_GPU_VIRTUAL_ADDRESS IndexBuffer; + D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE VertexBuffer; + } D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC; + +typedef struct D3D12_RAYTRACING_AABB + { + FLOAT MinX; + FLOAT MinY; + FLOAT MinZ; + FLOAT MaxX; + FLOAT MaxY; + FLOAT MaxZ; + } D3D12_RAYTRACING_AABB; + +typedef struct D3D12_RAYTRACING_GEOMETRY_AABBS_DESC + { + UINT64 AABBCount; + D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE AABBs; + } D3D12_RAYTRACING_GEOMETRY_AABBS_DESC; + +typedef +enum D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS + { + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_NONE = 0, + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_ALLOW_UPDATE = 0x1, + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_ALLOW_COMPACTION = 0x2, + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PREFER_FAST_TRACE = 0x4, + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PREFER_FAST_BUILD = 0x8, + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_MINIMIZE_MEMORY = 0x10, + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PERFORM_UPDATE = 0x20 + } D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS ); +typedef +enum D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE + { + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_CLONE = 0, + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_COMPACT = 0x1, + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_VISUALIZATION_DECODE_FOR_TOOLS = 0x2, + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_SERIALIZE = 0x3, + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_DESERIALIZE = 0x4 + } D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE; + +typedef +enum D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE + { + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL = 0, + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL = 0x1 + } D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE; + +typedef +enum D3D12_ELEMENTS_LAYOUT + { + D3D12_ELEMENTS_LAYOUT_ARRAY = 0, + D3D12_ELEMENTS_LAYOUT_ARRAY_OF_POINTERS = 0x1 + } D3D12_ELEMENTS_LAYOUT; + +typedef +enum D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE + { + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE = 0, + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TOOLS_VISUALIZATION = 0x1, + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_SERIALIZATION = 0x2, + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_CURRENT_SIZE = 0x3 + } D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE; + +typedef struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC + { + D3D12_GPU_VIRTUAL_ADDRESS DestBuffer; + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE InfoType; + } D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC; + +typedef struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE_DESC + { + UINT64 CompactedSizeInBytes; + } D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE_DESC; + +typedef struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TOOLS_VISUALIZATION_DESC + { + UINT64 DecodedSizeInBytes; + } D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TOOLS_VISUALIZATION_DESC; + +typedef struct D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_TOOLS_VISUALIZATION_HEADER + { + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE Type; + UINT NumDescs; + } D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_TOOLS_VISUALIZATION_HEADER; + +// Regarding D3D12_BUILD_RAY_TRACING_ACCELERATION_STRUCTURE_TOOLS_VISUALIZATION_HEADER above, +// depending on Type field, NumDescs above is followed by either: +// D3D12_RAY_TRACING_INSTANCE_DESC InstanceDescs[NumDescs] +// or D3D12_RAY_TRACING_GEOMETRY_DESC GeometryDescs[NumDescs]. +// There is 4 bytes of padding between GeometryDesc structs in the array so alignment is natural when viewed by CPU. + +typedef struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_SERIALIZATION_DESC + { + UINT64 SerializedSizeInBytes; + UINT64 NumBottomLevelAccelerationStructurePointers; + } D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_SERIALIZATION_DESC; + +typedef struct D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER + { + GUID DriverOpaqueGUID; + BYTE DriverOpaqueVersioningData[ 16 ]; + } D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER; + +typedef +enum D3D12_SERIALIZED_DATA_TYPE + { + D3D12_SERIALIZED_DATA_RAYTRACING_ACCELERATION_STRUCTURE = 0 + } D3D12_SERIALIZED_DATA_TYPE; + +typedef +enum D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS + { + D3D12_DRIVER_MATCHING_IDENTIFIER_COMPATIBLE_WITH_DEVICE = 0, + D3D12_DRIVER_MATCHING_IDENTIFIER_UNSUPPORTED_TYPE = 0x1, + D3D12_DRIVER_MATCHING_IDENTIFIER_UNRECOGNIZED = 0x2, + D3D12_DRIVER_MATCHING_IDENTIFIER_INCOMPATIBLE_VERSION = 0x3, + D3D12_DRIVER_MATCHING_IDENTIFIER_INCOMPATIBLE_TYPE = 0x4 + } D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS; + +typedef struct D3D12_SERIALIZED_RAYTRACING_ACCELERATION_STRUCTURE_HEADER + { + D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER DriverMatchingIdentifier; + UINT64 SerializedSizeInBytesIncludingHeader; + UINT64 DeserializedSizeInBytes; + UINT64 NumBottomLevelAccelerationStructurePointersAfterHeader; + } D3D12_SERIALIZED_RAYTRACING_ACCELERATION_STRUCTURE_HEADER; + +typedef struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_CURRENT_SIZE_DESC + { + UINT64 CurrentSizeInBytes; + } D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_CURRENT_SIZE_DESC; + +typedef struct D3D12_RAYTRACING_INSTANCE_DESC + { + FLOAT Transform[ 3 ][ 4 ]; + UINT InstanceID : 24; + UINT InstanceMask : 8; + UINT InstanceContributionToHitGroupIndex : 24; + UINT Flags : 8; + D3D12_GPU_VIRTUAL_ADDRESS AccelerationStructure; + } D3D12_RAYTRACING_INSTANCE_DESC; + +typedef struct D3D12_RAYTRACING_GEOMETRY_DESC + { + D3D12_RAYTRACING_GEOMETRY_TYPE Type; + D3D12_RAYTRACING_GEOMETRY_FLAGS Flags; + union + { + D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC Triangles; + D3D12_RAYTRACING_GEOMETRY_AABBS_DESC AABBs; + } ; + } D3D12_RAYTRACING_GEOMETRY_DESC; + +typedef struct D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS + { + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE Type; + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS Flags; + UINT NumDescs; + D3D12_ELEMENTS_LAYOUT DescsLayout; + union + { + D3D12_GPU_VIRTUAL_ADDRESS InstanceDescs; + const D3D12_RAYTRACING_GEOMETRY_DESC *pGeometryDescs; + const D3D12_RAYTRACING_GEOMETRY_DESC *const *ppGeometryDescs; + } ; + } D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS; + +typedef struct D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC + { + D3D12_GPU_VIRTUAL_ADDRESS DestAccelerationStructureData; + D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS Inputs; + _In_opt_ D3D12_GPU_VIRTUAL_ADDRESS SourceAccelerationStructureData; + D3D12_GPU_VIRTUAL_ADDRESS ScratchAccelerationStructureData; + } D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC; + +typedef struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO + { + UINT64 ResultDataMaxSizeInBytes; + UINT64 ScratchDataSizeInBytes; + UINT64 UpdateScratchDataSizeInBytes; + } D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO; + +typedef +enum D3D12_RAY_FLAGS + { + D3D12_RAY_FLAG_NONE = 0, + D3D12_RAY_FLAG_FORCE_OPAQUE = 0x1, + D3D12_RAY_FLAG_FORCE_NON_OPAQUE = 0x2, + D3D12_RAY_FLAG_ACCEPT_FIRST_HIT_AND_END_SEARCH = 0x4, + D3D12_RAY_FLAG_SKIP_CLOSEST_HIT_SHADER = 0x8, + D3D12_RAY_FLAG_CULL_BACK_FACING_TRIANGLES = 0x10, + D3D12_RAY_FLAG_CULL_FRONT_FACING_TRIANGLES = 0x20, + D3D12_RAY_FLAG_CULL_OPAQUE = 0x40, + D3D12_RAY_FLAG_CULL_NON_OPAQUE = 0x80 + } D3D12_RAY_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_RAY_FLAGS ); +typedef +enum D3D12_HIT_KIND + { + D3D12_HIT_KIND_TRIANGLE_FRONT_FACE = 0xfe, + D3D12_HIT_KIND_TRIANGLE_BACK_FACE = 0xff + } D3D12_HIT_KIND; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0034_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0034_v0_0_s_ifspec; + +#ifndef __ID3D12Device5_INTERFACE_DEFINED__ +#define __ID3D12Device5_INTERFACE_DEFINED__ + +/* interface ID3D12Device5 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Device5; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8b4f173b-2fea-4b80-8f58-4307191ab95d") + ID3D12Device5 : public ID3D12Device4 + { + public: + virtual HRESULT STDMETHODCALLTYPE CreateLifetimeTracker( + _In_ ID3D12LifetimeOwner *pOwner, + REFIID riid, + _COM_Outptr_ void **ppvTracker) = 0; + + virtual void STDMETHODCALLTYPE RemoveDevice( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumerateMetaCommands( + _Inout_ UINT *pNumMetaCommands, + _Out_writes_opt_(*pNumMetaCommands) D3D12_META_COMMAND_DESC *pDescs) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumerateMetaCommandParameters( + _In_ REFGUID CommandId, + _In_ D3D12_META_COMMAND_PARAMETER_STAGE Stage, + _Out_opt_ UINT *pTotalStructureSizeInBytes, + _Inout_ UINT *pParameterCount, + _Out_writes_opt_(*pParameterCount) D3D12_META_COMMAND_PARAMETER_DESC *pParameterDescs) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateMetaCommand( + _In_ REFGUID CommandId, + _In_ UINT NodeMask, + _In_reads_bytes_opt_(CreationParametersDataSizeInBytes) const void *pCreationParametersData, + _In_ SIZE_T CreationParametersDataSizeInBytes, + REFIID riid, + _COM_Outptr_ void **ppMetaCommand) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateStateObject( + const D3D12_STATE_OBJECT_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppStateObject) = 0; + + virtual void STDMETHODCALLTYPE GetRaytracingAccelerationStructurePrebuildInfo( + _In_ const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS *pDesc, + _Out_ D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO *pInfo) = 0; + + virtual D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS STDMETHODCALLTYPE CheckDriverMatchingIdentifier( + _In_ D3D12_SERIALIZED_DATA_TYPE SerializedDataType, + _In_ const D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER *pIdentifierToCheck) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12Device5Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Device5 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Device5 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Device5 * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12Device5 * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12Device5 * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12Device5 * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12Device5 * This, + _In_z_ LPCWSTR Name); + + UINT ( STDMETHODCALLTYPE *GetNodeCount )( + ID3D12Device5 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandQueue )( + ID3D12Device5 * This, + _In_ const D3D12_COMMAND_QUEUE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppCommandQueue); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandAllocator )( + ID3D12Device5 * This, + _In_ D3D12_COMMAND_LIST_TYPE type, + REFIID riid, + _COM_Outptr_ void **ppCommandAllocator); + + HRESULT ( STDMETHODCALLTYPE *CreateGraphicsPipelineState )( + ID3D12Device5 * This, + _In_ const D3D12_GRAPHICS_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + HRESULT ( STDMETHODCALLTYPE *CreateComputePipelineState )( + ID3D12Device5 * This, + _In_ const D3D12_COMPUTE_PIPELINE_STATE_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandList )( + ID3D12Device5 * This, + _In_ UINT nodeMask, + _In_ D3D12_COMMAND_LIST_TYPE type, + _In_ ID3D12CommandAllocator *pCommandAllocator, + _In_opt_ ID3D12PipelineState *pInitialState, + REFIID riid, + _COM_Outptr_ void **ppCommandList); + + HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( + ID3D12Device5 * This, + D3D12_FEATURE Feature, + _Inout_updates_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize); + + HRESULT ( STDMETHODCALLTYPE *CreateDescriptorHeap )( + ID3D12Device5 * This, + _In_ const D3D12_DESCRIPTOR_HEAP_DESC *pDescriptorHeapDesc, + REFIID riid, + _COM_Outptr_ void **ppvHeap); + + UINT ( STDMETHODCALLTYPE *GetDescriptorHandleIncrementSize )( + ID3D12Device5 * This, + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapType); + + HRESULT ( STDMETHODCALLTYPE *CreateRootSignature )( + ID3D12Device5 * This, + _In_ UINT nodeMask, + _In_reads_(blobLengthInBytes) const void *pBlobWithRootSignature, + _In_ SIZE_T blobLengthInBytes, + REFIID riid, + _COM_Outptr_ void **ppvRootSignature); + + void ( STDMETHODCALLTYPE *CreateConstantBufferView )( + ID3D12Device5 * This, + _In_opt_ const D3D12_CONSTANT_BUFFER_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateShaderResourceView )( + ID3D12Device5 * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_SHADER_RESOURCE_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateUnorderedAccessView )( + ID3D12Device5 * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ ID3D12Resource *pCounterResource, + _In_opt_ const D3D12_UNORDERED_ACCESS_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateRenderTargetView )( + ID3D12Device5 * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_RENDER_TARGET_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateDepthStencilView )( + ID3D12Device5 * This, + _In_opt_ ID3D12Resource *pResource, + _In_opt_ const D3D12_DEPTH_STENCIL_VIEW_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CreateSampler )( + ID3D12Device5 * This, + _In_ const D3D12_SAMPLER_DESC *pDesc, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); + + void ( STDMETHODCALLTYPE *CopyDescriptors )( + ID3D12Device5 * This, + _In_ UINT NumDestDescriptorRanges, + _In_reads_(NumDestDescriptorRanges) const D3D12_CPU_DESCRIPTOR_HANDLE *pDestDescriptorRangeStarts, + _In_reads_opt_(NumDestDescriptorRanges) const UINT *pDestDescriptorRangeSizes, + _In_ UINT NumSrcDescriptorRanges, + _In_reads_(NumSrcDescriptorRanges) const D3D12_CPU_DESCRIPTOR_HANDLE *pSrcDescriptorRangeStarts, + _In_reads_opt_(NumSrcDescriptorRanges) const UINT *pSrcDescriptorRangeSizes, + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType); + + void ( STDMETHODCALLTYPE *CopyDescriptorsSimple )( + ID3D12Device5 * This, + _In_ UINT NumDescriptors, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptorRangeStart, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE SrcDescriptorRangeStart, + _In_ D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType); + + D3D12_RESOURCE_ALLOCATION_INFO ( STDMETHODCALLTYPE *GetResourceAllocationInfo )( + ID3D12Device5 * This, + _In_ UINT visibleMask, + _In_ UINT numResourceDescs, + _In_reads_(numResourceDescs) const D3D12_RESOURCE_DESC *pResourceDescs); + + D3D12_HEAP_PROPERTIES ( STDMETHODCALLTYPE *GetCustomHeapProperties )( + ID3D12Device5 * This, + _In_ UINT nodeMask, + D3D12_HEAP_TYPE heapType); + + HRESULT ( STDMETHODCALLTYPE *CreateCommittedResource )( + ID3D12Device5 * This, + _In_ const D3D12_HEAP_PROPERTIES *pHeapProperties, + D3D12_HEAP_FLAGS HeapFlags, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialResourceState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riidResource, + _COM_Outptr_opt_ void **ppvResource); + + HRESULT ( STDMETHODCALLTYPE *CreateHeap )( + ID3D12Device5 * This, + _In_ const D3D12_HEAP_DESC *pDesc, + REFIID riid, + _COM_Outptr_opt_ void **ppvHeap); + + HRESULT ( STDMETHODCALLTYPE *CreatePlacedResource )( + ID3D12Device5 * This, + _In_ ID3D12Heap *pHeap, + UINT64 HeapOffset, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riid, + _COM_Outptr_opt_ void **ppvResource); + + HRESULT ( STDMETHODCALLTYPE *CreateReservedResource )( + ID3D12Device5 * This, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + REFIID riid, + _COM_Outptr_opt_ void **ppvResource); + + HRESULT ( STDMETHODCALLTYPE *CreateSharedHandle )( + ID3D12Device5 * This, + _In_ ID3D12DeviceChild *pObject, + _In_opt_ const SECURITY_ATTRIBUTES *pAttributes, + DWORD Access, + _In_opt_ LPCWSTR Name, + _Out_ HANDLE *pHandle); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedHandle )( + ID3D12Device5 * This, + _In_ HANDLE NTHandle, + REFIID riid, + _COM_Outptr_opt_ void **ppvObj); + + HRESULT ( STDMETHODCALLTYPE *OpenSharedHandleByName )( + ID3D12Device5 * This, + _In_ LPCWSTR Name, + DWORD Access, + /* [annotation][out] */ + _Out_ HANDLE *pNTHandle); + + HRESULT ( STDMETHODCALLTYPE *MakeResident )( + ID3D12Device5 * This, + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects); + + HRESULT ( STDMETHODCALLTYPE *Evict )( + ID3D12Device5 * This, + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects); + + HRESULT ( STDMETHODCALLTYPE *CreateFence )( + ID3D12Device5 * This, + UINT64 InitialValue, + D3D12_FENCE_FLAGS Flags, + REFIID riid, + _COM_Outptr_ void **ppFence); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceRemovedReason )( + ID3D12Device5 * This); + + void ( STDMETHODCALLTYPE *GetCopyableFootprints )( + ID3D12Device5 * This, + _In_ const D3D12_RESOURCE_DESC *pResourceDesc, + _In_range_(0,D3D12_REQ_SUBRESOURCES) UINT FirstSubresource, + _In_range_(0,D3D12_REQ_SUBRESOURCES-FirstSubresource) UINT NumSubresources, + UINT64 BaseOffset, + _Out_writes_opt_(NumSubresources) D3D12_PLACED_SUBRESOURCE_FOOTPRINT *pLayouts, + _Out_writes_opt_(NumSubresources) UINT *pNumRows, + _Out_writes_opt_(NumSubresources) UINT64 *pRowSizeInBytes, + _Out_opt_ UINT64 *pTotalBytes); + + HRESULT ( STDMETHODCALLTYPE *CreateQueryHeap )( + ID3D12Device5 * This, + _In_ const D3D12_QUERY_HEAP_DESC *pDesc, + REFIID riid, + _COM_Outptr_opt_ void **ppvHeap); + + HRESULT ( STDMETHODCALLTYPE *SetStablePowerState )( + ID3D12Device5 * This, + BOOL Enable); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandSignature )( + ID3D12Device5 * This, + _In_ const D3D12_COMMAND_SIGNATURE_DESC *pDesc, + _In_opt_ ID3D12RootSignature *pRootSignature, + REFIID riid, + _COM_Outptr_opt_ void **ppvCommandSignature); + + void ( STDMETHODCALLTYPE *GetResourceTiling )( + ID3D12Device5 * This, + _In_ ID3D12Resource *pTiledResource, + _Out_opt_ UINT *pNumTilesForEntireResource, + _Out_opt_ D3D12_PACKED_MIP_INFO *pPackedMipDesc, + _Out_opt_ D3D12_TILE_SHAPE *pStandardTileShapeForNonPackedMips, + _Inout_opt_ UINT *pNumSubresourceTilings, + _In_ UINT FirstSubresourceTilingToGet, + _Out_writes_(*pNumSubresourceTilings) D3D12_SUBRESOURCE_TILING *pSubresourceTilingsForNonPackedMips); + + LUID ( STDMETHODCALLTYPE *GetAdapterLuid )( + ID3D12Device5 * This); + + HRESULT ( STDMETHODCALLTYPE *CreatePipelineLibrary )( + ID3D12Device5 * This, + _In_reads_(BlobLength) const void *pLibraryBlob, + SIZE_T BlobLength, + REFIID riid, + _COM_Outptr_ void **ppPipelineLibrary); + + HRESULT ( STDMETHODCALLTYPE *SetEventOnMultipleFenceCompletion )( + ID3D12Device5 * This, + _In_reads_(NumFences) ID3D12Fence *const *ppFences, + _In_reads_(NumFences) const UINT64 *pFenceValues, + UINT NumFences, + D3D12_MULTIPLE_FENCE_WAIT_FLAGS Flags, + HANDLE hEvent); + + HRESULT ( STDMETHODCALLTYPE *SetResidencyPriority )( + ID3D12Device5 * This, + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects, + _In_reads_(NumObjects) const D3D12_RESIDENCY_PRIORITY *pPriorities); + + HRESULT ( STDMETHODCALLTYPE *CreatePipelineState )( + ID3D12Device5 * This, + const D3D12_PIPELINE_STATE_STREAM_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppPipelineState); + + HRESULT ( STDMETHODCALLTYPE *OpenExistingHeapFromAddress )( + ID3D12Device5 * This, + _In_ const void *pAddress, + REFIID riid, + _COM_Outptr_ void **ppvHeap); + + HRESULT ( STDMETHODCALLTYPE *OpenExistingHeapFromFileMapping )( + ID3D12Device5 * This, + _In_ HANDLE hFileMapping, + REFIID riid, + _COM_Outptr_ void **ppvHeap); + + HRESULT ( STDMETHODCALLTYPE *EnqueueMakeResident )( + ID3D12Device5 * This, + D3D12_RESIDENCY_FLAGS Flags, + UINT NumObjects, + _In_reads_(NumObjects) ID3D12Pageable *const *ppObjects, + _In_ ID3D12Fence *pFenceToSignal, + UINT64 FenceValueToSignal); + + HRESULT ( STDMETHODCALLTYPE *CreateCommandList1 )( + ID3D12Device5 * This, + _In_ UINT nodeMask, + _In_ D3D12_COMMAND_LIST_TYPE type, + _In_ D3D12_COMMAND_LIST_FLAGS flags, + REFIID riid, + _COM_Outptr_ void **ppCommandList); + + HRESULT ( STDMETHODCALLTYPE *CreateProtectedResourceSession )( + ID3D12Device5 * This, + _In_ const D3D12_PROTECTED_RESOURCE_SESSION_DESC *pDesc, + _In_ REFIID riid, + _COM_Outptr_ void **ppSession); + + HRESULT ( STDMETHODCALLTYPE *CreateCommittedResource1 )( + ID3D12Device5 * This, + _In_ const D3D12_HEAP_PROPERTIES *pHeapProperties, + D3D12_HEAP_FLAGS HeapFlags, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialResourceState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + _In_opt_ ID3D12ProtectedResourceSession *pProtectedSession, + REFIID riidResource, + _COM_Outptr_opt_ void **ppvResource); + + HRESULT ( STDMETHODCALLTYPE *CreateHeap1 )( + ID3D12Device5 * This, + _In_ const D3D12_HEAP_DESC *pDesc, + _In_opt_ ID3D12ProtectedResourceSession *pProtectedSession, + REFIID riid, + _COM_Outptr_opt_ void **ppvHeap); + + HRESULT ( STDMETHODCALLTYPE *CreateReservedResource1 )( + ID3D12Device5 * This, + _In_ const D3D12_RESOURCE_DESC *pDesc, + D3D12_RESOURCE_STATES InitialState, + _In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue, + _In_opt_ ID3D12ProtectedResourceSession *pProtectedSession, + REFIID riid, + _COM_Outptr_opt_ void **ppvResource); + + D3D12_RESOURCE_ALLOCATION_INFO ( STDMETHODCALLTYPE *GetResourceAllocationInfo1 )( + ID3D12Device5 * This, + UINT visibleMask, + UINT numResourceDescs, + _In_reads_(numResourceDescs) const D3D12_RESOURCE_DESC *pResourceDescs, + _Out_writes_opt_(numResourceDescs) D3D12_RESOURCE_ALLOCATION_INFO1 *pResourceAllocationInfo1); + + HRESULT ( STDMETHODCALLTYPE *CreateLifetimeTracker )( + ID3D12Device5 * This, + _In_ ID3D12LifetimeOwner *pOwner, + REFIID riid, + _COM_Outptr_ void **ppvTracker); + + void ( STDMETHODCALLTYPE *RemoveDevice )( + ID3D12Device5 * This); + + HRESULT ( STDMETHODCALLTYPE *EnumerateMetaCommands )( + ID3D12Device5 * This, + _Inout_ UINT *pNumMetaCommands, + _Out_writes_opt_(*pNumMetaCommands) D3D12_META_COMMAND_DESC *pDescs); + + HRESULT ( STDMETHODCALLTYPE *EnumerateMetaCommandParameters )( + ID3D12Device5 * This, + _In_ REFGUID CommandId, + _In_ D3D12_META_COMMAND_PARAMETER_STAGE Stage, + _Out_opt_ UINT *pTotalStructureSizeInBytes, + _Inout_ UINT *pParameterCount, + _Out_writes_opt_(*pParameterCount) D3D12_META_COMMAND_PARAMETER_DESC *pParameterDescs); + + HRESULT ( STDMETHODCALLTYPE *CreateMetaCommand )( + ID3D12Device5 * This, + _In_ REFGUID CommandId, + _In_ UINT NodeMask, + _In_reads_bytes_opt_(CreationParametersDataSizeInBytes) const void *pCreationParametersData, + _In_ SIZE_T CreationParametersDataSizeInBytes, + REFIID riid, + _COM_Outptr_ void **ppMetaCommand); + + HRESULT ( STDMETHODCALLTYPE *CreateStateObject )( + ID3D12Device5 * This, + const D3D12_STATE_OBJECT_DESC *pDesc, + REFIID riid, + _COM_Outptr_ void **ppStateObject); + + void ( STDMETHODCALLTYPE *GetRaytracingAccelerationStructurePrebuildInfo )( + ID3D12Device5 * This, + _In_ const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS *pDesc, + _Out_ D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO *pInfo); + + D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS ( STDMETHODCALLTYPE *CheckDriverMatchingIdentifier )( + ID3D12Device5 * This, + _In_ D3D12_SERIALIZED_DATA_TYPE SerializedDataType, + _In_ const D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER *pIdentifierToCheck); + + END_INTERFACE + } ID3D12Device5Vtbl; + + interface ID3D12Device5 + { + CONST_VTBL struct ID3D12Device5Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Device5_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Device5_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Device5_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Device5_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12Device5_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12Device5_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12Device5_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12Device5_GetNodeCount(This) \ + ( (This)->lpVtbl -> GetNodeCount(This) ) + +#define ID3D12Device5_CreateCommandQueue(This,pDesc,riid,ppCommandQueue) \ + ( (This)->lpVtbl -> CreateCommandQueue(This,pDesc,riid,ppCommandQueue) ) + +#define ID3D12Device5_CreateCommandAllocator(This,type,riid,ppCommandAllocator) \ + ( (This)->lpVtbl -> CreateCommandAllocator(This,type,riid,ppCommandAllocator) ) + +#define ID3D12Device5_CreateGraphicsPipelineState(This,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> CreateGraphicsPipelineState(This,pDesc,riid,ppPipelineState) ) + +#define ID3D12Device5_CreateComputePipelineState(This,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> CreateComputePipelineState(This,pDesc,riid,ppPipelineState) ) + +#define ID3D12Device5_CreateCommandList(This,nodeMask,type,pCommandAllocator,pInitialState,riid,ppCommandList) \ + ( (This)->lpVtbl -> CreateCommandList(This,nodeMask,type,pCommandAllocator,pInitialState,riid,ppCommandList) ) + +#define ID3D12Device5_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) \ + ( (This)->lpVtbl -> CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) ) + +#define ID3D12Device5_CreateDescriptorHeap(This,pDescriptorHeapDesc,riid,ppvHeap) \ + ( (This)->lpVtbl -> CreateDescriptorHeap(This,pDescriptorHeapDesc,riid,ppvHeap) ) + +#define ID3D12Device5_GetDescriptorHandleIncrementSize(This,DescriptorHeapType) \ + ( (This)->lpVtbl -> GetDescriptorHandleIncrementSize(This,DescriptorHeapType) ) + +#define ID3D12Device5_CreateRootSignature(This,nodeMask,pBlobWithRootSignature,blobLengthInBytes,riid,ppvRootSignature) \ + ( (This)->lpVtbl -> CreateRootSignature(This,nodeMask,pBlobWithRootSignature,blobLengthInBytes,riid,ppvRootSignature) ) + +#define ID3D12Device5_CreateConstantBufferView(This,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateConstantBufferView(This,pDesc,DestDescriptor) ) + +#define ID3D12Device5_CreateShaderResourceView(This,pResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateShaderResourceView(This,pResource,pDesc,DestDescriptor) ) + +#define ID3D12Device5_CreateUnorderedAccessView(This,pResource,pCounterResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateUnorderedAccessView(This,pResource,pCounterResource,pDesc,DestDescriptor) ) + +#define ID3D12Device5_CreateRenderTargetView(This,pResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateRenderTargetView(This,pResource,pDesc,DestDescriptor) ) + +#define ID3D12Device5_CreateDepthStencilView(This,pResource,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateDepthStencilView(This,pResource,pDesc,DestDescriptor) ) + +#define ID3D12Device5_CreateSampler(This,pDesc,DestDescriptor) \ + ( (This)->lpVtbl -> CreateSampler(This,pDesc,DestDescriptor) ) + +#define ID3D12Device5_CopyDescriptors(This,NumDestDescriptorRanges,pDestDescriptorRangeStarts,pDestDescriptorRangeSizes,NumSrcDescriptorRanges,pSrcDescriptorRangeStarts,pSrcDescriptorRangeSizes,DescriptorHeapsType) \ + ( (This)->lpVtbl -> CopyDescriptors(This,NumDestDescriptorRanges,pDestDescriptorRangeStarts,pDestDescriptorRangeSizes,NumSrcDescriptorRanges,pSrcDescriptorRangeStarts,pSrcDescriptorRangeSizes,DescriptorHeapsType) ) + +#define ID3D12Device5_CopyDescriptorsSimple(This,NumDescriptors,DestDescriptorRangeStart,SrcDescriptorRangeStart,DescriptorHeapsType) \ + ( (This)->lpVtbl -> CopyDescriptorsSimple(This,NumDescriptors,DestDescriptorRangeStart,SrcDescriptorRangeStart,DescriptorHeapsType) ) + +#define ID3D12Device5_GetResourceAllocationInfo(This,visibleMask,numResourceDescs,pResourceDescs) \ + ( (This)->lpVtbl -> GetResourceAllocationInfo(This,visibleMask,numResourceDescs,pResourceDescs) ) + +#define ID3D12Device5_GetCustomHeapProperties(This,nodeMask,heapType) \ + ( (This)->lpVtbl -> GetCustomHeapProperties(This,nodeMask,heapType) ) + +#define ID3D12Device5_CreateCommittedResource(This,pHeapProperties,HeapFlags,pDesc,InitialResourceState,pOptimizedClearValue,riidResource,ppvResource) \ + ( (This)->lpVtbl -> CreateCommittedResource(This,pHeapProperties,HeapFlags,pDesc,InitialResourceState,pOptimizedClearValue,riidResource,ppvResource) ) + +#define ID3D12Device5_CreateHeap(This,pDesc,riid,ppvHeap) \ + ( (This)->lpVtbl -> CreateHeap(This,pDesc,riid,ppvHeap) ) + +#define ID3D12Device5_CreatePlacedResource(This,pHeap,HeapOffset,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) \ + ( (This)->lpVtbl -> CreatePlacedResource(This,pHeap,HeapOffset,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) ) + +#define ID3D12Device5_CreateReservedResource(This,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) \ + ( (This)->lpVtbl -> CreateReservedResource(This,pDesc,InitialState,pOptimizedClearValue,riid,ppvResource) ) + +#define ID3D12Device5_CreateSharedHandle(This,pObject,pAttributes,Access,Name,pHandle) \ + ( (This)->lpVtbl -> CreateSharedHandle(This,pObject,pAttributes,Access,Name,pHandle) ) + +#define ID3D12Device5_OpenSharedHandle(This,NTHandle,riid,ppvObj) \ + ( (This)->lpVtbl -> OpenSharedHandle(This,NTHandle,riid,ppvObj) ) + +#define ID3D12Device5_OpenSharedHandleByName(This,Name,Access,pNTHandle) \ + ( (This)->lpVtbl -> OpenSharedHandleByName(This,Name,Access,pNTHandle) ) + +#define ID3D12Device5_MakeResident(This,NumObjects,ppObjects) \ + ( (This)->lpVtbl -> MakeResident(This,NumObjects,ppObjects) ) + +#define ID3D12Device5_Evict(This,NumObjects,ppObjects) \ + ( (This)->lpVtbl -> Evict(This,NumObjects,ppObjects) ) + +#define ID3D12Device5_CreateFence(This,InitialValue,Flags,riid,ppFence) \ + ( (This)->lpVtbl -> CreateFence(This,InitialValue,Flags,riid,ppFence) ) + +#define ID3D12Device5_GetDeviceRemovedReason(This) \ + ( (This)->lpVtbl -> GetDeviceRemovedReason(This) ) + +#define ID3D12Device5_GetCopyableFootprints(This,pResourceDesc,FirstSubresource,NumSubresources,BaseOffset,pLayouts,pNumRows,pRowSizeInBytes,pTotalBytes) \ + ( (This)->lpVtbl -> GetCopyableFootprints(This,pResourceDesc,FirstSubresource,NumSubresources,BaseOffset,pLayouts,pNumRows,pRowSizeInBytes,pTotalBytes) ) + +#define ID3D12Device5_CreateQueryHeap(This,pDesc,riid,ppvHeap) \ + ( (This)->lpVtbl -> CreateQueryHeap(This,pDesc,riid,ppvHeap) ) + +#define ID3D12Device5_SetStablePowerState(This,Enable) \ + ( (This)->lpVtbl -> SetStablePowerState(This,Enable) ) + +#define ID3D12Device5_CreateCommandSignature(This,pDesc,pRootSignature,riid,ppvCommandSignature) \ + ( (This)->lpVtbl -> CreateCommandSignature(This,pDesc,pRootSignature,riid,ppvCommandSignature) ) + +#define ID3D12Device5_GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) \ + ( (This)->lpVtbl -> GetResourceTiling(This,pTiledResource,pNumTilesForEntireResource,pPackedMipDesc,pStandardTileShapeForNonPackedMips,pNumSubresourceTilings,FirstSubresourceTilingToGet,pSubresourceTilingsForNonPackedMips) ) + +#define ID3D12Device5_GetAdapterLuid(This) \ + ( (This)->lpVtbl -> GetAdapterLuid(This) ) + + +#define ID3D12Device5_CreatePipelineLibrary(This,pLibraryBlob,BlobLength,riid,ppPipelineLibrary) \ + ( (This)->lpVtbl -> CreatePipelineLibrary(This,pLibraryBlob,BlobLength,riid,ppPipelineLibrary) ) + +#define ID3D12Device5_SetEventOnMultipleFenceCompletion(This,ppFences,pFenceValues,NumFences,Flags,hEvent) \ + ( (This)->lpVtbl -> SetEventOnMultipleFenceCompletion(This,ppFences,pFenceValues,NumFences,Flags,hEvent) ) + +#define ID3D12Device5_SetResidencyPriority(This,NumObjects,ppObjects,pPriorities) \ + ( (This)->lpVtbl -> SetResidencyPriority(This,NumObjects,ppObjects,pPriorities) ) + + +#define ID3D12Device5_CreatePipelineState(This,pDesc,riid,ppPipelineState) \ + ( (This)->lpVtbl -> CreatePipelineState(This,pDesc,riid,ppPipelineState) ) + + +#define ID3D12Device5_OpenExistingHeapFromAddress(This,pAddress,riid,ppvHeap) \ + ( (This)->lpVtbl -> OpenExistingHeapFromAddress(This,pAddress,riid,ppvHeap) ) + +#define ID3D12Device5_OpenExistingHeapFromFileMapping(This,hFileMapping,riid,ppvHeap) \ + ( (This)->lpVtbl -> OpenExistingHeapFromFileMapping(This,hFileMapping,riid,ppvHeap) ) + +#define ID3D12Device5_EnqueueMakeResident(This,Flags,NumObjects,ppObjects,pFenceToSignal,FenceValueToSignal) \ + ( (This)->lpVtbl -> EnqueueMakeResident(This,Flags,NumObjects,ppObjects,pFenceToSignal,FenceValueToSignal) ) + + +#define ID3D12Device5_CreateCommandList1(This,nodeMask,type,flags,riid,ppCommandList) \ + ( (This)->lpVtbl -> CreateCommandList1(This,nodeMask,type,flags,riid,ppCommandList) ) + +#define ID3D12Device5_CreateProtectedResourceSession(This,pDesc,riid,ppSession) \ + ( (This)->lpVtbl -> CreateProtectedResourceSession(This,pDesc,riid,ppSession) ) + +#define ID3D12Device5_CreateCommittedResource1(This,pHeapProperties,HeapFlags,pDesc,InitialResourceState,pOptimizedClearValue,pProtectedSession,riidResource,ppvResource) \ + ( (This)->lpVtbl -> CreateCommittedResource1(This,pHeapProperties,HeapFlags,pDesc,InitialResourceState,pOptimizedClearValue,pProtectedSession,riidResource,ppvResource) ) + +#define ID3D12Device5_CreateHeap1(This,pDesc,pProtectedSession,riid,ppvHeap) \ + ( (This)->lpVtbl -> CreateHeap1(This,pDesc,pProtectedSession,riid,ppvHeap) ) + +#define ID3D12Device5_CreateReservedResource1(This,pDesc,InitialState,pOptimizedClearValue,pProtectedSession,riid,ppvResource) \ + ( (This)->lpVtbl -> CreateReservedResource1(This,pDesc,InitialState,pOptimizedClearValue,pProtectedSession,riid,ppvResource) ) + +#define ID3D12Device5_GetResourceAllocationInfo1(This,visibleMask,numResourceDescs,pResourceDescs,pResourceAllocationInfo1) \ + ( (This)->lpVtbl -> GetResourceAllocationInfo1(This,visibleMask,numResourceDescs,pResourceDescs,pResourceAllocationInfo1) ) + + +#define ID3D12Device5_CreateLifetimeTracker(This,pOwner,riid,ppvTracker) \ + ( (This)->lpVtbl -> CreateLifetimeTracker(This,pOwner,riid,ppvTracker) ) + +#define ID3D12Device5_RemoveDevice(This) \ + ( (This)->lpVtbl -> RemoveDevice(This) ) + +#define ID3D12Device5_EnumerateMetaCommands(This,pNumMetaCommands,pDescs) \ + ( (This)->lpVtbl -> EnumerateMetaCommands(This,pNumMetaCommands,pDescs) ) + +#define ID3D12Device5_EnumerateMetaCommandParameters(This,CommandId,Stage,pTotalStructureSizeInBytes,pParameterCount,pParameterDescs) \ + ( (This)->lpVtbl -> EnumerateMetaCommandParameters(This,CommandId,Stage,pTotalStructureSizeInBytes,pParameterCount,pParameterDescs) ) + +#define ID3D12Device5_CreateMetaCommand(This,CommandId,NodeMask,pCreationParametersData,CreationParametersDataSizeInBytes,riid,ppMetaCommand) \ + ( (This)->lpVtbl -> CreateMetaCommand(This,CommandId,NodeMask,pCreationParametersData,CreationParametersDataSizeInBytes,riid,ppMetaCommand) ) + +#define ID3D12Device5_CreateStateObject(This,pDesc,riid,ppStateObject) \ + ( (This)->lpVtbl -> CreateStateObject(This,pDesc,riid,ppStateObject) ) + +#define ID3D12Device5_GetRaytracingAccelerationStructurePrebuildInfo(This,pDesc,pInfo) \ + ( (This)->lpVtbl -> GetRaytracingAccelerationStructurePrebuildInfo(This,pDesc,pInfo) ) + +#define ID3D12Device5_CheckDriverMatchingIdentifier(This,SerializedDataType,pIdentifierToCheck) \ + ( (This)->lpVtbl -> CheckDriverMatchingIdentifier(This,SerializedDataType,pIdentifierToCheck) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12Device5_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12_0000_0035 */ +/* [local] */ + +typedef +enum D3D12_AUTO_BREADCRUMB_OP + { + D3D12_AUTO_BREADCRUMB_OP_SETMARKER = 0, + D3D12_AUTO_BREADCRUMB_OP_BEGINEVENT = 1, + D3D12_AUTO_BREADCRUMB_OP_ENDEVENT = 2, + D3D12_AUTO_BREADCRUMB_OP_DRAWINSTANCED = 3, + D3D12_AUTO_BREADCRUMB_OP_DRAWINDEXEDINSTANCED = 4, + D3D12_AUTO_BREADCRUMB_OP_EXECUTEINDIRECT = 5, + D3D12_AUTO_BREADCRUMB_OP_DISPATCH = 6, + D3D12_AUTO_BREADCRUMB_OP_COPYBUFFERREGION = 7, + D3D12_AUTO_BREADCRUMB_OP_COPYTEXTUREREGION = 8, + D3D12_AUTO_BREADCRUMB_OP_COPYRESOURCE = 9, + D3D12_AUTO_BREADCRUMB_OP_COPYTILES = 10, + D3D12_AUTO_BREADCRUMB_OP_RESOLVESUBRESOURCE = 11, + D3D12_AUTO_BREADCRUMB_OP_CLEARRENDERTARGETVIEW = 12, + D3D12_AUTO_BREADCRUMB_OP_CLEARUNORDEREDACCESSVIEW = 13, + D3D12_AUTO_BREADCRUMB_OP_CLEARDEPTHSTENCILVIEW = 14, + D3D12_AUTO_BREADCRUMB_OP_RESOURCEBARRIER = 15, + D3D12_AUTO_BREADCRUMB_OP_EXECUTEBUNDLE = 16, + D3D12_AUTO_BREADCRUMB_OP_PRESENT = 17, + D3D12_AUTO_BREADCRUMB_OP_RESOLVEQUERYDATA = 18, + D3D12_AUTO_BREADCRUMB_OP_BEGINSUBMISSION = 19, + D3D12_AUTO_BREADCRUMB_OP_ENDSUBMISSION = 20, + D3D12_AUTO_BREADCRUMB_OP_DECODEFRAME = 21, + D3D12_AUTO_BREADCRUMB_OP_PROCESSFRAMES = 22, + D3D12_AUTO_BREADCRUMB_OP_ATOMICCOPYBUFFERUINT = 23, + D3D12_AUTO_BREADCRUMB_OP_ATOMICCOPYBUFFERUINT64 = 24, + D3D12_AUTO_BREADCRUMB_OP_RESOLVESUBRESOURCEREGION = 25, + D3D12_AUTO_BREADCRUMB_OP_WRITEBUFFERIMMEDIATE = 26, + D3D12_AUTO_BREADCRUMB_OP_DECODEFRAME1 = 27, + D3D12_AUTO_BREADCRUMB_OP_SETPROTECTEDRESOURCESESSION = 28, + D3D12_AUTO_BREADCRUMB_OP_DECODEFRAME2 = 29, + D3D12_AUTO_BREADCRUMB_OP_PROCESSFRAMES1 = 30, + D3D12_AUTO_BREADCRUMB_OP_BUILDRAYTRACINGACCELERATIONSTRUCTURE = 31, + D3D12_AUTO_BREADCRUMB_OP_EMITRAYTRACINGACCELERATIONSTRUCTUREPOSTBUILDINFO = 32, + D3D12_AUTO_BREADCRUMB_OP_COPYRAYTRACINGACCELERATIONSTRUCTURE = 33, + D3D12_AUTO_BREADCRUMB_OP_DISPATCHRAYS = 34, + D3D12_AUTO_BREADCRUMB_OP_INITIALIZEMETACOMMAND = 35, + D3D12_AUTO_BREADCRUMB_OP_EXECUTEMETACOMMAND = 36, + D3D12_AUTO_BREADCRUMB_OP_ESTIMATEMOTION = 37, + D3D12_AUTO_BREADCRUMB_OP_RESOLVEMOTIONVECTORHEAP = 38, + D3D12_AUTO_BREADCRUMB_OP_SETPIPELINESTATE1 = 39 + } D3D12_AUTO_BREADCRUMB_OP; + +typedef struct D3D12_AUTO_BREADCRUMB_NODE + { + const char *pCommandListDebugNameA; + const wchar_t *pCommandListDebugNameW; + const char *pCommandQueueDebugNameA; + const wchar_t *pCommandQueueDebugNameW; + ID3D12GraphicsCommandList *pCommandList; + ID3D12CommandQueue *pCommandQueue; + UINT32 BreadcrumbCount; + UINT32 *pLastBreadcrumbValue; + D3D12_AUTO_BREADCRUMB_OP *pCommandHistory; + struct D3D12_AUTO_BREADCRUMB_NODE *pNext; + } D3D12_AUTO_BREADCRUMB_NODE; + +typedef +enum D3D12_DRED_VERSION + { + D3D12_DRED_VERSION_1_0 = 0x1 + } D3D12_DRED_VERSION; + +typedef +enum D3D12_DRED_FLAGS + { + D3D12_DRED_FLAG_NONE = 0, + D3D12_DRED_FLAG_FORCE_ENABLE = 1, + D3D12_DRED_FLAG_DISABLE_AUTOBREADCRUMBS = 2 + } D3D12_DRED_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_DRED_FLAGS ); +typedef struct D3D12_DEVICE_REMOVED_EXTENDED_DATA + { + _In_ D3D12_DRED_FLAGS Flags; + _Out_ D3D12_AUTO_BREADCRUMB_NODE *pHeadAutoBreadcrumbNode; + } D3D12_DEVICE_REMOVED_EXTENDED_DATA; + +typedef struct D3D12_VERSIONED_DEVICE_REMOVED_EXTENDED_DATA + { + D3D12_DRED_VERSION Version; + union + { + D3D12_DEVICE_REMOVED_EXTENDED_DATA Dred_1_0; + } ; + } D3D12_VERSIONED_DEVICE_REMOVED_EXTENDED_DATA; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0035_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0035_v0_0_s_ifspec; + +#ifndef __ID3D12Resource1_INTERFACE_DEFINED__ +#define __ID3D12Resource1_INTERFACE_DEFINED__ + +/* interface ID3D12Resource1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Resource1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9D5E227A-4430-4161-88B3-3ECA6BB16E19") + ID3D12Resource1 : public ID3D12Resource + { + public: + virtual HRESULT STDMETHODCALLTYPE GetProtectedResourceSession( + REFIID riid, + _COM_Outptr_opt_ void **ppProtectedSession) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12Resource1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Resource1 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Resource1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Resource1 * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12Resource1 * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12Resource1 * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12Resource1 * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12Resource1 * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12Resource1 * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + HRESULT ( STDMETHODCALLTYPE *Map )( + ID3D12Resource1 * This, + UINT Subresource, + _In_opt_ const D3D12_RANGE *pReadRange, + _Outptr_opt_result_bytebuffer_(_Inexpressible_("Dependent on resource")) void **ppData); + + void ( STDMETHODCALLTYPE *Unmap )( + ID3D12Resource1 * This, + UINT Subresource, + _In_opt_ const D3D12_RANGE *pWrittenRange); + + D3D12_RESOURCE_DESC ( STDMETHODCALLTYPE *GetDesc )( + ID3D12Resource1 * This); + + D3D12_GPU_VIRTUAL_ADDRESS ( STDMETHODCALLTYPE *GetGPUVirtualAddress )( + ID3D12Resource1 * This); + + HRESULT ( STDMETHODCALLTYPE *WriteToSubresource )( + ID3D12Resource1 * This, + UINT DstSubresource, + _In_opt_ const D3D12_BOX *pDstBox, + _In_ const void *pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch); + + HRESULT ( STDMETHODCALLTYPE *ReadFromSubresource )( + ID3D12Resource1 * This, + _Out_ void *pDstData, + UINT DstRowPitch, + UINT DstDepthPitch, + UINT SrcSubresource, + _In_opt_ const D3D12_BOX *pSrcBox); + + HRESULT ( STDMETHODCALLTYPE *GetHeapProperties )( + ID3D12Resource1 * This, + _Out_opt_ D3D12_HEAP_PROPERTIES *pHeapProperties, + _Out_opt_ D3D12_HEAP_FLAGS *pHeapFlags); + + HRESULT ( STDMETHODCALLTYPE *GetProtectedResourceSession )( + ID3D12Resource1 * This, + REFIID riid, + _COM_Outptr_opt_ void **ppProtectedSession); + + END_INTERFACE + } ID3D12Resource1Vtbl; + + interface ID3D12Resource1 + { + CONST_VTBL struct ID3D12Resource1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Resource1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Resource1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Resource1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Resource1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12Resource1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12Resource1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12Resource1_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12Resource1_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + + +#define ID3D12Resource1_Map(This,Subresource,pReadRange,ppData) \ + ( (This)->lpVtbl -> Map(This,Subresource,pReadRange,ppData) ) + +#define ID3D12Resource1_Unmap(This,Subresource,pWrittenRange) \ + ( (This)->lpVtbl -> Unmap(This,Subresource,pWrittenRange) ) + +#define ID3D12Resource1_GetDesc(This) \ + ( (This)->lpVtbl -> GetDesc(This) ) + +#define ID3D12Resource1_GetGPUVirtualAddress(This) \ + ( (This)->lpVtbl -> GetGPUVirtualAddress(This) ) + +#define ID3D12Resource1_WriteToSubresource(This,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) \ + ( (This)->lpVtbl -> WriteToSubresource(This,DstSubresource,pDstBox,pSrcData,SrcRowPitch,SrcDepthPitch) ) + +#define ID3D12Resource1_ReadFromSubresource(This,pDstData,DstRowPitch,DstDepthPitch,SrcSubresource,pSrcBox) \ + ( (This)->lpVtbl -> ReadFromSubresource(This,pDstData,DstRowPitch,DstDepthPitch,SrcSubresource,pSrcBox) ) + +#define ID3D12Resource1_GetHeapProperties(This,pHeapProperties,pHeapFlags) \ + ( (This)->lpVtbl -> GetHeapProperties(This,pHeapProperties,pHeapFlags) ) + + +#define ID3D12Resource1_GetProtectedResourceSession(This,riid,ppProtectedSession) \ + ( (This)->lpVtbl -> GetProtectedResourceSession(This,riid,ppProtectedSession) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12Resource1_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12Heap1_INTERFACE_DEFINED__ +#define __ID3D12Heap1_INTERFACE_DEFINED__ + +/* interface ID3D12Heap1 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Heap1; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("572F7389-2168-49E3-9693-D6DF5871BF6D") + ID3D12Heap1 : public ID3D12Heap + { + public: + virtual HRESULT STDMETHODCALLTYPE GetProtectedResourceSession( + REFIID riid, + _COM_Outptr_opt_ void **ppProtectedSession) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12Heap1Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Heap1 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Heap1 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Heap1 * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12Heap1 * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12Heap1 * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12Heap1 * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12Heap1 * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12Heap1 * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + D3D12_HEAP_DESC ( STDMETHODCALLTYPE *GetDesc )( + ID3D12Heap1 * This); + + HRESULT ( STDMETHODCALLTYPE *GetProtectedResourceSession )( + ID3D12Heap1 * This, + REFIID riid, + _COM_Outptr_opt_ void **ppProtectedSession); + + END_INTERFACE + } ID3D12Heap1Vtbl; + + interface ID3D12Heap1 + { + CONST_VTBL struct ID3D12Heap1Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Heap1_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Heap1_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Heap1_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Heap1_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12Heap1_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12Heap1_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12Heap1_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12Heap1_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + + +#define ID3D12Heap1_GetDesc(This) \ + ( (This)->lpVtbl -> GetDesc(This) ) + + +#define ID3D12Heap1_GetProtectedResourceSession(This,riid,ppProtectedSession) \ + ( (This)->lpVtbl -> GetProtectedResourceSession(This,riid,ppProtectedSession) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12Heap1_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12GraphicsCommandList3_INTERFACE_DEFINED__ +#define __ID3D12GraphicsCommandList3_INTERFACE_DEFINED__ + +/* interface ID3D12GraphicsCommandList3 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12GraphicsCommandList3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6FDA83A7-B84C-4E38-9AC8-C7BD22016B3D") + ID3D12GraphicsCommandList3 : public ID3D12GraphicsCommandList2 + { + public: + virtual void STDMETHODCALLTYPE SetProtectedResourceSession( + _In_opt_ ID3D12ProtectedResourceSession *pProtectedResourceSession) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12GraphicsCommandList3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12GraphicsCommandList3 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12GraphicsCommandList3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12GraphicsCommandList3 * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12GraphicsCommandList3 * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12GraphicsCommandList3 * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12GraphicsCommandList3 * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); + + HRESULT ( STDMETHODCALLTYPE *SetName )( + ID3D12GraphicsCommandList3 * This, + _In_z_ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + ID3D12GraphicsCommandList3 * This, + REFIID riid, + _COM_Outptr_opt_ void **ppvDevice); + + D3D12_COMMAND_LIST_TYPE ( STDMETHODCALLTYPE *GetType )( + ID3D12GraphicsCommandList3 * This); + + HRESULT ( STDMETHODCALLTYPE *Close )( + ID3D12GraphicsCommandList3 * This); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + ID3D12GraphicsCommandList3 * This, + _In_ ID3D12CommandAllocator *pAllocator, + _In_opt_ ID3D12PipelineState *pInitialState); + + void ( STDMETHODCALLTYPE *ClearState )( + ID3D12GraphicsCommandList3 * This, + _In_opt_ ID3D12PipelineState *pPipelineState); + + void ( STDMETHODCALLTYPE *DrawInstanced )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT VertexCountPerInstance, + _In_ UINT InstanceCount, + _In_ UINT StartVertexLocation, + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *DrawIndexedInstanced )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT IndexCountPerInstance, + _In_ UINT InstanceCount, + _In_ UINT StartIndexLocation, + _In_ INT BaseVertexLocation, + _In_ UINT StartInstanceLocation); + + void ( STDMETHODCALLTYPE *Dispatch )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT ThreadGroupCountX, + _In_ UINT ThreadGroupCountY, + _In_ UINT ThreadGroupCountZ); + + void ( STDMETHODCALLTYPE *CopyBufferRegion )( + ID3D12GraphicsCommandList3 * This, + _In_ ID3D12Resource *pDstBuffer, + UINT64 DstOffset, + _In_ ID3D12Resource *pSrcBuffer, + UINT64 SrcOffset, + UINT64 NumBytes); + + void ( STDMETHODCALLTYPE *CopyTextureRegion )( + ID3D12GraphicsCommandList3 * This, + _In_ const D3D12_TEXTURE_COPY_LOCATION *pDst, + UINT DstX, + UINT DstY, + UINT DstZ, + _In_ const D3D12_TEXTURE_COPY_LOCATION *pSrc, + _In_opt_ const D3D12_BOX *pSrcBox); + + void ( STDMETHODCALLTYPE *CopyResource )( + ID3D12GraphicsCommandList3 * This, + _In_ ID3D12Resource *pDstResource, + _In_ ID3D12Resource *pSrcResource); + + void ( STDMETHODCALLTYPE *CopyTiles )( + ID3D12GraphicsCommandList3 * This, + _In_ ID3D12Resource *pTiledResource, + _In_ const D3D12_TILED_RESOURCE_COORDINATE *pTileRegionStartCoordinate, + _In_ const D3D12_TILE_REGION_SIZE *pTileRegionSize, + _In_ ID3D12Resource *pBuffer, + UINT64 BufferStartOffsetInBytes, + D3D12_TILE_COPY_FLAGS Flags); + + void ( STDMETHODCALLTYPE *ResolveSubresource )( + ID3D12GraphicsCommandList3 * This, + _In_ ID3D12Resource *pDstResource, + _In_ UINT DstSubresource, + _In_ ID3D12Resource *pSrcResource, + _In_ UINT SrcSubresource, + _In_ DXGI_FORMAT Format); + + void ( STDMETHODCALLTYPE *IASetPrimitiveTopology )( + ID3D12GraphicsCommandList3 * This, + _In_ D3D12_PRIMITIVE_TOPOLOGY PrimitiveTopology); + + void ( STDMETHODCALLTYPE *RSSetViewports )( + ID3D12GraphicsCommandList3 * This, + _In_range_(0, D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumViewports, + _In_reads_( NumViewports) const D3D12_VIEWPORT *pViewports); + + void ( STDMETHODCALLTYPE *RSSetScissorRects )( + ID3D12GraphicsCommandList3 * This, + _In_range_(0, D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumRects, + _In_reads_( NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *OMSetBlendFactor )( + ID3D12GraphicsCommandList3 * This, + _In_reads_opt_(4) const FLOAT BlendFactor[ 4 ]); + + void ( STDMETHODCALLTYPE *OMSetStencilRef )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT StencilRef); + + void ( STDMETHODCALLTYPE *SetPipelineState )( + ID3D12GraphicsCommandList3 * This, + _In_ ID3D12PipelineState *pPipelineState); + + void ( STDMETHODCALLTYPE *ResourceBarrier )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT NumBarriers, + _In_reads_(NumBarriers) const D3D12_RESOURCE_BARRIER *pBarriers); + + void ( STDMETHODCALLTYPE *ExecuteBundle )( + ID3D12GraphicsCommandList3 * This, + _In_ ID3D12GraphicsCommandList *pCommandList); + + void ( STDMETHODCALLTYPE *SetDescriptorHeaps )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT NumDescriptorHeaps, + _In_reads_(NumDescriptorHeaps) ID3D12DescriptorHeap *const *ppDescriptorHeaps); + + void ( STDMETHODCALLTYPE *SetComputeRootSignature )( + ID3D12GraphicsCommandList3 * This, + _In_opt_ ID3D12RootSignature *pRootSignature); + + void ( STDMETHODCALLTYPE *SetGraphicsRootSignature )( + ID3D12GraphicsCommandList3 * This, + _In_opt_ ID3D12RootSignature *pRootSignature); + + void ( STDMETHODCALLTYPE *SetComputeRootDescriptorTable )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor); + + void ( STDMETHODCALLTYPE *SetGraphicsRootDescriptorTable )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor); + + void ( STDMETHODCALLTYPE *SetComputeRoot32BitConstant )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT RootParameterIndex, + _In_ UINT SrcData, + _In_ UINT DestOffsetIn32BitValues); + + void ( STDMETHODCALLTYPE *SetGraphicsRoot32BitConstant )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT RootParameterIndex, + _In_ UINT SrcData, + _In_ UINT DestOffsetIn32BitValues); + + void ( STDMETHODCALLTYPE *SetComputeRoot32BitConstants )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT RootParameterIndex, + _In_ UINT Num32BitValuesToSet, + _In_reads_(Num32BitValuesToSet*sizeof(UINT)) const void *pSrcData, + _In_ UINT DestOffsetIn32BitValues); + + void ( STDMETHODCALLTYPE *SetGraphicsRoot32BitConstants )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT RootParameterIndex, + _In_ UINT Num32BitValuesToSet, + _In_reads_(Num32BitValuesToSet*sizeof(UINT)) const void *pSrcData, + _In_ UINT DestOffsetIn32BitValues); + + void ( STDMETHODCALLTYPE *SetComputeRootConstantBufferView )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetGraphicsRootConstantBufferView )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetComputeRootShaderResourceView )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetGraphicsRootShaderResourceView )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetComputeRootUnorderedAccessView )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *SetGraphicsRootUnorderedAccessView )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT RootParameterIndex, + _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); + + void ( STDMETHODCALLTYPE *IASetIndexBuffer )( + ID3D12GraphicsCommandList3 * This, + _In_opt_ const D3D12_INDEX_BUFFER_VIEW *pView); + + void ( STDMETHODCALLTYPE *IASetVertexBuffers )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT StartSlot, + _In_ UINT NumViews, + _In_reads_opt_(NumViews) const D3D12_VERTEX_BUFFER_VIEW *pViews); + + void ( STDMETHODCALLTYPE *SOSetTargets )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT StartSlot, + _In_ UINT NumViews, + _In_reads_opt_(NumViews) const D3D12_STREAM_OUTPUT_BUFFER_VIEW *pViews); + + void ( STDMETHODCALLTYPE *OMSetRenderTargets )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT NumRenderTargetDescriptors, + _In_opt_ const D3D12_CPU_DESCRIPTOR_HANDLE *pRenderTargetDescriptors, + _In_ BOOL RTsSingleHandleToDescriptorRange, + _In_opt_ const D3D12_CPU_DESCRIPTOR_HANDLE *pDepthStencilDescriptor); + + void ( STDMETHODCALLTYPE *ClearDepthStencilView )( + ID3D12GraphicsCommandList3 * This, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE DepthStencilView, + _In_ D3D12_CLEAR_FLAGS ClearFlags, + _In_ FLOAT Depth, + _In_ UINT8 Stencil, + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *ClearRenderTargetView )( + ID3D12GraphicsCommandList3 * This, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE RenderTargetView, + _In_ const FLOAT ColorRGBA[ 4 ], + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewUint )( + ID3D12GraphicsCommandList3 * This, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, + _In_ ID3D12Resource *pResource, + _In_ const UINT Values[ 4 ], + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewFloat )( + ID3D12GraphicsCommandList3 * This, + _In_ D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, + _In_ D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, + _In_ ID3D12Resource *pResource, + _In_ const FLOAT Values[ 4 ], + _In_ UINT NumRects, + _In_reads_(NumRects) const D3D12_RECT *pRects); + + void ( STDMETHODCALLTYPE *DiscardResource )( + ID3D12GraphicsCommandList3 * This, + _In_ ID3D12Resource *pResource, + _In_opt_ const D3D12_DISCARD_REGION *pRegion); + + void ( STDMETHODCALLTYPE *BeginQuery )( + ID3D12GraphicsCommandList3 * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index); + + void ( STDMETHODCALLTYPE *EndQuery )( + ID3D12GraphicsCommandList3 * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT Index); + + void ( STDMETHODCALLTYPE *ResolveQueryData )( + ID3D12GraphicsCommandList3 * This, + _In_ ID3D12QueryHeap *pQueryHeap, + _In_ D3D12_QUERY_TYPE Type, + _In_ UINT StartIndex, + _In_ UINT NumQueries, + _In_ ID3D12Resource *pDestinationBuffer, + _In_ UINT64 AlignedDestinationBufferOffset); + + void ( STDMETHODCALLTYPE *SetPredication )( + ID3D12GraphicsCommandList3 * This, + _In_opt_ ID3D12Resource *pBuffer, + _In_ UINT64 AlignedBufferOffset, + _In_ D3D12_PREDICATION_OP Operation); + + void ( STDMETHODCALLTYPE *SetMarker )( + ID3D12GraphicsCommandList3 * This, + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size); + + void ( STDMETHODCALLTYPE *BeginEvent )( + ID3D12GraphicsCommandList3 * This, + UINT Metadata, + _In_reads_bytes_opt_(Size) const void *pData, + UINT Size); + + void ( STDMETHODCALLTYPE *EndEvent )( + ID3D12GraphicsCommandList3 * This); + + void ( STDMETHODCALLTYPE *ExecuteIndirect )( + ID3D12GraphicsCommandList3 * This, + _In_ ID3D12CommandSignature *pCommandSignature, + _In_ UINT MaxCommandCount, + _In_ ID3D12Resource *pArgumentBuffer, + _In_ UINT64 ArgumentBufferOffset, + _In_opt_ ID3D12Resource *pCountBuffer, + _In_ UINT64 CountBufferOffset); + + void ( STDMETHODCALLTYPE *AtomicCopyBufferUINT )( + ID3D12GraphicsCommandList3 * This, + _In_ ID3D12Resource *pDstBuffer, + UINT64 DstOffset, + _In_ ID3D12Resource *pSrcBuffer, + UINT64 SrcOffset, + UINT Dependencies, + _In_reads_(Dependencies) ID3D12Resource *const *ppDependentResources, + _In_reads_(Dependencies) const D3D12_SUBRESOURCE_RANGE_UINT64 *pDependentSubresourceRanges); + + void ( STDMETHODCALLTYPE *AtomicCopyBufferUINT64 )( + ID3D12GraphicsCommandList3 * This, + _In_ ID3D12Resource *pDstBuffer, + UINT64 DstOffset, + _In_ ID3D12Resource *pSrcBuffer, + UINT64 SrcOffset, + UINT Dependencies, + _In_reads_(Dependencies) ID3D12Resource *const *ppDependentResources, + _In_reads_(Dependencies) const D3D12_SUBRESOURCE_RANGE_UINT64 *pDependentSubresourceRanges); + + void ( STDMETHODCALLTYPE *OMSetDepthBounds )( + ID3D12GraphicsCommandList3 * This, + _In_ FLOAT Min, + _In_ FLOAT Max); + + void ( STDMETHODCALLTYPE *SetSamplePositions )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT NumSamplesPerPixel, + _In_ UINT NumPixels, + _In_reads_(NumSamplesPerPixel*NumPixels) D3D12_SAMPLE_POSITION *pSamplePositions); + + void ( STDMETHODCALLTYPE *ResolveSubresourceRegion )( + ID3D12GraphicsCommandList3 * This, + _In_ ID3D12Resource *pDstResource, + _In_ UINT DstSubresource, + _In_ UINT DstX, + _In_ UINT DstY, + _In_ ID3D12Resource *pSrcResource, + _In_ UINT SrcSubresource, + _In_opt_ D3D12_RECT *pSrcRect, + _In_ DXGI_FORMAT Format, + _In_ D3D12_RESOLVE_MODE ResolveMode); + + void ( STDMETHODCALLTYPE *SetViewInstanceMask )( + ID3D12GraphicsCommandList3 * This, + _In_ UINT Mask); + + void ( STDMETHODCALLTYPE *WriteBufferImmediate )( + ID3D12GraphicsCommandList3 * This, + UINT Count, + _In_reads_(Count) const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams, + _In_reads_opt_(Count) const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes); + + void ( STDMETHODCALLTYPE *SetProtectedResourceSession )( + ID3D12GraphicsCommandList3 * This, + _In_opt_ ID3D12ProtectedResourceSession *pProtectedResourceSession); + + END_INTERFACE + } ID3D12GraphicsCommandList3Vtbl; + + interface ID3D12GraphicsCommandList3 + { + CONST_VTBL struct ID3D12GraphicsCommandList3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12GraphicsCommandList3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12GraphicsCommandList3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12GraphicsCommandList3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12GraphicsCommandList3_GetPrivateData(This,guid,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) + +#define ID3D12GraphicsCommandList3_SetPrivateData(This,guid,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) + +#define ID3D12GraphicsCommandList3_SetPrivateDataInterface(This,guid,pData) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) + +#define ID3D12GraphicsCommandList3_SetName(This,Name) \ + ( (This)->lpVtbl -> SetName(This,Name) ) + + +#define ID3D12GraphicsCommandList3_GetDevice(This,riid,ppvDevice) \ + ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) + + +#define ID3D12GraphicsCommandList3_GetType(This) \ + ( (This)->lpVtbl -> GetType(This) ) + + +#define ID3D12GraphicsCommandList3_Close(This) \ + ( (This)->lpVtbl -> Close(This) ) + +#define ID3D12GraphicsCommandList3_Reset(This,pAllocator,pInitialState) \ + ( (This)->lpVtbl -> Reset(This,pAllocator,pInitialState) ) + +#define ID3D12GraphicsCommandList3_ClearState(This,pPipelineState) \ + ( (This)->lpVtbl -> ClearState(This,pPipelineState) ) + +#define ID3D12GraphicsCommandList3_DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) ) + +#define ID3D12GraphicsCommandList3_DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) \ + ( (This)->lpVtbl -> DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) ) + +#define ID3D12GraphicsCommandList3_Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) \ + ( (This)->lpVtbl -> Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) ) + +#define ID3D12GraphicsCommandList3_CopyBufferRegion(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,NumBytes) \ + ( (This)->lpVtbl -> CopyBufferRegion(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,NumBytes) ) + +#define ID3D12GraphicsCommandList3_CopyTextureRegion(This,pDst,DstX,DstY,DstZ,pSrc,pSrcBox) \ + ( (This)->lpVtbl -> CopyTextureRegion(This,pDst,DstX,DstY,DstZ,pSrc,pSrcBox) ) + +#define ID3D12GraphicsCommandList3_CopyResource(This,pDstResource,pSrcResource) \ + ( (This)->lpVtbl -> CopyResource(This,pDstResource,pSrcResource) ) + +#define ID3D12GraphicsCommandList3_CopyTiles(This,pTiledResource,pTileRegionStartCoordinate,pTileRegionSize,pBuffer,BufferStartOffsetInBytes,Flags) \ + ( (This)->lpVtbl -> CopyTiles(This,pTiledResource,pTileRegionStartCoordinate,pTileRegionSize,pBuffer,BufferStartOffsetInBytes,Flags) ) + +#define ID3D12GraphicsCommandList3_ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) \ + ( (This)->lpVtbl -> ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) ) + +#define ID3D12GraphicsCommandList3_IASetPrimitiveTopology(This,PrimitiveTopology) \ + ( (This)->lpVtbl -> IASetPrimitiveTopology(This,PrimitiveTopology) ) + +#define ID3D12GraphicsCommandList3_RSSetViewports(This,NumViewports,pViewports) \ + ( (This)->lpVtbl -> RSSetViewports(This,NumViewports,pViewports) ) + +#define ID3D12GraphicsCommandList3_RSSetScissorRects(This,NumRects,pRects) \ + ( (This)->lpVtbl -> RSSetScissorRects(This,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList3_OMSetBlendFactor(This,BlendFactor) \ + ( (This)->lpVtbl -> OMSetBlendFactor(This,BlendFactor) ) + +#define ID3D12GraphicsCommandList3_OMSetStencilRef(This,StencilRef) \ + ( (This)->lpVtbl -> OMSetStencilRef(This,StencilRef) ) + +#define ID3D12GraphicsCommandList3_SetPipelineState(This,pPipelineState) \ + ( (This)->lpVtbl -> SetPipelineState(This,pPipelineState) ) + +#define ID3D12GraphicsCommandList3_ResourceBarrier(This,NumBarriers,pBarriers) \ + ( (This)->lpVtbl -> ResourceBarrier(This,NumBarriers,pBarriers) ) + +#define ID3D12GraphicsCommandList3_ExecuteBundle(This,pCommandList) \ + ( (This)->lpVtbl -> ExecuteBundle(This,pCommandList) ) + +#define ID3D12GraphicsCommandList3_SetDescriptorHeaps(This,NumDescriptorHeaps,ppDescriptorHeaps) \ + ( (This)->lpVtbl -> SetDescriptorHeaps(This,NumDescriptorHeaps,ppDescriptorHeaps) ) + +#define ID3D12GraphicsCommandList3_SetComputeRootSignature(This,pRootSignature) \ + ( (This)->lpVtbl -> SetComputeRootSignature(This,pRootSignature) ) + +#define ID3D12GraphicsCommandList3_SetGraphicsRootSignature(This,pRootSignature) \ + ( (This)->lpVtbl -> SetGraphicsRootSignature(This,pRootSignature) ) + +#define ID3D12GraphicsCommandList3_SetComputeRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) \ + ( (This)->lpVtbl -> SetComputeRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) ) + +#define ID3D12GraphicsCommandList3_SetGraphicsRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) \ + ( (This)->lpVtbl -> SetGraphicsRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) ) + +#define ID3D12GraphicsCommandList3_SetComputeRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) \ + ( (This)->lpVtbl -> SetComputeRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) ) + +#define ID3D12GraphicsCommandList3_SetGraphicsRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) \ + ( (This)->lpVtbl -> SetGraphicsRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) ) + +#define ID3D12GraphicsCommandList3_SetComputeRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) \ + ( (This)->lpVtbl -> SetComputeRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) ) + +#define ID3D12GraphicsCommandList3_SetGraphicsRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) \ + ( (This)->lpVtbl -> SetGraphicsRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) ) + +#define ID3D12GraphicsCommandList3_SetComputeRootConstantBufferView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetComputeRootConstantBufferView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList3_SetGraphicsRootConstantBufferView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetGraphicsRootConstantBufferView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList3_SetComputeRootShaderResourceView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetComputeRootShaderResourceView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList3_SetGraphicsRootShaderResourceView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetGraphicsRootShaderResourceView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList3_SetComputeRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetComputeRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList3_SetGraphicsRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) \ + ( (This)->lpVtbl -> SetGraphicsRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) ) + +#define ID3D12GraphicsCommandList3_IASetIndexBuffer(This,pView) \ + ( (This)->lpVtbl -> IASetIndexBuffer(This,pView) ) + +#define ID3D12GraphicsCommandList3_IASetVertexBuffers(This,StartSlot,NumViews,pViews) \ + ( (This)->lpVtbl -> IASetVertexBuffers(This,StartSlot,NumViews,pViews) ) + +#define ID3D12GraphicsCommandList3_SOSetTargets(This,StartSlot,NumViews,pViews) \ + ( (This)->lpVtbl -> SOSetTargets(This,StartSlot,NumViews,pViews) ) + +#define ID3D12GraphicsCommandList3_OMSetRenderTargets(This,NumRenderTargetDescriptors,pRenderTargetDescriptors,RTsSingleHandleToDescriptorRange,pDepthStencilDescriptor) \ + ( (This)->lpVtbl -> OMSetRenderTargets(This,NumRenderTargetDescriptors,pRenderTargetDescriptors,RTsSingleHandleToDescriptorRange,pDepthStencilDescriptor) ) + +#define ID3D12GraphicsCommandList3_ClearDepthStencilView(This,DepthStencilView,ClearFlags,Depth,Stencil,NumRects,pRects) \ + ( (This)->lpVtbl -> ClearDepthStencilView(This,DepthStencilView,ClearFlags,Depth,Stencil,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList3_ClearRenderTargetView(This,RenderTargetView,ColorRGBA,NumRects,pRects) \ + ( (This)->lpVtbl -> ClearRenderTargetView(This,RenderTargetView,ColorRGBA,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList3_ClearUnorderedAccessViewUint(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewUint(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList3_ClearUnorderedAccessViewFloat(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) \ + ( (This)->lpVtbl -> ClearUnorderedAccessViewFloat(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) ) + +#define ID3D12GraphicsCommandList3_DiscardResource(This,pResource,pRegion) \ + ( (This)->lpVtbl -> DiscardResource(This,pResource,pRegion) ) + +#define ID3D12GraphicsCommandList3_BeginQuery(This,pQueryHeap,Type,Index) \ + ( (This)->lpVtbl -> BeginQuery(This,pQueryHeap,Type,Index) ) + +#define ID3D12GraphicsCommandList3_EndQuery(This,pQueryHeap,Type,Index) \ + ( (This)->lpVtbl -> EndQuery(This,pQueryHeap,Type,Index) ) + +#define ID3D12GraphicsCommandList3_ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) \ + ( (This)->lpVtbl -> ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) ) + +#define ID3D12GraphicsCommandList3_SetPredication(This,pBuffer,AlignedBufferOffset,Operation) \ + ( (This)->lpVtbl -> SetPredication(This,pBuffer,AlignedBufferOffset,Operation) ) + +#define ID3D12GraphicsCommandList3_SetMarker(This,Metadata,pData,Size) \ + ( (This)->lpVtbl -> SetMarker(This,Metadata,pData,Size) ) + +#define ID3D12GraphicsCommandList3_BeginEvent(This,Metadata,pData,Size) \ + ( (This)->lpVtbl -> BeginEvent(This,Metadata,pData,Size) ) + +#define ID3D12GraphicsCommandList3_EndEvent(This) \ + ( (This)->lpVtbl -> EndEvent(This) ) + +#define ID3D12GraphicsCommandList3_ExecuteIndirect(This,pCommandSignature,MaxCommandCount,pArgumentBuffer,ArgumentBufferOffset,pCountBuffer,CountBufferOffset) \ + ( (This)->lpVtbl -> ExecuteIndirect(This,pCommandSignature,MaxCommandCount,pArgumentBuffer,ArgumentBufferOffset,pCountBuffer,CountBufferOffset) ) + + +#define ID3D12GraphicsCommandList3_AtomicCopyBufferUINT(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) \ + ( (This)->lpVtbl -> AtomicCopyBufferUINT(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) ) + +#define ID3D12GraphicsCommandList3_AtomicCopyBufferUINT64(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) \ + ( (This)->lpVtbl -> AtomicCopyBufferUINT64(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) ) + +#define ID3D12GraphicsCommandList3_OMSetDepthBounds(This,Min,Max) \ + ( (This)->lpVtbl -> OMSetDepthBounds(This,Min,Max) ) + +#define ID3D12GraphicsCommandList3_SetSamplePositions(This,NumSamplesPerPixel,NumPixels,pSamplePositions) \ + ( (This)->lpVtbl -> SetSamplePositions(This,NumSamplesPerPixel,NumPixels,pSamplePositions) ) + +#define ID3D12GraphicsCommandList3_ResolveSubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,pSrcResource,SrcSubresource,pSrcRect,Format,ResolveMode) \ + ( (This)->lpVtbl -> ResolveSubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,pSrcResource,SrcSubresource,pSrcRect,Format,ResolveMode) ) + +#define ID3D12GraphicsCommandList3_SetViewInstanceMask(This,Mask) \ + ( (This)->lpVtbl -> SetViewInstanceMask(This,Mask) ) + + +#define ID3D12GraphicsCommandList3_WriteBufferImmediate(This,Count,pParams,pModes) \ + ( (This)->lpVtbl -> WriteBufferImmediate(This,Count,pParams,pModes) ) + + +#define ID3D12GraphicsCommandList3_SetProtectedResourceSession(This,pProtectedResourceSession) \ + ( (This)->lpVtbl -> SetProtectedResourceSession(This,pProtectedResourceSession) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12GraphicsCommandList3_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12_0000_0038 */ +/* [local] */ + +typedef +enum D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE + { + D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_DISCARD = 0, + D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE = ( D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_DISCARD + 1 ) , + D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR = ( D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE + 1 ) , + D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_NO_ACCESS = ( D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR + 1 ) + } D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE; + +typedef struct D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS + { + D3D12_CLEAR_VALUE ClearValue; + } D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS; + +typedef struct D3D12_RENDER_PASS_BEGINNING_ACCESS + { + D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE Type; + union + { + D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS Clear; + } ; + } D3D12_RENDER_PASS_BEGINNING_ACCESS; + +typedef +enum D3D12_RENDER_PASS_ENDING_ACCESS_TYPE + { + D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_DISCARD = 0, + D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE = ( D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_DISCARD + 1 ) , + D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_RESOLVE = ( D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE + 1 ) , + D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS = ( D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_RESOLVE + 1 ) + } D3D12_RENDER_PASS_ENDING_ACCESS_TYPE; + +typedef struct D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_SUBRESOURCE_PARAMETERS + { + UINT SrcSubresource; + UINT DstSubresource; + UINT DstX; + UINT DstY; + D3D12_RECT SrcRect; + } D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_SUBRESOURCE_PARAMETERS; + +typedef struct D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS + { + ID3D12Resource *pSrcResource; + ID3D12Resource *pDstResource; + UINT SubresourceCount; + _Field_size_full_(SubresourceCount) const D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_SUBRESOURCE_PARAMETERS *pSubresourceParameters; + DXGI_FORMAT Format; + D3D12_RESOLVE_MODE ResolveMode; + BOOL PreserveResolveSource; + } D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS; + +typedef struct D3D12_RENDER_PASS_ENDING_ACCESS + { + D3D12_RENDER_PASS_ENDING_ACCESS_TYPE Type; + union + { + D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS Resolve; + } ; + } D3D12_RENDER_PASS_ENDING_ACCESS; + +typedef struct D3D12_RENDER_PASS_RENDER_TARGET_DESC + { + D3D12_CPU_DESCRIPTOR_HANDLE cpuDescriptor; + D3D12_RENDER_PASS_BEGINNING_ACCESS BeginningAccess; + D3D12_RENDER_PASS_ENDING_ACCESS EndingAccess; + } D3D12_RENDER_PASS_RENDER_TARGET_DESC; + +typedef struct D3D12_RENDER_PASS_DEPTH_STENCIL_DESC + { + D3D12_CPU_DESCRIPTOR_HANDLE cpuDescriptor; + D3D12_RENDER_PASS_BEGINNING_ACCESS DepthBeginningAccess; + D3D12_RENDER_PASS_BEGINNING_ACCESS StencilBeginningAccess; + D3D12_RENDER_PASS_ENDING_ACCESS DepthEndingAccess; + D3D12_RENDER_PASS_ENDING_ACCESS StencilEndingAccess; + } D3D12_RENDER_PASS_DEPTH_STENCIL_DESC; + +typedef +enum D3D12_RENDER_PASS_FLAGS + { + D3D12_RENDER_PASS_FLAG_NONE = 0, + D3D12_RENDER_PASS_FLAG_ALLOW_UAV_WRITES = 0x1, + D3D12_RENDER_PASS_FLAG_SUSPENDING_PASS = 0x2, + D3D12_RENDER_PASS_FLAG_RESUMING_PASS = 0x4 + } D3D12_RENDER_PASS_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS( D3D12_RENDER_PASS_FLAGS ); + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0038_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0038_v0_0_s_ifspec; + +#ifndef __ID3D12MetaCommand_INTERFACE_DEFINED__ +#define __ID3D12MetaCommand_INTERFACE_DEFINED__ + +/* interface ID3D12MetaCommand */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12MetaCommand; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("DBB84C27-36CE-4FC9-B801-F048C46AC570") + ID3D12MetaCommand : public ID3D12Pageable + { + public: + virtual UINT64 STDMETHODCALLTYPE GetRequiredParameterResourceSize( + _In_ D3D12_META_COMMAND_PARAMETER_STAGE Stage, + _In_ UINT ParameterIndex) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12MetaCommandVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12MetaCommand * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12MetaCommand * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12MetaCommand * This); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + ID3D12MetaCommand * This, + _In_ REFGUID guid, + _Inout_ UINT *pDataSize, + _Out_writes_bytes_opt_( *pDataSize ) void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + ID3D12MetaCommand * This, + _In_ REFGUID guid, + _In_ UINT DataSize, + _In_reads_bytes_opt_( DataSize ) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + ID3D12MetaCommand * This, + _In_ REFGUID guid, + _In_opt_ const IUnknown *pData); HRESULT ( STDMETHODCALLTYPE *SetName )( - ID3D12Heap1 * This, + ID3D12MetaCommand * This, _In_z_ LPCWSTR Name); HRESULT ( STDMETHODCALLTYPE *GetDevice )( - ID3D12Heap1 * This, + ID3D12MetaCommand * This, REFIID riid, _COM_Outptr_opt_ void **ppvDevice); - D3D12_HEAP_DESC ( STDMETHODCALLTYPE *GetDesc )( - ID3D12Heap1 * This); - - HRESULT ( STDMETHODCALLTYPE *GetProtectedResourceSession )( - ID3D12Heap1 * This, - REFIID riid, - _COM_Outptr_opt_ void **ppProtectedSession); + UINT64 ( STDMETHODCALLTYPE *GetRequiredParameterResourceSize )( + ID3D12MetaCommand * This, + _In_ D3D12_META_COMMAND_PARAMETER_STAGE Stage, + _In_ UINT ParameterIndex); END_INTERFACE - } ID3D12Heap1Vtbl; + } ID3D12MetaCommandVtbl; - interface ID3D12Heap1 + interface ID3D12MetaCommand { - CONST_VTBL struct ID3D12Heap1Vtbl *lpVtbl; + CONST_VTBL struct ID3D12MetaCommandVtbl *lpVtbl; }; @@ -11433,40 +14295,36 @@ EXTERN_C const IID IID_ID3D12Heap1; #ifdef COBJMACROS -#define ID3D12Heap1_QueryInterface(This,riid,ppvObject) \ +#define ID3D12MetaCommand_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ID3D12Heap1_AddRef(This) \ +#define ID3D12MetaCommand_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) -#define ID3D12Heap1_Release(This) \ +#define ID3D12MetaCommand_Release(This) \ ( (This)->lpVtbl -> Release(This) ) -#define ID3D12Heap1_GetPrivateData(This,guid,pDataSize,pData) \ +#define ID3D12MetaCommand_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) -#define ID3D12Heap1_SetPrivateData(This,guid,DataSize,pData) \ +#define ID3D12MetaCommand_SetPrivateData(This,guid,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) -#define ID3D12Heap1_SetPrivateDataInterface(This,guid,pData) \ +#define ID3D12MetaCommand_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) -#define ID3D12Heap1_SetName(This,Name) \ +#define ID3D12MetaCommand_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) -#define ID3D12Heap1_GetDevice(This,riid,ppvDevice) \ +#define ID3D12MetaCommand_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) -#define ID3D12Heap1_GetDesc(This) \ - ( (This)->lpVtbl -> GetDesc(This) ) - - -#define ID3D12Heap1_GetProtectedResourceSession(This,riid,ppProtectedSession) \ - ( (This)->lpVtbl -> GetProtectedResourceSession(This,riid,ppProtectedSession) ) +#define ID3D12MetaCommand_GetRequiredParameterResourceSize(This,Stage,ParameterIndex) \ + ( (This)->lpVtbl -> GetRequiredParameterResourceSize(This,Stage,ParameterIndex) ) #endif /* COBJMACROS */ @@ -11476,97 +14334,152 @@ EXTERN_C const IID IID_ID3D12Heap1; -#endif /* __ID3D12Heap1_INTERFACE_DEFINED__ */ +#endif /* __ID3D12MetaCommand_INTERFACE_DEFINED__ */ -#ifndef __ID3D12GraphicsCommandList3_INTERFACE_DEFINED__ -#define __ID3D12GraphicsCommandList3_INTERFACE_DEFINED__ +/* interface __MIDL_itf_d3d12_0000_0039 */ +/* [local] */ -/* interface ID3D12GraphicsCommandList3 */ +typedef struct D3D12_DISPATCH_RAYS_DESC + { + D3D12_GPU_VIRTUAL_ADDRESS_RANGE RayGenerationShaderRecord; + D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE MissShaderTable; + D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE HitGroupTable; + D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE CallableShaderTable; + UINT Width; + UINT Height; + UINT Depth; + } D3D12_DISPATCH_RAYS_DESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0039_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0039_v0_0_s_ifspec; + +#ifndef __ID3D12GraphicsCommandList4_INTERFACE_DEFINED__ +#define __ID3D12GraphicsCommandList4_INTERFACE_DEFINED__ + +/* interface ID3D12GraphicsCommandList4 */ /* [unique][local][object][uuid] */ -EXTERN_C const IID IID_ID3D12GraphicsCommandList3; +EXTERN_C const IID IID_ID3D12GraphicsCommandList4; #if defined(__cplusplus) && !defined(CINTERFACE) - MIDL_INTERFACE("6FDA83A7-B84C-4E38-9AC8-C7BD22016B3D") - ID3D12GraphicsCommandList3 : public ID3D12GraphicsCommandList2 + MIDL_INTERFACE("8754318e-d3a9-4541-98cf-645b50dc4874") + ID3D12GraphicsCommandList4 : public ID3D12GraphicsCommandList3 { public: - virtual void STDMETHODCALLTYPE SetProtectedResourceSession( - _In_opt_ ID3D12ProtectedResourceSession *pProtectedResourceSession) = 0; + virtual void STDMETHODCALLTYPE BeginRenderPass( + _In_ UINT NumRenderTargets, + _In_reads_opt_(NumRenderTargets) const D3D12_RENDER_PASS_RENDER_TARGET_DESC *pRenderTargets, + _In_opt_ const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC *pDepthStencil, + D3D12_RENDER_PASS_FLAGS Flags) = 0; + + virtual void STDMETHODCALLTYPE EndRenderPass( void) = 0; + + virtual void STDMETHODCALLTYPE InitializeMetaCommand( + _In_ ID3D12MetaCommand *pMetaCommand, + _In_reads_bytes_opt_(InitializationParametersDataSizeInBytes) const void *pInitializationParametersData, + _In_ SIZE_T InitializationParametersDataSizeInBytes) = 0; + + virtual void STDMETHODCALLTYPE ExecuteMetaCommand( + _In_ ID3D12MetaCommand *pMetaCommand, + _In_reads_bytes_opt_(ExecutionParametersDataSizeInBytes) const void *pExecutionParametersData, + _In_ SIZE_T ExecutionParametersDataSizeInBytes) = 0; + + virtual void STDMETHODCALLTYPE BuildRaytracingAccelerationStructure( + _In_ const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC *pDesc, + _In_ UINT NumPostbuildInfoDescs, + _In_reads_opt_(NumPostbuildInfoDescs) const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC *pPostbuildInfoDescs) = 0; + + virtual void STDMETHODCALLTYPE EmitRaytracingAccelerationStructurePostbuildInfo( + _In_ const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC *pDesc, + _In_ UINT NumSourceAccelerationStructures, + _In_reads_( NumSourceAccelerationStructures ) const D3D12_GPU_VIRTUAL_ADDRESS *pSourceAccelerationStructureData) = 0; + + virtual void STDMETHODCALLTYPE CopyRaytracingAccelerationStructure( + _In_ D3D12_GPU_VIRTUAL_ADDRESS DestAccelerationStructureData, + _In_ D3D12_GPU_VIRTUAL_ADDRESS SourceAccelerationStructureData, + _In_ D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE Mode) = 0; + + virtual void STDMETHODCALLTYPE SetPipelineState1( + _In_ ID3D12StateObject *pStateObject) = 0; + + virtual void STDMETHODCALLTYPE DispatchRays( + _In_ const D3D12_DISPATCH_RAYS_DESC *pDesc) = 0; }; #else /* C style interface */ - typedef struct ID3D12GraphicsCommandList3Vtbl + typedef struct ID3D12GraphicsCommandList4Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, REFIID riid, _COM_Outptr_ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( - ID3D12GraphicsCommandList3 * This); + ID3D12GraphicsCommandList4 * This); ULONG ( STDMETHODCALLTYPE *Release )( - ID3D12GraphicsCommandList3 * This); + ID3D12GraphicsCommandList4 * This); HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ REFGUID guid, _Inout_ UINT *pDataSize, _Out_writes_bytes_opt_( *pDataSize ) void *pData); HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ REFGUID guid, _In_ UINT DataSize, _In_reads_bytes_opt_( DataSize ) const void *pData); HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ REFGUID guid, _In_opt_ const IUnknown *pData); HRESULT ( STDMETHODCALLTYPE *SetName )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_z_ LPCWSTR Name); HRESULT ( STDMETHODCALLTYPE *GetDevice )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, REFIID riid, _COM_Outptr_opt_ void **ppvDevice); D3D12_COMMAND_LIST_TYPE ( STDMETHODCALLTYPE *GetType )( - ID3D12GraphicsCommandList3 * This); + ID3D12GraphicsCommandList4 * This); HRESULT ( STDMETHODCALLTYPE *Close )( - ID3D12GraphicsCommandList3 * This); + ID3D12GraphicsCommandList4 * This); HRESULT ( STDMETHODCALLTYPE *Reset )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ ID3D12CommandAllocator *pAllocator, _In_opt_ ID3D12PipelineState *pInitialState); void ( STDMETHODCALLTYPE *ClearState )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_opt_ ID3D12PipelineState *pPipelineState); void ( STDMETHODCALLTYPE *DrawInstanced )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT VertexCountPerInstance, _In_ UINT InstanceCount, _In_ UINT StartVertexLocation, _In_ UINT StartInstanceLocation); void ( STDMETHODCALLTYPE *DrawIndexedInstanced )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT IndexCountPerInstance, _In_ UINT InstanceCount, _In_ UINT StartIndexLocation, @@ -11574,13 +14487,13 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList3; _In_ UINT StartInstanceLocation); void ( STDMETHODCALLTYPE *Dispatch )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT ThreadGroupCountX, _In_ UINT ThreadGroupCountY, _In_ UINT ThreadGroupCountZ); void ( STDMETHODCALLTYPE *CopyBufferRegion )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ ID3D12Resource *pDstBuffer, UINT64 DstOffset, _In_ ID3D12Resource *pSrcBuffer, @@ -11588,7 +14501,7 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList3; UINT64 NumBytes); void ( STDMETHODCALLTYPE *CopyTextureRegion )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ const D3D12_TEXTURE_COPY_LOCATION *pDst, UINT DstX, UINT DstY, @@ -11597,12 +14510,12 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList3; _In_opt_ const D3D12_BOX *pSrcBox); void ( STDMETHODCALLTYPE *CopyResource )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ ID3D12Resource *pDstResource, _In_ ID3D12Resource *pSrcResource); void ( STDMETHODCALLTYPE *CopyTiles )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ ID3D12Resource *pTiledResource, _In_ const D3D12_TILED_RESOURCE_COORDINATE *pTileRegionStartCoordinate, _In_ const D3D12_TILE_REGION_SIZE *pTileRegionSize, @@ -11611,7 +14524,7 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList3; D3D12_TILE_COPY_FLAGS Flags); void ( STDMETHODCALLTYPE *ResolveSubresource )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ ID3D12Resource *pDstResource, _In_ UINT DstSubresource, _In_ ID3D12Resource *pSrcResource, @@ -11619,144 +14532,144 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList3; _In_ DXGI_FORMAT Format); void ( STDMETHODCALLTYPE *IASetPrimitiveTopology )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ D3D12_PRIMITIVE_TOPOLOGY PrimitiveTopology); void ( STDMETHODCALLTYPE *RSSetViewports )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_range_(0, D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumViewports, _In_reads_( NumViewports) const D3D12_VIEWPORT *pViewports); void ( STDMETHODCALLTYPE *RSSetScissorRects )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_range_(0, D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumRects, _In_reads_( NumRects) const D3D12_RECT *pRects); void ( STDMETHODCALLTYPE *OMSetBlendFactor )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_reads_opt_(4) const FLOAT BlendFactor[ 4 ]); void ( STDMETHODCALLTYPE *OMSetStencilRef )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT StencilRef); void ( STDMETHODCALLTYPE *SetPipelineState )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ ID3D12PipelineState *pPipelineState); void ( STDMETHODCALLTYPE *ResourceBarrier )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT NumBarriers, _In_reads_(NumBarriers) const D3D12_RESOURCE_BARRIER *pBarriers); void ( STDMETHODCALLTYPE *ExecuteBundle )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ ID3D12GraphicsCommandList *pCommandList); void ( STDMETHODCALLTYPE *SetDescriptorHeaps )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT NumDescriptorHeaps, _In_reads_(NumDescriptorHeaps) ID3D12DescriptorHeap *const *ppDescriptorHeaps); void ( STDMETHODCALLTYPE *SetComputeRootSignature )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_opt_ ID3D12RootSignature *pRootSignature); void ( STDMETHODCALLTYPE *SetGraphicsRootSignature )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_opt_ ID3D12RootSignature *pRootSignature); void ( STDMETHODCALLTYPE *SetComputeRootDescriptorTable )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT RootParameterIndex, _In_ D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor); void ( STDMETHODCALLTYPE *SetGraphicsRootDescriptorTable )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT RootParameterIndex, _In_ D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor); void ( STDMETHODCALLTYPE *SetComputeRoot32BitConstant )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT RootParameterIndex, _In_ UINT SrcData, _In_ UINT DestOffsetIn32BitValues); void ( STDMETHODCALLTYPE *SetGraphicsRoot32BitConstant )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT RootParameterIndex, _In_ UINT SrcData, _In_ UINT DestOffsetIn32BitValues); void ( STDMETHODCALLTYPE *SetComputeRoot32BitConstants )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT RootParameterIndex, _In_ UINT Num32BitValuesToSet, _In_reads_(Num32BitValuesToSet*sizeof(UINT)) const void *pSrcData, _In_ UINT DestOffsetIn32BitValues); void ( STDMETHODCALLTYPE *SetGraphicsRoot32BitConstants )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT RootParameterIndex, _In_ UINT Num32BitValuesToSet, _In_reads_(Num32BitValuesToSet*sizeof(UINT)) const void *pSrcData, _In_ UINT DestOffsetIn32BitValues); void ( STDMETHODCALLTYPE *SetComputeRootConstantBufferView )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT RootParameterIndex, _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); void ( STDMETHODCALLTYPE *SetGraphicsRootConstantBufferView )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT RootParameterIndex, _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); void ( STDMETHODCALLTYPE *SetComputeRootShaderResourceView )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT RootParameterIndex, _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); void ( STDMETHODCALLTYPE *SetGraphicsRootShaderResourceView )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT RootParameterIndex, _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); void ( STDMETHODCALLTYPE *SetComputeRootUnorderedAccessView )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT RootParameterIndex, _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); void ( STDMETHODCALLTYPE *SetGraphicsRootUnorderedAccessView )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT RootParameterIndex, _In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); void ( STDMETHODCALLTYPE *IASetIndexBuffer )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_opt_ const D3D12_INDEX_BUFFER_VIEW *pView); void ( STDMETHODCALLTYPE *IASetVertexBuffers )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT StartSlot, _In_ UINT NumViews, _In_reads_opt_(NumViews) const D3D12_VERTEX_BUFFER_VIEW *pViews); void ( STDMETHODCALLTYPE *SOSetTargets )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT StartSlot, _In_ UINT NumViews, _In_reads_opt_(NumViews) const D3D12_STREAM_OUTPUT_BUFFER_VIEW *pViews); void ( STDMETHODCALLTYPE *OMSetRenderTargets )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT NumRenderTargetDescriptors, _In_opt_ const D3D12_CPU_DESCRIPTOR_HANDLE *pRenderTargetDescriptors, _In_ BOOL RTsSingleHandleToDescriptorRange, _In_opt_ const D3D12_CPU_DESCRIPTOR_HANDLE *pDepthStencilDescriptor); void ( STDMETHODCALLTYPE *ClearDepthStencilView )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ D3D12_CPU_DESCRIPTOR_HANDLE DepthStencilView, _In_ D3D12_CLEAR_FLAGS ClearFlags, _In_ FLOAT Depth, @@ -11765,14 +14678,14 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList3; _In_reads_(NumRects) const D3D12_RECT *pRects); void ( STDMETHODCALLTYPE *ClearRenderTargetView )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ D3D12_CPU_DESCRIPTOR_HANDLE RenderTargetView, _In_ const FLOAT ColorRGBA[ 4 ], _In_ UINT NumRects, _In_reads_(NumRects) const D3D12_RECT *pRects); void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewUint )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, _In_ D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, _In_ ID3D12Resource *pResource, @@ -11781,7 +14694,7 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList3; _In_reads_(NumRects) const D3D12_RECT *pRects); void ( STDMETHODCALLTYPE *ClearUnorderedAccessViewFloat )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, _In_ D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, _In_ ID3D12Resource *pResource, @@ -11790,24 +14703,24 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList3; _In_reads_(NumRects) const D3D12_RECT *pRects); void ( STDMETHODCALLTYPE *DiscardResource )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ ID3D12Resource *pResource, _In_opt_ const D3D12_DISCARD_REGION *pRegion); void ( STDMETHODCALLTYPE *BeginQuery )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ ID3D12QueryHeap *pQueryHeap, _In_ D3D12_QUERY_TYPE Type, _In_ UINT Index); void ( STDMETHODCALLTYPE *EndQuery )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ ID3D12QueryHeap *pQueryHeap, _In_ D3D12_QUERY_TYPE Type, _In_ UINT Index); void ( STDMETHODCALLTYPE *ResolveQueryData )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ ID3D12QueryHeap *pQueryHeap, _In_ D3D12_QUERY_TYPE Type, _In_ UINT StartIndex, @@ -11816,28 +14729,28 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList3; _In_ UINT64 AlignedDestinationBufferOffset); void ( STDMETHODCALLTYPE *SetPredication )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_opt_ ID3D12Resource *pBuffer, _In_ UINT64 AlignedBufferOffset, _In_ D3D12_PREDICATION_OP Operation); void ( STDMETHODCALLTYPE *SetMarker )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, UINT Metadata, _In_reads_bytes_opt_(Size) const void *pData, UINT Size); void ( STDMETHODCALLTYPE *BeginEvent )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, UINT Metadata, _In_reads_bytes_opt_(Size) const void *pData, UINT Size); void ( STDMETHODCALLTYPE *EndEvent )( - ID3D12GraphicsCommandList3 * This); + ID3D12GraphicsCommandList4 * This); void ( STDMETHODCALLTYPE *ExecuteIndirect )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ ID3D12CommandSignature *pCommandSignature, _In_ UINT MaxCommandCount, _In_ ID3D12Resource *pArgumentBuffer, @@ -11846,7 +14759,7 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList3; _In_ UINT64 CountBufferOffset); void ( STDMETHODCALLTYPE *AtomicCopyBufferUINT )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ ID3D12Resource *pDstBuffer, UINT64 DstOffset, _In_ ID3D12Resource *pSrcBuffer, @@ -11856,7 +14769,7 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList3; _In_reads_(Dependencies) const D3D12_SUBRESOURCE_RANGE_UINT64 *pDependentSubresourceRanges); void ( STDMETHODCALLTYPE *AtomicCopyBufferUINT64 )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ ID3D12Resource *pDstBuffer, UINT64 DstOffset, _In_ ID3D12Resource *pSrcBuffer, @@ -11866,18 +14779,18 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList3; _In_reads_(Dependencies) const D3D12_SUBRESOURCE_RANGE_UINT64 *pDependentSubresourceRanges); void ( STDMETHODCALLTYPE *OMSetDepthBounds )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ FLOAT Min, _In_ FLOAT Max); void ( STDMETHODCALLTYPE *SetSamplePositions )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT NumSamplesPerPixel, _In_ UINT NumPixels, _In_reads_(NumSamplesPerPixel*NumPixels) D3D12_SAMPLE_POSITION *pSamplePositions); void ( STDMETHODCALLTYPE *ResolveSubresourceRegion )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ ID3D12Resource *pDstResource, _In_ UINT DstSubresource, _In_ UINT DstX, @@ -11889,25 +14802,73 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList3; _In_ D3D12_RESOLVE_MODE ResolveMode); void ( STDMETHODCALLTYPE *SetViewInstanceMask )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_ UINT Mask); void ( STDMETHODCALLTYPE *WriteBufferImmediate )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, UINT Count, _In_reads_(Count) const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams, _In_reads_opt_(Count) const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes); void ( STDMETHODCALLTYPE *SetProtectedResourceSession )( - ID3D12GraphicsCommandList3 * This, + ID3D12GraphicsCommandList4 * This, _In_opt_ ID3D12ProtectedResourceSession *pProtectedResourceSession); + void ( STDMETHODCALLTYPE *BeginRenderPass )( + ID3D12GraphicsCommandList4 * This, + _In_ UINT NumRenderTargets, + _In_reads_opt_(NumRenderTargets) const D3D12_RENDER_PASS_RENDER_TARGET_DESC *pRenderTargets, + _In_opt_ const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC *pDepthStencil, + D3D12_RENDER_PASS_FLAGS Flags); + + void ( STDMETHODCALLTYPE *EndRenderPass )( + ID3D12GraphicsCommandList4 * This); + + void ( STDMETHODCALLTYPE *InitializeMetaCommand )( + ID3D12GraphicsCommandList4 * This, + _In_ ID3D12MetaCommand *pMetaCommand, + _In_reads_bytes_opt_(InitializationParametersDataSizeInBytes) const void *pInitializationParametersData, + _In_ SIZE_T InitializationParametersDataSizeInBytes); + + void ( STDMETHODCALLTYPE *ExecuteMetaCommand )( + ID3D12GraphicsCommandList4 * This, + _In_ ID3D12MetaCommand *pMetaCommand, + _In_reads_bytes_opt_(ExecutionParametersDataSizeInBytes) const void *pExecutionParametersData, + _In_ SIZE_T ExecutionParametersDataSizeInBytes); + + void ( STDMETHODCALLTYPE *BuildRaytracingAccelerationStructure )( + ID3D12GraphicsCommandList4 * This, + _In_ const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC *pDesc, + _In_ UINT NumPostbuildInfoDescs, + _In_reads_opt_(NumPostbuildInfoDescs) const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC *pPostbuildInfoDescs); + + void ( STDMETHODCALLTYPE *EmitRaytracingAccelerationStructurePostbuildInfo )( + ID3D12GraphicsCommandList4 * This, + _In_ const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC *pDesc, + _In_ UINT NumSourceAccelerationStructures, + _In_reads_( NumSourceAccelerationStructures ) const D3D12_GPU_VIRTUAL_ADDRESS *pSourceAccelerationStructureData); + + void ( STDMETHODCALLTYPE *CopyRaytracingAccelerationStructure )( + ID3D12GraphicsCommandList4 * This, + _In_ D3D12_GPU_VIRTUAL_ADDRESS DestAccelerationStructureData, + _In_ D3D12_GPU_VIRTUAL_ADDRESS SourceAccelerationStructureData, + _In_ D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE Mode); + + void ( STDMETHODCALLTYPE *SetPipelineState1 )( + ID3D12GraphicsCommandList4 * This, + _In_ ID3D12StateObject *pStateObject); + + void ( STDMETHODCALLTYPE *DispatchRays )( + ID3D12GraphicsCommandList4 * This, + _In_ const D3D12_DISPATCH_RAYS_DESC *pDesc); + END_INTERFACE - } ID3D12GraphicsCommandList3Vtbl; + } ID3D12GraphicsCommandList4Vtbl; - interface ID3D12GraphicsCommandList3 + interface ID3D12GraphicsCommandList4 { - CONST_VTBL struct ID3D12GraphicsCommandList3Vtbl *lpVtbl; + CONST_VTBL struct ID3D12GraphicsCommandList4Vtbl *lpVtbl; }; @@ -11915,217 +14876,245 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList3; #ifdef COBJMACROS -#define ID3D12GraphicsCommandList3_QueryInterface(This,riid,ppvObject) \ +#define ID3D12GraphicsCommandList4_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) -#define ID3D12GraphicsCommandList3_AddRef(This) \ +#define ID3D12GraphicsCommandList4_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) -#define ID3D12GraphicsCommandList3_Release(This) \ +#define ID3D12GraphicsCommandList4_Release(This) \ ( (This)->lpVtbl -> Release(This) ) -#define ID3D12GraphicsCommandList3_GetPrivateData(This,guid,pDataSize,pData) \ +#define ID3D12GraphicsCommandList4_GetPrivateData(This,guid,pDataSize,pData) \ ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) -#define ID3D12GraphicsCommandList3_SetPrivateData(This,guid,DataSize,pData) \ +#define ID3D12GraphicsCommandList4_SetPrivateData(This,guid,DataSize,pData) \ ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) -#define ID3D12GraphicsCommandList3_SetPrivateDataInterface(This,guid,pData) \ +#define ID3D12GraphicsCommandList4_SetPrivateDataInterface(This,guid,pData) \ ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) -#define ID3D12GraphicsCommandList3_SetName(This,Name) \ +#define ID3D12GraphicsCommandList4_SetName(This,Name) \ ( (This)->lpVtbl -> SetName(This,Name) ) -#define ID3D12GraphicsCommandList3_GetDevice(This,riid,ppvDevice) \ +#define ID3D12GraphicsCommandList4_GetDevice(This,riid,ppvDevice) \ ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) -#define ID3D12GraphicsCommandList3_GetType(This) \ +#define ID3D12GraphicsCommandList4_GetType(This) \ ( (This)->lpVtbl -> GetType(This) ) -#define ID3D12GraphicsCommandList3_Close(This) \ +#define ID3D12GraphicsCommandList4_Close(This) \ ( (This)->lpVtbl -> Close(This) ) -#define ID3D12GraphicsCommandList3_Reset(This,pAllocator,pInitialState) \ +#define ID3D12GraphicsCommandList4_Reset(This,pAllocator,pInitialState) \ ( (This)->lpVtbl -> Reset(This,pAllocator,pInitialState) ) -#define ID3D12GraphicsCommandList3_ClearState(This,pPipelineState) \ +#define ID3D12GraphicsCommandList4_ClearState(This,pPipelineState) \ ( (This)->lpVtbl -> ClearState(This,pPipelineState) ) -#define ID3D12GraphicsCommandList3_DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) \ +#define ID3D12GraphicsCommandList4_DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) \ ( (This)->lpVtbl -> DrawInstanced(This,VertexCountPerInstance,InstanceCount,StartVertexLocation,StartInstanceLocation) ) -#define ID3D12GraphicsCommandList3_DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) \ +#define ID3D12GraphicsCommandList4_DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) \ ( (This)->lpVtbl -> DrawIndexedInstanced(This,IndexCountPerInstance,InstanceCount,StartIndexLocation,BaseVertexLocation,StartInstanceLocation) ) -#define ID3D12GraphicsCommandList3_Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) \ +#define ID3D12GraphicsCommandList4_Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) \ ( (This)->lpVtbl -> Dispatch(This,ThreadGroupCountX,ThreadGroupCountY,ThreadGroupCountZ) ) -#define ID3D12GraphicsCommandList3_CopyBufferRegion(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,NumBytes) \ +#define ID3D12GraphicsCommandList4_CopyBufferRegion(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,NumBytes) \ ( (This)->lpVtbl -> CopyBufferRegion(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,NumBytes) ) -#define ID3D12GraphicsCommandList3_CopyTextureRegion(This,pDst,DstX,DstY,DstZ,pSrc,pSrcBox) \ +#define ID3D12GraphicsCommandList4_CopyTextureRegion(This,pDst,DstX,DstY,DstZ,pSrc,pSrcBox) \ ( (This)->lpVtbl -> CopyTextureRegion(This,pDst,DstX,DstY,DstZ,pSrc,pSrcBox) ) -#define ID3D12GraphicsCommandList3_CopyResource(This,pDstResource,pSrcResource) \ +#define ID3D12GraphicsCommandList4_CopyResource(This,pDstResource,pSrcResource) \ ( (This)->lpVtbl -> CopyResource(This,pDstResource,pSrcResource) ) -#define ID3D12GraphicsCommandList3_CopyTiles(This,pTiledResource,pTileRegionStartCoordinate,pTileRegionSize,pBuffer,BufferStartOffsetInBytes,Flags) \ +#define ID3D12GraphicsCommandList4_CopyTiles(This,pTiledResource,pTileRegionStartCoordinate,pTileRegionSize,pBuffer,BufferStartOffsetInBytes,Flags) \ ( (This)->lpVtbl -> CopyTiles(This,pTiledResource,pTileRegionStartCoordinate,pTileRegionSize,pBuffer,BufferStartOffsetInBytes,Flags) ) -#define ID3D12GraphicsCommandList3_ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) \ +#define ID3D12GraphicsCommandList4_ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) \ ( (This)->lpVtbl -> ResolveSubresource(This,pDstResource,DstSubresource,pSrcResource,SrcSubresource,Format) ) -#define ID3D12GraphicsCommandList3_IASetPrimitiveTopology(This,PrimitiveTopology) \ +#define ID3D12GraphicsCommandList4_IASetPrimitiveTopology(This,PrimitiveTopology) \ ( (This)->lpVtbl -> IASetPrimitiveTopology(This,PrimitiveTopology) ) -#define ID3D12GraphicsCommandList3_RSSetViewports(This,NumViewports,pViewports) \ +#define ID3D12GraphicsCommandList4_RSSetViewports(This,NumViewports,pViewports) \ ( (This)->lpVtbl -> RSSetViewports(This,NumViewports,pViewports) ) -#define ID3D12GraphicsCommandList3_RSSetScissorRects(This,NumRects,pRects) \ +#define ID3D12GraphicsCommandList4_RSSetScissorRects(This,NumRects,pRects) \ ( (This)->lpVtbl -> RSSetScissorRects(This,NumRects,pRects) ) -#define ID3D12GraphicsCommandList3_OMSetBlendFactor(This,BlendFactor) \ +#define ID3D12GraphicsCommandList4_OMSetBlendFactor(This,BlendFactor) \ ( (This)->lpVtbl -> OMSetBlendFactor(This,BlendFactor) ) -#define ID3D12GraphicsCommandList3_OMSetStencilRef(This,StencilRef) \ +#define ID3D12GraphicsCommandList4_OMSetStencilRef(This,StencilRef) \ ( (This)->lpVtbl -> OMSetStencilRef(This,StencilRef) ) -#define ID3D12GraphicsCommandList3_SetPipelineState(This,pPipelineState) \ +#define ID3D12GraphicsCommandList4_SetPipelineState(This,pPipelineState) \ ( (This)->lpVtbl -> SetPipelineState(This,pPipelineState) ) -#define ID3D12GraphicsCommandList3_ResourceBarrier(This,NumBarriers,pBarriers) \ +#define ID3D12GraphicsCommandList4_ResourceBarrier(This,NumBarriers,pBarriers) \ ( (This)->lpVtbl -> ResourceBarrier(This,NumBarriers,pBarriers) ) -#define ID3D12GraphicsCommandList3_ExecuteBundle(This,pCommandList) \ +#define ID3D12GraphicsCommandList4_ExecuteBundle(This,pCommandList) \ ( (This)->lpVtbl -> ExecuteBundle(This,pCommandList) ) -#define ID3D12GraphicsCommandList3_SetDescriptorHeaps(This,NumDescriptorHeaps,ppDescriptorHeaps) \ +#define ID3D12GraphicsCommandList4_SetDescriptorHeaps(This,NumDescriptorHeaps,ppDescriptorHeaps) \ ( (This)->lpVtbl -> SetDescriptorHeaps(This,NumDescriptorHeaps,ppDescriptorHeaps) ) -#define ID3D12GraphicsCommandList3_SetComputeRootSignature(This,pRootSignature) \ +#define ID3D12GraphicsCommandList4_SetComputeRootSignature(This,pRootSignature) \ ( (This)->lpVtbl -> SetComputeRootSignature(This,pRootSignature) ) -#define ID3D12GraphicsCommandList3_SetGraphicsRootSignature(This,pRootSignature) \ +#define ID3D12GraphicsCommandList4_SetGraphicsRootSignature(This,pRootSignature) \ ( (This)->lpVtbl -> SetGraphicsRootSignature(This,pRootSignature) ) -#define ID3D12GraphicsCommandList3_SetComputeRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) \ +#define ID3D12GraphicsCommandList4_SetComputeRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) \ ( (This)->lpVtbl -> SetComputeRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) ) -#define ID3D12GraphicsCommandList3_SetGraphicsRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) \ +#define ID3D12GraphicsCommandList4_SetGraphicsRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) \ ( (This)->lpVtbl -> SetGraphicsRootDescriptorTable(This,RootParameterIndex,BaseDescriptor) ) -#define ID3D12GraphicsCommandList3_SetComputeRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) \ +#define ID3D12GraphicsCommandList4_SetComputeRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) \ ( (This)->lpVtbl -> SetComputeRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) ) -#define ID3D12GraphicsCommandList3_SetGraphicsRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) \ +#define ID3D12GraphicsCommandList4_SetGraphicsRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) \ ( (This)->lpVtbl -> SetGraphicsRoot32BitConstant(This,RootParameterIndex,SrcData,DestOffsetIn32BitValues) ) -#define ID3D12GraphicsCommandList3_SetComputeRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) \ +#define ID3D12GraphicsCommandList4_SetComputeRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) \ ( (This)->lpVtbl -> SetComputeRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) ) -#define ID3D12GraphicsCommandList3_SetGraphicsRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) \ +#define ID3D12GraphicsCommandList4_SetGraphicsRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) \ ( (This)->lpVtbl -> SetGraphicsRoot32BitConstants(This,RootParameterIndex,Num32BitValuesToSet,pSrcData,DestOffsetIn32BitValues) ) -#define ID3D12GraphicsCommandList3_SetComputeRootConstantBufferView(This,RootParameterIndex,BufferLocation) \ +#define ID3D12GraphicsCommandList4_SetComputeRootConstantBufferView(This,RootParameterIndex,BufferLocation) \ ( (This)->lpVtbl -> SetComputeRootConstantBufferView(This,RootParameterIndex,BufferLocation) ) -#define ID3D12GraphicsCommandList3_SetGraphicsRootConstantBufferView(This,RootParameterIndex,BufferLocation) \ +#define ID3D12GraphicsCommandList4_SetGraphicsRootConstantBufferView(This,RootParameterIndex,BufferLocation) \ ( (This)->lpVtbl -> SetGraphicsRootConstantBufferView(This,RootParameterIndex,BufferLocation) ) -#define ID3D12GraphicsCommandList3_SetComputeRootShaderResourceView(This,RootParameterIndex,BufferLocation) \ +#define ID3D12GraphicsCommandList4_SetComputeRootShaderResourceView(This,RootParameterIndex,BufferLocation) \ ( (This)->lpVtbl -> SetComputeRootShaderResourceView(This,RootParameterIndex,BufferLocation) ) -#define ID3D12GraphicsCommandList3_SetGraphicsRootShaderResourceView(This,RootParameterIndex,BufferLocation) \ +#define ID3D12GraphicsCommandList4_SetGraphicsRootShaderResourceView(This,RootParameterIndex,BufferLocation) \ ( (This)->lpVtbl -> SetGraphicsRootShaderResourceView(This,RootParameterIndex,BufferLocation) ) -#define ID3D12GraphicsCommandList3_SetComputeRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) \ +#define ID3D12GraphicsCommandList4_SetComputeRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) \ ( (This)->lpVtbl -> SetComputeRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) ) -#define ID3D12GraphicsCommandList3_SetGraphicsRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) \ +#define ID3D12GraphicsCommandList4_SetGraphicsRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) \ ( (This)->lpVtbl -> SetGraphicsRootUnorderedAccessView(This,RootParameterIndex,BufferLocation) ) -#define ID3D12GraphicsCommandList3_IASetIndexBuffer(This,pView) \ +#define ID3D12GraphicsCommandList4_IASetIndexBuffer(This,pView) \ ( (This)->lpVtbl -> IASetIndexBuffer(This,pView) ) -#define ID3D12GraphicsCommandList3_IASetVertexBuffers(This,StartSlot,NumViews,pViews) \ +#define ID3D12GraphicsCommandList4_IASetVertexBuffers(This,StartSlot,NumViews,pViews) \ ( (This)->lpVtbl -> IASetVertexBuffers(This,StartSlot,NumViews,pViews) ) -#define ID3D12GraphicsCommandList3_SOSetTargets(This,StartSlot,NumViews,pViews) \ +#define ID3D12GraphicsCommandList4_SOSetTargets(This,StartSlot,NumViews,pViews) \ ( (This)->lpVtbl -> SOSetTargets(This,StartSlot,NumViews,pViews) ) -#define ID3D12GraphicsCommandList3_OMSetRenderTargets(This,NumRenderTargetDescriptors,pRenderTargetDescriptors,RTsSingleHandleToDescriptorRange,pDepthStencilDescriptor) \ +#define ID3D12GraphicsCommandList4_OMSetRenderTargets(This,NumRenderTargetDescriptors,pRenderTargetDescriptors,RTsSingleHandleToDescriptorRange,pDepthStencilDescriptor) \ ( (This)->lpVtbl -> OMSetRenderTargets(This,NumRenderTargetDescriptors,pRenderTargetDescriptors,RTsSingleHandleToDescriptorRange,pDepthStencilDescriptor) ) -#define ID3D12GraphicsCommandList3_ClearDepthStencilView(This,DepthStencilView,ClearFlags,Depth,Stencil,NumRects,pRects) \ +#define ID3D12GraphicsCommandList4_ClearDepthStencilView(This,DepthStencilView,ClearFlags,Depth,Stencil,NumRects,pRects) \ ( (This)->lpVtbl -> ClearDepthStencilView(This,DepthStencilView,ClearFlags,Depth,Stencil,NumRects,pRects) ) -#define ID3D12GraphicsCommandList3_ClearRenderTargetView(This,RenderTargetView,ColorRGBA,NumRects,pRects) \ +#define ID3D12GraphicsCommandList4_ClearRenderTargetView(This,RenderTargetView,ColorRGBA,NumRects,pRects) \ ( (This)->lpVtbl -> ClearRenderTargetView(This,RenderTargetView,ColorRGBA,NumRects,pRects) ) -#define ID3D12GraphicsCommandList3_ClearUnorderedAccessViewUint(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) \ +#define ID3D12GraphicsCommandList4_ClearUnorderedAccessViewUint(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) \ ( (This)->lpVtbl -> ClearUnorderedAccessViewUint(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) ) -#define ID3D12GraphicsCommandList3_ClearUnorderedAccessViewFloat(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) \ +#define ID3D12GraphicsCommandList4_ClearUnorderedAccessViewFloat(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) \ ( (This)->lpVtbl -> ClearUnorderedAccessViewFloat(This,ViewGPUHandleInCurrentHeap,ViewCPUHandle,pResource,Values,NumRects,pRects) ) -#define ID3D12GraphicsCommandList3_DiscardResource(This,pResource,pRegion) \ +#define ID3D12GraphicsCommandList4_DiscardResource(This,pResource,pRegion) \ ( (This)->lpVtbl -> DiscardResource(This,pResource,pRegion) ) -#define ID3D12GraphicsCommandList3_BeginQuery(This,pQueryHeap,Type,Index) \ +#define ID3D12GraphicsCommandList4_BeginQuery(This,pQueryHeap,Type,Index) \ ( (This)->lpVtbl -> BeginQuery(This,pQueryHeap,Type,Index) ) -#define ID3D12GraphicsCommandList3_EndQuery(This,pQueryHeap,Type,Index) \ +#define ID3D12GraphicsCommandList4_EndQuery(This,pQueryHeap,Type,Index) \ ( (This)->lpVtbl -> EndQuery(This,pQueryHeap,Type,Index) ) -#define ID3D12GraphicsCommandList3_ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) \ +#define ID3D12GraphicsCommandList4_ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) \ ( (This)->lpVtbl -> ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) ) -#define ID3D12GraphicsCommandList3_SetPredication(This,pBuffer,AlignedBufferOffset,Operation) \ +#define ID3D12GraphicsCommandList4_SetPredication(This,pBuffer,AlignedBufferOffset,Operation) \ ( (This)->lpVtbl -> SetPredication(This,pBuffer,AlignedBufferOffset,Operation) ) -#define ID3D12GraphicsCommandList3_SetMarker(This,Metadata,pData,Size) \ +#define ID3D12GraphicsCommandList4_SetMarker(This,Metadata,pData,Size) \ ( (This)->lpVtbl -> SetMarker(This,Metadata,pData,Size) ) -#define ID3D12GraphicsCommandList3_BeginEvent(This,Metadata,pData,Size) \ +#define ID3D12GraphicsCommandList4_BeginEvent(This,Metadata,pData,Size) \ ( (This)->lpVtbl -> BeginEvent(This,Metadata,pData,Size) ) -#define ID3D12GraphicsCommandList3_EndEvent(This) \ +#define ID3D12GraphicsCommandList4_EndEvent(This) \ ( (This)->lpVtbl -> EndEvent(This) ) -#define ID3D12GraphicsCommandList3_ExecuteIndirect(This,pCommandSignature,MaxCommandCount,pArgumentBuffer,ArgumentBufferOffset,pCountBuffer,CountBufferOffset) \ +#define ID3D12GraphicsCommandList4_ExecuteIndirect(This,pCommandSignature,MaxCommandCount,pArgumentBuffer,ArgumentBufferOffset,pCountBuffer,CountBufferOffset) \ ( (This)->lpVtbl -> ExecuteIndirect(This,pCommandSignature,MaxCommandCount,pArgumentBuffer,ArgumentBufferOffset,pCountBuffer,CountBufferOffset) ) -#define ID3D12GraphicsCommandList3_AtomicCopyBufferUINT(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) \ +#define ID3D12GraphicsCommandList4_AtomicCopyBufferUINT(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) \ ( (This)->lpVtbl -> AtomicCopyBufferUINT(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) ) -#define ID3D12GraphicsCommandList3_AtomicCopyBufferUINT64(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) \ +#define ID3D12GraphicsCommandList4_AtomicCopyBufferUINT64(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) \ ( (This)->lpVtbl -> AtomicCopyBufferUINT64(This,pDstBuffer,DstOffset,pSrcBuffer,SrcOffset,Dependencies,ppDependentResources,pDependentSubresourceRanges) ) -#define ID3D12GraphicsCommandList3_OMSetDepthBounds(This,Min,Max) \ +#define ID3D12GraphicsCommandList4_OMSetDepthBounds(This,Min,Max) \ ( (This)->lpVtbl -> OMSetDepthBounds(This,Min,Max) ) -#define ID3D12GraphicsCommandList3_SetSamplePositions(This,NumSamplesPerPixel,NumPixels,pSamplePositions) \ +#define ID3D12GraphicsCommandList4_SetSamplePositions(This,NumSamplesPerPixel,NumPixels,pSamplePositions) \ ( (This)->lpVtbl -> SetSamplePositions(This,NumSamplesPerPixel,NumPixels,pSamplePositions) ) -#define ID3D12GraphicsCommandList3_ResolveSubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,pSrcResource,SrcSubresource,pSrcRect,Format,ResolveMode) \ +#define ID3D12GraphicsCommandList4_ResolveSubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,pSrcResource,SrcSubresource,pSrcRect,Format,ResolveMode) \ ( (This)->lpVtbl -> ResolveSubresourceRegion(This,pDstResource,DstSubresource,DstX,DstY,pSrcResource,SrcSubresource,pSrcRect,Format,ResolveMode) ) -#define ID3D12GraphicsCommandList3_SetViewInstanceMask(This,Mask) \ +#define ID3D12GraphicsCommandList4_SetViewInstanceMask(This,Mask) \ ( (This)->lpVtbl -> SetViewInstanceMask(This,Mask) ) -#define ID3D12GraphicsCommandList3_WriteBufferImmediate(This,Count,pParams,pModes) \ +#define ID3D12GraphicsCommandList4_WriteBufferImmediate(This,Count,pParams,pModes) \ ( (This)->lpVtbl -> WriteBufferImmediate(This,Count,pParams,pModes) ) -#define ID3D12GraphicsCommandList3_SetProtectedResourceSession(This,pProtectedResourceSession) \ +#define ID3D12GraphicsCommandList4_SetProtectedResourceSession(This,pProtectedResourceSession) \ ( (This)->lpVtbl -> SetProtectedResourceSession(This,pProtectedResourceSession) ) + +#define ID3D12GraphicsCommandList4_BeginRenderPass(This,NumRenderTargets,pRenderTargets,pDepthStencil,Flags) \ + ( (This)->lpVtbl -> BeginRenderPass(This,NumRenderTargets,pRenderTargets,pDepthStencil,Flags) ) + +#define ID3D12GraphicsCommandList4_EndRenderPass(This) \ + ( (This)->lpVtbl -> EndRenderPass(This) ) + +#define ID3D12GraphicsCommandList4_InitializeMetaCommand(This,pMetaCommand,pInitializationParametersData,InitializationParametersDataSizeInBytes) \ + ( (This)->lpVtbl -> InitializeMetaCommand(This,pMetaCommand,pInitializationParametersData,InitializationParametersDataSizeInBytes) ) + +#define ID3D12GraphicsCommandList4_ExecuteMetaCommand(This,pMetaCommand,pExecutionParametersData,ExecutionParametersDataSizeInBytes) \ + ( (This)->lpVtbl -> ExecuteMetaCommand(This,pMetaCommand,pExecutionParametersData,ExecutionParametersDataSizeInBytes) ) + +#define ID3D12GraphicsCommandList4_BuildRaytracingAccelerationStructure(This,pDesc,NumPostbuildInfoDescs,pPostbuildInfoDescs) \ + ( (This)->lpVtbl -> BuildRaytracingAccelerationStructure(This,pDesc,NumPostbuildInfoDescs,pPostbuildInfoDescs) ) + +#define ID3D12GraphicsCommandList4_EmitRaytracingAccelerationStructurePostbuildInfo(This,pDesc,NumSourceAccelerationStructures,pSourceAccelerationStructureData) \ + ( (This)->lpVtbl -> EmitRaytracingAccelerationStructurePostbuildInfo(This,pDesc,NumSourceAccelerationStructures,pSourceAccelerationStructureData) ) + +#define ID3D12GraphicsCommandList4_CopyRaytracingAccelerationStructure(This,DestAccelerationStructureData,SourceAccelerationStructureData,Mode) \ + ( (This)->lpVtbl -> CopyRaytracingAccelerationStructure(This,DestAccelerationStructureData,SourceAccelerationStructureData,Mode) ) + +#define ID3D12GraphicsCommandList4_SetPipelineState1(This,pStateObject) \ + ( (This)->lpVtbl -> SetPipelineState1(This,pStateObject) ) + +#define ID3D12GraphicsCommandList4_DispatchRays(This,pDesc) \ + ( (This)->lpVtbl -> DispatchRays(This,pDesc) ) + #endif /* COBJMACROS */ @@ -12134,7 +15123,7 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList3; -#endif /* __ID3D12GraphicsCommandList3_INTERFACE_DEFINED__ */ +#endif /* __ID3D12GraphicsCommandList4_INTERFACE_DEFINED__ */ #ifndef __ID3D12Tools_INTERFACE_DEFINED__ @@ -12224,7 +15213,7 @@ EXTERN_C const IID IID_ID3D12Tools; #endif /* __ID3D12Tools_INTERFACE_DEFINED__ */ -/* interface __MIDL_itf_d3d12_0000_0033 */ +/* interface __MIDL_itf_d3d12_0000_0041 */ /* [local] */ typedef struct D3D12_SUBRESOURCE_DATA @@ -12342,20 +15331,6 @@ static const UUID D3D12TiledResourceTier4 = { /* c9c4725f-a81a-4f56-8c5b-c51039d { 0x8c, 0x5b, 0xc5, 0x10, 0x39, 0xd6, 0x94, 0xfb } }; // -------------------------------------------------------------------------------------------------------------------------------- -// Experimental Feature: D3D12RaytracingPrototype -// -// Use with D3D12EnableExperimentalFeatures to enable the D3D12 Raytracing Prototype. -// -// Enabling D3D12RaytracingPrototype needs no configuration struct, pass NULL in the pConfigurationStructs array. -// -// -------------------------------------------------------------------------------------------------------------------------------- -static const UUID D3D12RaytracingPrototype = { /* 5d15d3b2-015a-4f39-8d47-299ac37190d3 */ - 0x5d15d3b2, - 0x015a, - 0x4f39, - {0x8d, 0x47, 0x29, 0x9a, 0xc3, 0x71, 0x90, 0xd3} -}; -// -------------------------------------------------------------------------------------------------------------------------------- // Experimental Feature: D3D12MetaCommand // // Use with D3D12EnableExperimentalFeatures to enable the D3D12 Meta Command. @@ -12370,6 +15345,7 @@ static const UUID D3D12MetaCommand = { /* C734C97E-8077-48C8-9FDC-D9D1DD31DD77 * { 0x9f, 0xdc, 0xd9, 0xd1, 0xdd, 0x31, 0xdd, 0x77 } }; #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +#pragma endregion DEFINE_GUID(IID_ID3D12Object,0xc4fec28f,0x7966,0x4e95,0x9f,0x94,0xf4,0x31,0xcb,0x56,0xc3,0xb8); DEFINE_GUID(IID_ID3D12DeviceChild,0x905db94b,0xa00c,0x4140,0x9d,0xf5,0x2b,0x64,0xca,0x9e,0xa3,0x57); DEFINE_GUID(IID_ID3D12RootSignature,0xc54a6b66,0x72df,0x4ee8,0x8b,0xe5,0xa9,0x46,0xa1,0x42,0x92,0x14); @@ -12399,14 +15375,22 @@ DEFINE_GUID(IID_ID3D12Device3,0x81dadc15,0x2bad,0x4392,0x93,0xc5,0x10,0x13,0x45, DEFINE_GUID(IID_ID3D12ProtectedSession,0xA1533D18,0x0AC1,0x4084,0x85,0xB9,0x89,0xA9,0x61,0x16,0x80,0x6B); DEFINE_GUID(IID_ID3D12ProtectedResourceSession,0x6CD696F4,0xF289,0x40CC,0x80,0x91,0x5A,0x6C,0x0A,0x09,0x9C,0x3D); DEFINE_GUID(IID_ID3D12Device4,0xe865df17,0xa9ee,0x46f9,0xa4,0x63,0x30,0x98,0x31,0x5a,0xa2,0xe5); +DEFINE_GUID(IID_ID3D12LifetimeOwner,0xe667af9f,0xcd56,0x4f46,0x83,0xce,0x03,0x2e,0x59,0x5d,0x70,0xa8); +DEFINE_GUID(IID_ID3D12SwapChainAssistant,0xf1df64b6,0x57fd,0x49cd,0x88,0x07,0xc0,0xeb,0x88,0xb4,0x5c,0x8f); +DEFINE_GUID(IID_ID3D12LifetimeTracker,0x3fd03d36,0x4eb1,0x424a,0xa5,0x82,0x49,0x4e,0xcb,0x8b,0xa8,0x13); +DEFINE_GUID(IID_ID3D12StateObject,0x47016943,0xfca8,0x4594,0x93,0xea,0xaf,0x25,0x8b,0x55,0x34,0x6d); +DEFINE_GUID(IID_ID3D12StateObjectProperties,0xde5fa827,0x9bf9,0x4f26,0x89,0xff,0xd7,0xf5,0x6f,0xde,0x38,0x60); +DEFINE_GUID(IID_ID3D12Device5,0x8b4f173b,0x2fea,0x4b80,0x8f,0x58,0x43,0x07,0x19,0x1a,0xb9,0x5d); DEFINE_GUID(IID_ID3D12Resource1,0x9D5E227A,0x4430,0x4161,0x88,0xB3,0x3E,0xCA,0x6B,0xB1,0x6E,0x19); DEFINE_GUID(IID_ID3D12Heap1,0x572F7389,0x2168,0x49E3,0x96,0x93,0xD6,0xDF,0x58,0x71,0xBF,0x6D); DEFINE_GUID(IID_ID3D12GraphicsCommandList3,0x6FDA83A7,0xB84C,0x4E38,0x9A,0xC8,0xC7,0xBD,0x22,0x01,0x6B,0x3D); +DEFINE_GUID(IID_ID3D12MetaCommand,0xDBB84C27,0x36CE,0x4FC9,0xB8,0x01,0xF0,0x48,0xC4,0x6A,0xC5,0x70); +DEFINE_GUID(IID_ID3D12GraphicsCommandList4,0x8754318e,0xd3a9,0x4541,0x98,0xcf,0x64,0x5b,0x50,0xdc,0x48,0x74); DEFINE_GUID(IID_ID3D12Tools,0x7071e1f0,0xe84b,0x4b33,0x97,0x4f,0x12,0xfa,0x49,0xde,0x65,0xc5); -extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0033_v0_0_c_ifspec; -extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0033_v0_0_s_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0041_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12_0000_0041_v0_0_s_ifspec; /* Additional Prototypes for ALL interfaces */ diff --git a/3rdparty/bgfx/3rdparty/dxsdk/include/d3d12sdklayers.h b/3rdparty/bgfx/3rdparty/dxsdk/include/d3d12sdklayers.h index 0935b9b91f..5257d44b06 100644 --- a/3rdparty/bgfx/3rdparty/dxsdk/include/d3d12sdklayers.h +++ b/3rdparty/bgfx/3rdparty/dxsdk/include/d3d12sdklayers.h @@ -64,6 +64,13 @@ typedef interface ID3D12Debug2 ID3D12Debug2; #endif /* __ID3D12Debug2_FWD_DEFINED__ */ +#ifndef __ID3D12Debug3_FWD_DEFINED__ +#define __ID3D12Debug3_FWD_DEFINED__ +typedef interface ID3D12Debug3 ID3D12Debug3; + +#endif /* __ID3D12Debug3_FWD_DEFINED__ */ + + #ifndef __ID3D12DebugDevice1_FWD_DEFINED__ #define __ID3D12DebugDevice1_FWD_DEFINED__ typedef interface ID3D12DebugDevice1 ID3D12DebugDevice1; @@ -78,6 +85,13 @@ typedef interface ID3D12DebugDevice ID3D12DebugDevice; #endif /* __ID3D12DebugDevice_FWD_DEFINED__ */ +#ifndef __ID3D12DebugDevice2_FWD_DEFINED__ +#define __ID3D12DebugDevice2_FWD_DEFINED__ +typedef interface ID3D12DebugDevice2 ID3D12DebugDevice2; + +#endif /* __ID3D12DebugDevice2_FWD_DEFINED__ */ + + #ifndef __ID3D12DebugCommandQueue_FWD_DEFINED__ #define __ID3D12DebugCommandQueue_FWD_DEFINED__ typedef interface ID3D12DebugCommandQueue ID3D12DebugCommandQueue; @@ -99,6 +113,20 @@ typedef interface ID3D12DebugCommandList ID3D12DebugCommandList; #endif /* __ID3D12DebugCommandList_FWD_DEFINED__ */ +#ifndef __ID3D12DebugCommandList2_FWD_DEFINED__ +#define __ID3D12DebugCommandList2_FWD_DEFINED__ +typedef interface ID3D12DebugCommandList2 ID3D12DebugCommandList2; + +#endif /* __ID3D12DebugCommandList2_FWD_DEFINED__ */ + + +#ifndef __ID3D12SharingContract_FWD_DEFINED__ +#define __ID3D12SharingContract_FWD_DEFINED__ +typedef interface ID3D12SharingContract ID3D12SharingContract; + +#endif /* __ID3D12SharingContract_FWD_DEFINED__ */ + + #ifndef __ID3D12InfoQueue_FWD_DEFINED__ #define __ID3D12InfoQueue_FWD_DEFINED__ typedef interface ID3D12InfoQueue ID3D12InfoQueue; @@ -119,6 +147,9 @@ extern "C"{ /* interface __MIDL_itf_d3d12sdklayers_0000_0000 */ /* [local] */ +#include +#pragma region App Family +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0000_v0_0_c_ifspec; @@ -201,6 +232,22 @@ EXTERN_C const IID IID_ID3D12Debug; #endif /* __ID3D12Debug_INTERFACE_DEFINED__ */ +/* interface __MIDL_itf_d3d12sdklayers_0000_0001 */ +/* [local] */ + +typedef +enum D3D12_GPU_BASED_VALIDATION_FLAGS + { + D3D12_GPU_BASED_VALIDATION_FLAGS_NONE = 0, + D3D12_GPU_BASED_VALIDATION_FLAGS_DISABLE_STATE_TRACKING = 0x1 + } D3D12_GPU_BASED_VALIDATION_FLAGS; + +DEFINE_ENUM_FLAG_OPERATORS(D3D12_GPU_BASED_VALIDATION_FLAGS) + + +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0001_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0001_v0_0_s_ifspec; + #ifndef __ID3D12Debug1_INTERFACE_DEFINED__ #define __ID3D12Debug1_INTERFACE_DEFINED__ @@ -298,22 +345,6 @@ EXTERN_C const IID IID_ID3D12Debug1; #endif /* __ID3D12Debug1_INTERFACE_DEFINED__ */ -/* interface __MIDL_itf_d3d12sdklayers_0000_0002 */ -/* [local] */ - -typedef -enum D3D12_GPU_BASED_VALIDATION_FLAGS - { - D3D12_GPU_BASED_VALIDATION_FLAGS_NONE = 0, - D3D12_GPU_BASED_VALIDATION_FLAGS_DISABLE_STATE_TRACKING = 0x1 - } D3D12_GPU_BASED_VALIDATION_FLAGS; - -DEFINE_ENUM_FLAG_OPERATORS(D3D12_GPU_BASED_VALIDATION_FLAGS) - - -extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0002_v0_0_c_ifspec; -extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0002_v0_0_s_ifspec; - #ifndef __ID3D12Debug2_INTERFACE_DEFINED__ #define __ID3D12Debug2_INTERFACE_DEFINED__ @@ -393,7 +424,113 @@ EXTERN_C const IID IID_ID3D12Debug2; #endif /* __ID3D12Debug2_INTERFACE_DEFINED__ */ -/* interface __MIDL_itf_d3d12sdklayers_0000_0003 */ +#ifndef __ID3D12Debug3_INTERFACE_DEFINED__ +#define __ID3D12Debug3_INTERFACE_DEFINED__ + +/* interface ID3D12Debug3 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12Debug3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("5cf4e58f-f671-4ff1-a542-3686e3d153d1") + ID3D12Debug3 : public ID3D12Debug + { + public: + virtual void STDMETHODCALLTYPE SetEnableGPUBasedValidation( + BOOL Enable) = 0; + + virtual void STDMETHODCALLTYPE SetEnableSynchronizedCommandQueueValidation( + BOOL Enable) = 0; + + virtual void STDMETHODCALLTYPE SetGPUBasedValidationFlags( + D3D12_GPU_BASED_VALIDATION_FLAGS Flags) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12Debug3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12Debug3 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12Debug3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12Debug3 * This); + + void ( STDMETHODCALLTYPE *EnableDebugLayer )( + ID3D12Debug3 * This); + + void ( STDMETHODCALLTYPE *SetEnableGPUBasedValidation )( + ID3D12Debug3 * This, + BOOL Enable); + + void ( STDMETHODCALLTYPE *SetEnableSynchronizedCommandQueueValidation )( + ID3D12Debug3 * This, + BOOL Enable); + + void ( STDMETHODCALLTYPE *SetGPUBasedValidationFlags )( + ID3D12Debug3 * This, + D3D12_GPU_BASED_VALIDATION_FLAGS Flags); + + END_INTERFACE + } ID3D12Debug3Vtbl; + + interface ID3D12Debug3 + { + CONST_VTBL struct ID3D12Debug3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12Debug3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12Debug3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12Debug3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12Debug3_EnableDebugLayer(This) \ + ( (This)->lpVtbl -> EnableDebugLayer(This) ) + + +#define ID3D12Debug3_SetEnableGPUBasedValidation(This,Enable) \ + ( (This)->lpVtbl -> SetEnableGPUBasedValidation(This,Enable) ) + +#define ID3D12Debug3_SetEnableSynchronizedCommandQueueValidation(This,Enable) \ + ( (This)->lpVtbl -> SetEnableSynchronizedCommandQueueValidation(This,Enable) ) + +#define ID3D12Debug3_SetGPUBasedValidationFlags(This,Flags) \ + ( (This)->lpVtbl -> SetGPUBasedValidationFlags(This,Flags) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12Debug3_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12sdklayers_0000_0004 */ /* [local] */ typedef @@ -460,8 +597,8 @@ typedef struct D3D12_DEBUG_DEVICE_GPU_SLOWDOWN_PERFORMANCE_FACTOR -extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0003_v0_0_c_ifspec; -extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0003_v0_0_s_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0004_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0004_v0_0_s_ifspec; #ifndef __ID3D12DebugDevice1_INTERFACE_DEFINED__ #define __ID3D12DebugDevice1_INTERFACE_DEFINED__ @@ -667,14 +804,132 @@ EXTERN_C const IID IID_ID3D12DebugDevice; #endif /* __ID3D12DebugDevice_INTERFACE_DEFINED__ */ -/* interface __MIDL_itf_d3d12sdklayers_0000_0005 */ +#ifndef __ID3D12DebugDevice2_INTERFACE_DEFINED__ +#define __ID3D12DebugDevice2_INTERFACE_DEFINED__ + +/* interface ID3D12DebugDevice2 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12DebugDevice2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("60eccbc1-378d-4df1-894c-f8ac5ce4d7dd") + ID3D12DebugDevice2 : public ID3D12DebugDevice + { + public: + virtual HRESULT STDMETHODCALLTYPE SetDebugParameter( + D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type, + _In_reads_bytes_(DataSize) const void *pData, + UINT DataSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDebugParameter( + D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type, + _Out_writes_bytes_(DataSize) void *pData, + UINT DataSize) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12DebugDevice2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12DebugDevice2 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12DebugDevice2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12DebugDevice2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetFeatureMask )( + ID3D12DebugDevice2 * This, + D3D12_DEBUG_FEATURE Mask); + + D3D12_DEBUG_FEATURE ( STDMETHODCALLTYPE *GetFeatureMask )( + ID3D12DebugDevice2 * This); + + HRESULT ( STDMETHODCALLTYPE *ReportLiveDeviceObjects )( + ID3D12DebugDevice2 * This, + D3D12_RLDO_FLAGS Flags); + + HRESULT ( STDMETHODCALLTYPE *SetDebugParameter )( + ID3D12DebugDevice2 * This, + D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type, + _In_reads_bytes_(DataSize) const void *pData, + UINT DataSize); + + HRESULT ( STDMETHODCALLTYPE *GetDebugParameter )( + ID3D12DebugDevice2 * This, + D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type, + _Out_writes_bytes_(DataSize) void *pData, + UINT DataSize); + + END_INTERFACE + } ID3D12DebugDevice2Vtbl; + + interface ID3D12DebugDevice2 + { + CONST_VTBL struct ID3D12DebugDevice2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12DebugDevice2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12DebugDevice2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12DebugDevice2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12DebugDevice2_SetFeatureMask(This,Mask) \ + ( (This)->lpVtbl -> SetFeatureMask(This,Mask) ) + +#define ID3D12DebugDevice2_GetFeatureMask(This) \ + ( (This)->lpVtbl -> GetFeatureMask(This) ) + +#define ID3D12DebugDevice2_ReportLiveDeviceObjects(This,Flags) \ + ( (This)->lpVtbl -> ReportLiveDeviceObjects(This,Flags) ) + + +#define ID3D12DebugDevice2_SetDebugParameter(This,Type,pData,DataSize) \ + ( (This)->lpVtbl -> SetDebugParameter(This,Type,pData,DataSize) ) + +#define ID3D12DebugDevice2_GetDebugParameter(This,Type,pData,DataSize) \ + ( (This)->lpVtbl -> GetDebugParameter(This,Type,pData,DataSize) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12DebugDevice2_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12sdklayers_0000_0007 */ /* [local] */ DEFINE_GUID(DXGI_DEBUG_D3D12, 0xcf59a98c, 0xa950, 0x4326, 0x91, 0xef, 0x9b, 0xba, 0xa1, 0x7b, 0xfd, 0x95); -extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0005_v0_0_c_ifspec; -extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0005_v0_0_s_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0007_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0007_v0_0_s_ifspec; #ifndef __ID3D12DebugCommandQueue_INTERFACE_DEFINED__ #define __ID3D12DebugCommandQueue_INTERFACE_DEFINED__ @@ -759,7 +1014,7 @@ EXTERN_C const IID IID_ID3D12DebugCommandQueue; #endif /* __ID3D12DebugCommandQueue_INTERFACE_DEFINED__ */ -/* interface __MIDL_itf_d3d12sdklayers_0000_0006 */ +/* interface __MIDL_itf_d3d12sdklayers_0000_0008 */ /* [local] */ typedef @@ -775,8 +1030,8 @@ typedef struct D3D12_DEBUG_COMMAND_LIST_GPU_BASED_VALIDATION_SETTINGS -extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0006_v0_0_c_ifspec; -extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0006_v0_0_s_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0008_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0008_v0_0_s_ifspec; #ifndef __ID3D12DebugCommandList1_INTERFACE_DEFINED__ #define __ID3D12DebugCommandList1_INTERFACE_DEFINED__ @@ -990,7 +1245,242 @@ EXTERN_C const IID IID_ID3D12DebugCommandList; #endif /* __ID3D12DebugCommandList_INTERFACE_DEFINED__ */ -/* interface __MIDL_itf_d3d12sdklayers_0000_0008 */ +#ifndef __ID3D12DebugCommandList2_INTERFACE_DEFINED__ +#define __ID3D12DebugCommandList2_INTERFACE_DEFINED__ + +/* interface ID3D12DebugCommandList2 */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12DebugCommandList2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("aeb575cf-4e06-48be-ba3b-c450fc96652e") + ID3D12DebugCommandList2 : public ID3D12DebugCommandList + { + public: + virtual HRESULT STDMETHODCALLTYPE SetDebugParameter( + D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type, + _In_reads_bytes_(DataSize) const void *pData, + UINT DataSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDebugParameter( + D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type, + _Out_writes_bytes_(DataSize) void *pData, + UINT DataSize) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12DebugCommandList2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12DebugCommandList2 * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12DebugCommandList2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12DebugCommandList2 * This); + + BOOL ( STDMETHODCALLTYPE *AssertResourceState )( + ID3D12DebugCommandList2 * This, + _In_ ID3D12Resource *pResource, + UINT Subresource, + UINT State); + + HRESULT ( STDMETHODCALLTYPE *SetFeatureMask )( + ID3D12DebugCommandList2 * This, + D3D12_DEBUG_FEATURE Mask); + + D3D12_DEBUG_FEATURE ( STDMETHODCALLTYPE *GetFeatureMask )( + ID3D12DebugCommandList2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetDebugParameter )( + ID3D12DebugCommandList2 * This, + D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type, + _In_reads_bytes_(DataSize) const void *pData, + UINT DataSize); + + HRESULT ( STDMETHODCALLTYPE *GetDebugParameter )( + ID3D12DebugCommandList2 * This, + D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type, + _Out_writes_bytes_(DataSize) void *pData, + UINT DataSize); + + END_INTERFACE + } ID3D12DebugCommandList2Vtbl; + + interface ID3D12DebugCommandList2 + { + CONST_VTBL struct ID3D12DebugCommandList2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12DebugCommandList2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12DebugCommandList2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12DebugCommandList2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12DebugCommandList2_AssertResourceState(This,pResource,Subresource,State) \ + ( (This)->lpVtbl -> AssertResourceState(This,pResource,Subresource,State) ) + +#define ID3D12DebugCommandList2_SetFeatureMask(This,Mask) \ + ( (This)->lpVtbl -> SetFeatureMask(This,Mask) ) + +#define ID3D12DebugCommandList2_GetFeatureMask(This) \ + ( (This)->lpVtbl -> GetFeatureMask(This) ) + + +#define ID3D12DebugCommandList2_SetDebugParameter(This,Type,pData,DataSize) \ + ( (This)->lpVtbl -> SetDebugParameter(This,Type,pData,DataSize) ) + +#define ID3D12DebugCommandList2_GetDebugParameter(This,Type,pData,DataSize) \ + ( (This)->lpVtbl -> GetDebugParameter(This,Type,pData,DataSize) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12DebugCommandList2_INTERFACE_DEFINED__ */ + + +#ifndef __ID3D12SharingContract_INTERFACE_DEFINED__ +#define __ID3D12SharingContract_INTERFACE_DEFINED__ + +/* interface ID3D12SharingContract */ +/* [unique][local][object][uuid] */ + + +EXTERN_C const IID IID_ID3D12SharingContract; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0adf7d52-929c-4e61-addb-ffed30de66ef") + ID3D12SharingContract : public IUnknown + { + public: + virtual void STDMETHODCALLTYPE Present( + _In_ ID3D12Resource *pResource, + UINT Subresource, + _In_ HWND window) = 0; + + virtual void STDMETHODCALLTYPE SharedFenceSignal( + _In_ ID3D12Fence *pFence, + UINT64 FenceValue) = 0; + + virtual void STDMETHODCALLTYPE BeginCapturableWork( + _In_ REFGUID guid) = 0; + + virtual void STDMETHODCALLTYPE EndCapturableWork( + _In_ REFGUID guid) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ID3D12SharingContractVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ID3D12SharingContract * This, + REFIID riid, + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ID3D12SharingContract * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ID3D12SharingContract * This); + + void ( STDMETHODCALLTYPE *Present )( + ID3D12SharingContract * This, + _In_ ID3D12Resource *pResource, + UINT Subresource, + _In_ HWND window); + + void ( STDMETHODCALLTYPE *SharedFenceSignal )( + ID3D12SharingContract * This, + _In_ ID3D12Fence *pFence, + UINT64 FenceValue); + + void ( STDMETHODCALLTYPE *BeginCapturableWork )( + ID3D12SharingContract * This, + _In_ REFGUID guid); + + void ( STDMETHODCALLTYPE *EndCapturableWork )( + ID3D12SharingContract * This, + _In_ REFGUID guid); + + END_INTERFACE + } ID3D12SharingContractVtbl; + + interface ID3D12SharingContract + { + CONST_VTBL struct ID3D12SharingContractVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ID3D12SharingContract_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ID3D12SharingContract_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ID3D12SharingContract_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ID3D12SharingContract_Present(This,pResource,Subresource,window) \ + ( (This)->lpVtbl -> Present(This,pResource,Subresource,window) ) + +#define ID3D12SharingContract_SharedFenceSignal(This,pFence,FenceValue) \ + ( (This)->lpVtbl -> SharedFenceSignal(This,pFence,FenceValue) ) + +#define ID3D12SharingContract_BeginCapturableWork(This,guid) \ + ( (This)->lpVtbl -> BeginCapturableWork(This,guid) ) + +#define ID3D12SharingContract_EndCapturableWork(This,guid) \ + ( (This)->lpVtbl -> EndCapturableWork(This,guid) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ID3D12SharingContract_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_d3d12sdklayers_0000_0012 */ /* [local] */ typedef @@ -2087,7 +2577,154 @@ enum D3D12_MESSAGE_ID D3D12_MESSAGE_ID_DESTROY_VIDEOPROCESSSTREAM = ( D3D12_MESSAGE_ID_DESTROY_VIDEOPROCESSOR + 1 ) , D3D12_MESSAGE_ID_PROCESS_FRAME_INVALID_PARAMETERS = ( D3D12_MESSAGE_ID_DESTROY_VIDEOPROCESSSTREAM + 1 ) , D3D12_MESSAGE_ID_COPY_INVALIDLAYOUT = ( D3D12_MESSAGE_ID_PROCESS_FRAME_INVALID_PARAMETERS + 1 ) , - D3D12_MESSAGE_ID_D3D12_MESSAGES_END = ( D3D12_MESSAGE_ID_COPY_INVALIDLAYOUT + 1 ) + D3D12_MESSAGE_ID_CREATE_CRYPTO_SESSION = 1068, + D3D12_MESSAGE_ID_CREATE_CRYPTO_SESSION_POLICY = 1069, + D3D12_MESSAGE_ID_CREATE_PROTECTED_RESOURCE_SESSION = 1070, + D3D12_MESSAGE_ID_LIVE_CRYPTO_SESSION = 1071, + D3D12_MESSAGE_ID_LIVE_CRYPTO_SESSION_POLICY = 1072, + D3D12_MESSAGE_ID_LIVE_PROTECTED_RESOURCE_SESSION = 1073, + D3D12_MESSAGE_ID_DESTROY_CRYPTO_SESSION = 1074, + D3D12_MESSAGE_ID_DESTROY_CRYPTO_SESSION_POLICY = 1075, + D3D12_MESSAGE_ID_DESTROY_PROTECTED_RESOURCE_SESSION = 1076, + D3D12_MESSAGE_ID_PROTECTED_RESOURCE_SESSION_UNSUPPORTED = 1077, + D3D12_MESSAGE_ID_FENCE_INVALIDOPERATION = 1078, + D3D12_MESSAGE_ID_CREATEQUERY_HEAP_COPY_QUEUE_TIMESTAMPS_NOT_SUPPORTED = 1079, + D3D12_MESSAGE_ID_SAMPLEPOSITIONS_MISMATCH_DEFERRED = 1080, + D3D12_MESSAGE_ID_SAMPLEPOSITIONS_MISMATCH_RECORDTIME_ASSUMEDFROMFIRSTUSE = 1081, + D3D12_MESSAGE_ID_SAMPLEPOSITIONS_MISMATCH_RECORDTIME_ASSUMEDFROMCLEAR = 1082, + D3D12_MESSAGE_ID_CREATE_VIDEODECODERHEAP = 1083, + D3D12_MESSAGE_ID_LIVE_VIDEODECODERHEAP = 1084, + D3D12_MESSAGE_ID_DESTROY_VIDEODECODERHEAP = 1085, + D3D12_MESSAGE_ID_OPENEXISTINGHEAP_INVALIDARG_RETURN = 1086, + D3D12_MESSAGE_ID_OPENEXISTINGHEAP_OUTOFMEMORY_RETURN = 1087, + D3D12_MESSAGE_ID_OPENEXISTINGHEAP_INVALIDADDRESS = 1088, + D3D12_MESSAGE_ID_OPENEXISTINGHEAP_INVALIDHANDLE = 1089, + D3D12_MESSAGE_ID_WRITEBUFFERIMMEDIATE_INVALID_DEST = 1090, + D3D12_MESSAGE_ID_WRITEBUFFERIMMEDIATE_INVALID_MODE = 1091, + D3D12_MESSAGE_ID_WRITEBUFFERIMMEDIATE_INVALID_ALIGNMENT = 1092, + D3D12_MESSAGE_ID_WRITEBUFFERIMMEDIATE_NOT_SUPPORTED = 1093, + D3D12_MESSAGE_ID_SETVIEWINSTANCEMASK_INVALIDARGS = 1094, + D3D12_MESSAGE_ID_VIEW_INSTANCING_UNSUPPORTED = 1095, + D3D12_MESSAGE_ID_VIEW_INSTANCING_INVALIDARGS = 1096, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_MISMATCH_DECODE_REFERENCE_ONLY_FLAG = 1097, + D3D12_MESSAGE_ID_COPYRESOURCE_MISMATCH_DECODE_REFERENCE_ONLY_FLAG = 1098, + D3D12_MESSAGE_ID_CREATE_VIDEO_DECODE_HEAP_CAPS_FAILURE = 1099, + D3D12_MESSAGE_ID_CREATE_VIDEO_DECODE_HEAP_CAPS_UNSUPPORTED = 1100, + D3D12_MESSAGE_ID_VIDEO_DECODE_SUPPORT_INVALID_INPUT = 1101, + D3D12_MESSAGE_ID_CREATE_VIDEO_DECODER_UNSUPPORTED = 1102, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_METADATA_ERROR = 1103, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_VIEW_INSTANCING_VERTEX_SIZE_EXCEEDED = 1104, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_RUNTIME_INTERNAL_ERROR = 1105, + D3D12_MESSAGE_ID_NO_VIDEO_API_SUPPORT = 1106, + D3D12_MESSAGE_ID_VIDEO_PROCESS_SUPPORT_INVALID_INPUT = 1107, + D3D12_MESSAGE_ID_CREATE_VIDEO_PROCESSOR_CAPS_FAILURE = 1108, + D3D12_MESSAGE_ID_VIDEO_PROCESS_SUPPORT_UNSUPPORTED_FORMAT = 1109, + D3D12_MESSAGE_ID_VIDEO_DECODE_FRAME_INVALID_ARGUMENT = 1110, + D3D12_MESSAGE_ID_ENQUEUE_MAKE_RESIDENT_INVALID_FLAGS = 1111, + D3D12_MESSAGE_ID_OPENEXISTINGHEAP_UNSUPPORTED = 1112, + D3D12_MESSAGE_ID_VIDEO_PROCESS_FRAMES_INVALID_ARGUMENT = 1113, + D3D12_MESSAGE_ID_VIDEO_DECODE_SUPPORT_UNSUPPORTED = 1114, + D3D12_MESSAGE_ID_CREATE_COMMANDRECORDER = 1115, + D3D12_MESSAGE_ID_LIVE_COMMANDRECORDER = 1116, + D3D12_MESSAGE_ID_DESTROY_COMMANDRECORDER = 1117, + D3D12_MESSAGE_ID_CREATE_COMMAND_RECORDER_VIDEO_NOT_SUPPORTED = 1118, + D3D12_MESSAGE_ID_CREATE_COMMAND_RECORDER_INVALID_SUPPORT_FLAGS = 1119, + D3D12_MESSAGE_ID_CREATE_COMMAND_RECORDER_INVALID_FLAGS = 1120, + D3D12_MESSAGE_ID_CREATE_COMMAND_RECORDER_MORE_RECORDERS_THAN_LOGICAL_PROCESSORS = 1121, + D3D12_MESSAGE_ID_CREATE_COMMANDPOOL = 1122, + D3D12_MESSAGE_ID_LIVE_COMMANDPOOL = 1123, + D3D12_MESSAGE_ID_DESTROY_COMMANDPOOL = 1124, + D3D12_MESSAGE_ID_CREATE_COMMAND_POOL_INVALID_FLAGS = 1125, + D3D12_MESSAGE_ID_CREATE_COMMAND_LIST_VIDEO_NOT_SUPPORTED = 1126, + D3D12_MESSAGE_ID_COMMAND_RECORDER_SUPPORT_FLAGS_MISMATCH = 1127, + D3D12_MESSAGE_ID_COMMAND_RECORDER_CONTENTION = 1128, + D3D12_MESSAGE_ID_COMMAND_RECORDER_USAGE_WITH_CREATECOMMANDLIST_COMMAND_LIST = 1129, + D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_USAGE_WITH_CREATECOMMANDLIST1_COMMAND_LIST = 1130, + D3D12_MESSAGE_ID_CANNOT_EXECUTE_EMPTY_COMMAND_LIST = 1131, + D3D12_MESSAGE_ID_CANNOT_RESET_COMMAND_POOL_WITH_OPEN_COMMAND_LISTS = 1132, + D3D12_MESSAGE_ID_CANNOT_USE_COMMAND_RECORDER_WITHOUT_CURRENT_TARGET = 1133, + D3D12_MESSAGE_ID_CANNOT_CHANGE_COMMAND_RECORDER_TARGET_WHILE_RECORDING = 1134, + D3D12_MESSAGE_ID_COMMAND_POOL_SYNC = 1135, + D3D12_MESSAGE_ID_EVICT_UNDERFLOW = 1136, + D3D12_MESSAGE_ID_CREATE_META_COMMAND = 1137, + D3D12_MESSAGE_ID_LIVE_META_COMMAND = 1138, + D3D12_MESSAGE_ID_DESTROY_META_COMMAND = 1139, + D3D12_MESSAGE_ID_COPYBUFFERREGION_INVALID_DST_RESOURCE = 1140, + D3D12_MESSAGE_ID_COPYBUFFERREGION_INVALID_SRC_RESOURCE = 1141, + D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_INVALID_DST_RESOURCE = 1142, + D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_INVALID_SRC_RESOURCE = 1143, + D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_NULL_BUFFER = 1144, + D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_NULL_RESOURCE_DESC = 1145, + D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_UNSUPPORTED = 1146, + D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_INVALID_BUFFER_DIMENSION = 1147, + D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_INVALID_BUFFER_FLAGS = 1148, + D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_INVALID_BUFFER_OFFSET = 1149, + D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_INVALID_RESOURCE_DIMENSION = 1150, + D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_INVALID_RESOURCE_FLAGS = 1151, + D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_OUTOFMEMORY_RETURN = 1152, + D3D12_MESSAGE_ID_CANNOT_CREATE_GRAPHICS_AND_VIDEO_COMMAND_RECORDER = 1153, + D3D12_MESSAGE_ID_UPDATETILEMAPPINGS_POSSIBLY_MISMATCHING_PROPERTIES = 1154, + D3D12_MESSAGE_ID_CREATE_COMMAND_LIST_INVALID_COMMAND_LIST_TYPE = 1155, + D3D12_MESSAGE_ID_CLEARUNORDEREDACCESSVIEW_INCOMPATIBLE_WITH_STRUCTURED_BUFFERS = 1156, + D3D12_MESSAGE_ID_COMPUTE_ONLY_DEVICE_OPERATION_UNSUPPORTED = 1157, + D3D12_MESSAGE_ID_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INVALID = 1158, + D3D12_MESSAGE_ID_EMIT_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_INVALID = 1159, + D3D12_MESSAGE_ID_COPY_RAYTRACING_ACCELERATION_STRUCTURE_INVALID = 1160, + D3D12_MESSAGE_ID_DISPATCH_RAYS_INVALID = 1161, + D3D12_MESSAGE_ID_GET_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO_INVALID = 1162, + D3D12_MESSAGE_ID_CREATE_LIFETIMETRACKER = 1163, + D3D12_MESSAGE_ID_LIVE_LIFETIMETRACKER = 1164, + D3D12_MESSAGE_ID_DESTROY_LIFETIMETRACKER = 1165, + D3D12_MESSAGE_ID_DESTROYOWNEDOBJECT_OBJECTNOTOWNED = 1166, + D3D12_MESSAGE_ID_CREATE_TRACKEDWORKLOAD = 1167, + D3D12_MESSAGE_ID_LIVE_TRACKEDWORKLOAD = 1168, + D3D12_MESSAGE_ID_DESTROY_TRACKEDWORKLOAD = 1169, + D3D12_MESSAGE_ID_RENDER_PASS_ERROR = 1170, + D3D12_MESSAGE_ID_META_COMMAND_ID_INVALID = 1171, + D3D12_MESSAGE_ID_META_COMMAND_UNSUPPORTED_PARAMS = 1172, + D3D12_MESSAGE_ID_META_COMMAND_FAILED_ENUMERATION = 1173, + D3D12_MESSAGE_ID_META_COMMAND_PARAMETER_SIZE_MISMATCH = 1174, + D3D12_MESSAGE_ID_UNINITIALIZED_META_COMMAND = 1175, + D3D12_MESSAGE_ID_META_COMMAND_INVALID_GPU_VIRTUAL_ADDRESS = 1176, + D3D12_MESSAGE_ID_CREATE_VIDEOENCODECOMMANDLIST = 1177, + D3D12_MESSAGE_ID_LIVE_VIDEOENCODECOMMANDLIST = 1178, + D3D12_MESSAGE_ID_DESTROY_VIDEOENCODECOMMANDLIST = 1179, + D3D12_MESSAGE_ID_CREATE_VIDEOENCODECOMMANDQUEUE = 1180, + D3D12_MESSAGE_ID_LIVE_VIDEOENCODECOMMANDQUEUE = 1181, + D3D12_MESSAGE_ID_DESTROY_VIDEOENCODECOMMANDQUEUE = 1182, + D3D12_MESSAGE_ID_CREATE_VIDEOMOTIONESTIMATOR = 1183, + D3D12_MESSAGE_ID_LIVE_VIDEOMOTIONESTIMATOR = 1184, + D3D12_MESSAGE_ID_DESTROY_VIDEOMOTIONESTIMATOR = 1185, + D3D12_MESSAGE_ID_CREATE_VIDEOMOTIONVECTORHEAP = 1186, + D3D12_MESSAGE_ID_LIVE_VIDEOMOTIONVECTORHEAP = 1187, + D3D12_MESSAGE_ID_DESTROY_VIDEOMOTIONVECTORHEAP = 1188, + D3D12_MESSAGE_ID_MULTIPLE_TRACKED_WORKLOADS = 1189, + D3D12_MESSAGE_ID_MULTIPLE_TRACKED_WORKLOAD_PAIRS = 1190, + D3D12_MESSAGE_ID_OUT_OF_ORDER_TRACKED_WORKLOAD_PAIR = 1191, + D3D12_MESSAGE_ID_CANNOT_ADD_TRACKED_WORKLOAD = 1192, + D3D12_MESSAGE_ID_INCOMPLETE_TRACKED_WORKLOAD_PAIR = 1193, + D3D12_MESSAGE_ID_CREATE_STATE_OBJECT_ERROR = 1194, + D3D12_MESSAGE_ID_GET_SHADER_IDENTIFIER_ERROR = 1195, + D3D12_MESSAGE_ID_GET_SHADER_STACK_SIZE_ERROR = 1196, + D3D12_MESSAGE_ID_GET_PIPELINE_STACK_SIZE_ERROR = 1197, + D3D12_MESSAGE_ID_SET_PIPELINE_STACK_SIZE_ERROR = 1198, + D3D12_MESSAGE_ID_GET_SHADER_IDENTIFIER_SIZE_INVALID = 1199, + D3D12_MESSAGE_ID_CHECK_DRIVER_MATCHING_IDENTIFIER_INVALID = 1200, + D3D12_MESSAGE_ID_CHECK_DRIVER_MATCHING_IDENTIFIER_DRIVER_REPORTED_ISSUE = 1201, + D3D12_MESSAGE_ID_RENDER_PASS_INVALID_RESOURCE_BARRIER = 1202, + D3D12_MESSAGE_ID_RENDER_PASS_DISALLOWED_API_CALLED = 1203, + D3D12_MESSAGE_ID_RENDER_PASS_CANNOT_NEST_RENDER_PASSES = 1204, + D3D12_MESSAGE_ID_RENDER_PASS_CANNOT_END_WITHOUT_BEGIN = 1205, + D3D12_MESSAGE_ID_RENDER_PASS_CANNOT_CLOSE_COMMAND_LIST = 1206, + D3D12_MESSAGE_ID_RENDER_PASS_GPU_WORK_WHILE_SUSPENDED = 1207, + D3D12_MESSAGE_ID_RENDER_PASS_MISMATCHING_SUSPEND_RESUME = 1208, + D3D12_MESSAGE_ID_RENDER_PASS_NO_PRIOR_SUSPEND_WITHIN_EXECUTECOMMANDLISTS = 1209, + D3D12_MESSAGE_ID_RENDER_PASS_NO_SUBSEQUENT_RESUME_WITHIN_EXECUTECOMMANDLISTS = 1210, + D3D12_MESSAGE_ID_TRACKED_WORKLOAD_COMMAND_QUEUE_MISMATCH = 1211, + D3D12_MESSAGE_ID_TRACKED_WORKLOAD_NOT_SUPPORTED = 1212, + D3D12_MESSAGE_ID_RENDER_PASS_MISMATCHING_NO_ACCESS = 1213, + D3D12_MESSAGE_ID_RENDER_PASS_UNSUPPORTED_RESOLVE = 1214, + D3D12_MESSAGE_ID_D3D12_MESSAGES_END = ( D3D12_MESSAGE_ID_RENDER_PASS_UNSUPPORTED_RESOLVE + 1 ) } D3D12_MESSAGE_ID; static_assert(D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_UNSUPPORTED == 1000, "Publicly released SDK D3D12_MESSAGE_ID enum values must not be changed. New enum values must be added to the end of the list."); @@ -2120,8 +2757,8 @@ typedef struct D3D12_INFO_QUEUE_FILTER #define D3D12_INFO_QUEUE_DEFAULT_MESSAGE_COUNT_LIMIT 1024 -extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0008_v0_0_c_ifspec; -extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0008_v0_0_s_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0012_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0012_v0_0_s_ifspec; #ifndef __ID3D12InfoQueue_INTERFACE_DEFINED__ #define __ID3D12InfoQueue_INTERFACE_DEFINED__ @@ -2528,22 +3165,28 @@ EXTERN_C const IID IID_ID3D12InfoQueue; #endif /* __ID3D12InfoQueue_INTERFACE_DEFINED__ */ -/* interface __MIDL_itf_d3d12sdklayers_0000_0009 */ +/* interface __MIDL_itf_d3d12sdklayers_0000_0013 */ /* [local] */ +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +#pragma endregion DEFINE_GUID(IID_ID3D12Debug,0x344488b7,0x6846,0x474b,0xb9,0x89,0xf0,0x27,0x44,0x82,0x45,0xe0); DEFINE_GUID(IID_ID3D12Debug1,0xaffaa4ca,0x63fe,0x4d8e,0xb8,0xad,0x15,0x90,0x00,0xaf,0x43,0x04); DEFINE_GUID(IID_ID3D12Debug2,0x93a665c4,0xa3b2,0x4e5d,0xb6,0x92,0xa2,0x6a,0xe1,0x4e,0x33,0x74); +DEFINE_GUID(IID_ID3D12Debug3,0x5cf4e58f,0xf671,0x4ff1,0xa5,0x42,0x36,0x86,0xe3,0xd1,0x53,0xd1); DEFINE_GUID(IID_ID3D12DebugDevice1,0xa9b71770,0xd099,0x4a65,0xa6,0x98,0x3d,0xee,0x10,0x02,0x0f,0x88); DEFINE_GUID(IID_ID3D12DebugDevice,0x3febd6dd,0x4973,0x4787,0x81,0x94,0xe4,0x5f,0x9e,0x28,0x92,0x3e); +DEFINE_GUID(IID_ID3D12DebugDevice2,0x60eccbc1,0x378d,0x4df1,0x89,0x4c,0xf8,0xac,0x5c,0xe4,0xd7,0xdd); DEFINE_GUID(IID_ID3D12DebugCommandQueue,0x09e0bf36,0x54ac,0x484f,0x88,0x47,0x4b,0xae,0xea,0xb6,0x05,0x3a); DEFINE_GUID(IID_ID3D12DebugCommandList1,0x102ca951,0x311b,0x4b01,0xb1,0x1f,0xec,0xb8,0x3e,0x06,0x1b,0x37); DEFINE_GUID(IID_ID3D12DebugCommandList,0x09e0bf36,0x54ac,0x484f,0x88,0x47,0x4b,0xae,0xea,0xb6,0x05,0x3f); +DEFINE_GUID(IID_ID3D12DebugCommandList2,0xaeb575cf,0x4e06,0x48be,0xba,0x3b,0xc4,0x50,0xfc,0x96,0x65,0x2e); +DEFINE_GUID(IID_ID3D12SharingContract,0x0adf7d52,0x929c,0x4e61,0xad,0xdb,0xff,0xed,0x30,0xde,0x66,0xef); DEFINE_GUID(IID_ID3D12InfoQueue,0x0742a90b,0xc387,0x483f,0xb9,0x46,0x30,0xa7,0xe4,0xe6,0x14,0x58); -extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0009_v0_0_c_ifspec; -extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0009_v0_0_s_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0013_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0013_v0_0_s_ifspec; /* Additional Prototypes for ALL interfaces */ diff --git a/3rdparty/bgfx/3rdparty/dxsdk/include/d3d12video.h b/3rdparty/bgfx/3rdparty/dxsdk/include/d3d12video.h index 0a84cc5261..e7582bd528 100644 --- a/3rdparty/bgfx/3rdparty/dxsdk/include/d3d12video.h +++ b/3rdparty/bgfx/3rdparty/dxsdk/include/d3d12video.h @@ -425,6 +425,10 @@ EXTERN_C const IID IID_ID3D12VideoDecoderHeap; + + + + #endif /* __ID3D12VideoDecoderHeap_INTERFACE_DEFINED__ */ @@ -677,6 +681,10 @@ EXTERN_C const IID IID_ID3D12VideoDecoder; + + + + #endif /* __ID3D12VideoDecoder_INTERFACE_DEFINED__ */ @@ -1078,6 +1086,10 @@ EXTERN_C const IID IID_ID3D12VideoProcessor; + + + + #endif /* __ID3D12VideoProcessor_INTERFACE_DEFINED__ */ diff --git a/3rdparty/bgfx/3rdparty/dxsdk/include/d3dcompiler.h b/3rdparty/bgfx/3rdparty/dxsdk/include/d3dcompiler.h index 917eb746e1..96574d08f4 100644 --- a/3rdparty/bgfx/3rdparty/dxsdk/include/d3dcompiler.h +++ b/3rdparty/bgfx/3rdparty/dxsdk/include/d3dcompiler.h @@ -10,6 +10,7 @@ #ifndef __D3DCOMPILER_H__ #define __D3DCOMPILER_H__ +#include // Current name of the DLL shipped in the same SDK as this header. @@ -40,6 +41,8 @@ extern "C" { #endif //__cplusplus +#pragma region Application Family +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) //---------------------------------------------------------------------------- // D3DReadFileToBlob: @@ -123,6 +126,16 @@ D3DWriteBlobToFile(_In_ ID3DBlob* pBlob, // D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY // This enables older shaders to compile to 4_0 targets. // +// D3DCOMPILE_DEBUG_NAME_FOR_SOURCE +// This enables a debug name to be generated based on source information. +// It requires D3DCOMPILE_DEBUG to be set, and is exclusive with +// D3DCOMPILE_DEBUG_NAME_FOR_BINARY. +// +// D3DCOMPILE_DEBUG_NAME_FOR_BINARY +// This enables a debug name to be generated based on compiled information. +// It requires D3DCOMPILE_DEBUG to be set, and is exclusive with +// D3DCOMPILE_DEBUG_NAME_FOR_SOURCE. +// //---------------------------------------------------------------------------- #define D3DCOMPILE_DEBUG (1 << 0) @@ -149,6 +162,8 @@ D3DWriteBlobToFile(_In_ ID3DBlob* pBlob, #define D3DCOMPILE_RESOURCES_MAY_ALIAS (1 << 19) #define D3DCOMPILE_ENABLE_UNBOUNDED_DESCRIPTOR_TABLES (1 << 20) #define D3DCOMPILE_ALL_RESOURCES_BOUND (1 << 21) +#define D3DCOMPILE_DEBUG_NAME_FOR_SOURCE (1 << 22) +#define D3DCOMPILE_DEBUG_NAME_FOR_BINARY (1 << 23) //---------------------------------------------------------------------------- // D3DCOMPILE_EFFECT flags: @@ -463,6 +478,7 @@ typedef enum D3D_BLOB_PART D3D_BLOB_PDB, D3D_BLOB_PRIVATE_DATA, D3D_BLOB_ROOT_SIGNATURE, + D3D_BLOB_DEBUG_NAME, // Test parts are only produced by special compiler versions and so // are usually not present in shaders. @@ -540,8 +556,12 @@ D3DDecompressShaders(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, _Out_writes_(uNumShaders) ID3DBlob** ppShaders, _Out_opt_ UINT* pTotalShaders); +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +#pragma endregion +#pragma region Desktop Family +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) //---------------------------------------------------------------------------- // D3DDisassemble10Effect: @@ -555,6 +575,8 @@ D3DDisassemble10Effect(_In_ interface ID3D10Effect *pEffect, _In_ UINT Flags, _Out_ ID3DBlob** ppDisassembly); +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +#pragma endregion #ifdef __cplusplus diff --git a/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_2.h b/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_2.h index fe3430f9aa..b855f80a6d 100644 --- a/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_2.h +++ b/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_2.h @@ -113,6 +113,9 @@ extern "C"{ /* interface __MIDL_itf_dxgi1_2_0000_0000 */ /* [local] */ +#include +#pragma region Desktop Family +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0000_v0_0_c_ifspec; @@ -503,6 +506,10 @@ EXTERN_C const IID IID_IDXGIOutputDuplication; /* interface __MIDL_itf_dxgi1_2_0000_0002 */ /* [local] */ +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +#pragma endregion +#pragma region App Family +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) typedef enum DXGI_ALPHA_MODE { @@ -2439,6 +2446,8 @@ EXTERN_C const IID IID_IDXGIOutput1; /* interface __MIDL_itf_dxgi1_2_0000_0009 */ /* [local] */ +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +#pragma endregion DEFINE_GUID(IID_IDXGIDisplayControl,0xea9dbf1a,0xc88e,0x4486,0x85,0x4a,0x98,0xaa,0x01,0x38,0xf3,0x0c); DEFINE_GUID(IID_IDXGIOutputDuplication,0x191cfac3,0xa341,0x470d,0xb2,0x6e,0xa8,0x64,0xf4,0x28,0x31,0x9c); DEFINE_GUID(IID_IDXGISurface2,0xaba496dd,0xb617,0x4cb8,0xa8,0x66,0xbc,0x44,0xd7,0xeb,0x1f,0xa2); diff --git a/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_3.h b/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_3.h index 85a3394f4c..6a9462dcd2 100644 --- a/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_3.h +++ b/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_3.h @@ -106,6 +106,9 @@ extern "C"{ /* interface __MIDL_itf_dxgi1_3_0000_0000 */ /* [local] */ +#include +#pragma region App Family +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) #define DXGI_CREATE_FACTORY_DEBUG 0x1 HRESULT WINAPI CreateDXGIFactory2(UINT Flags, REFIID riid, _COM_Outptr_ void **ppFactory); HRESULT WINAPI DXGIGetDebugInterface1(UINT Flags, REFIID riid, _COM_Outptr_ void **pDebug); @@ -1318,6 +1321,10 @@ EXTERN_C const IID IID_IDXGIFactory3; /* interface __MIDL_itf_dxgi1_3_0000_0004 */ /* [local] */ +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +#pragma endregion +#pragma region App Family +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) typedef struct DXGI_DECODE_SWAP_CHAIN_DESC { UINT Flags; @@ -1788,6 +1795,10 @@ enum DXGI_OVERLAY_SUPPORT_FLAG DXGI_OVERLAY_SUPPORT_FLAG_SCALING = 0x2 } DXGI_OVERLAY_SUPPORT_FLAG; +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ +#pragma endregion +#pragma region App Family +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0007_v0_0_c_ifspec; @@ -2082,6 +2093,8 @@ EXTERN_C const IID IID_IDXGIOutput3; /* interface __MIDL_itf_dxgi1_3_0000_0008 */ /* [local] */ +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +#pragma endregion DEFINE_GUID(IID_IDXGIDevice3,0x6007896c,0x3244,0x4afd,0xbf,0x18,0xa6,0xd3,0xbe,0xda,0x50,0x23); DEFINE_GUID(IID_IDXGISwapChain2,0xa8be2ac4,0x199f,0x4946,0xb3,0x31,0x79,0x59,0x9f,0xb9,0x8d,0xe7); DEFINE_GUID(IID_IDXGIOutput2,0x595e39d1,0x2724,0x4663,0x99,0xb1,0xda,0x96,0x9d,0xe2,0x83,0x64); diff --git a/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_4.h b/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_4.h index dad3874d7c..5ff289c0eb 100644 --- a/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_4.h +++ b/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_4.h @@ -78,6 +78,9 @@ extern "C"{ /* interface __MIDL_itf_dxgi1_4_0000_0000 */ /* [local] */ +#include +#pragma region App Family +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) typedef enum DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG { @@ -1467,6 +1470,8 @@ EXTERN_C const IID IID_IDXGIAdapter3; /* interface __MIDL_itf_dxgi1_4_0000_0004 */ /* [local] */ +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +#pragma endregion DEFINE_GUID(IID_IDXGISwapChain3,0x94d99bdb,0xf1f8,0x4ab0,0xb2,0x36,0x7d,0xa0,0x17,0x0e,0xda,0xb1); DEFINE_GUID(IID_IDXGIOutput4,0xdc7dca35,0x2196,0x414d,0x9F,0x53,0x61,0x78,0x84,0x03,0x2a,0x60); DEFINE_GUID(IID_IDXGIFactory4,0x1bc6ea02,0xef36,0x464f,0xbf,0x0c,0x21,0xca,0x39,0xe5,0x16,0x8a); diff --git a/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_5.h b/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_5.h index 53da393157..1fd6267420 100644 --- a/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_5.h +++ b/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_5.h @@ -78,6 +78,9 @@ extern "C"{ /* interface __MIDL_itf_dxgi1_5_0000_0000 */ /* [local] */ +#include +#pragma region App Family +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) typedef enum DXGI_OUTDUPL_FLAG { @@ -416,7 +419,8 @@ typedef enum DXGI_HDR_METADATA_TYPE { DXGI_HDR_METADATA_TYPE_NONE = 0, - DXGI_HDR_METADATA_TYPE_HDR10 = 1 + DXGI_HDR_METADATA_TYPE_HDR10 = 1, + DXGI_HDR_METADATA_TYPE_HDR10PLUS = 2 } DXGI_HDR_METADATA_TYPE; typedef struct DXGI_HDR_METADATA_HDR10 @@ -431,6 +435,11 @@ typedef struct DXGI_HDR_METADATA_HDR10 UINT16 MaxFrameAverageLightLevel; } DXGI_HDR_METADATA_HDR10; +typedef struct DXGI_HDR_METADATA_HDR10PLUS + { + BYTE Data[ 72 ]; + } DXGI_HDR_METADATA_HDR10PLUS; + extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0001_v0_0_c_ifspec; @@ -1512,6 +1521,8 @@ EXTERN_C const IID IID_IDXGIFactory5; /* interface __MIDL_itf_dxgi1_5_0000_0004 */ /* [local] */ +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +#pragma endregion DEFINE_GUID(IID_IDXGIOutput5,0x80A07424,0xAB52,0x42EB,0x83,0x3C,0x0C,0x42,0xFD,0x28,0x2D,0x98); DEFINE_GUID(IID_IDXGISwapChain4,0x3D585D5A,0xBD4A,0x489E,0xB1,0xF4,0x3D,0xBC,0xB6,0x45,0x2F,0xFB); DEFINE_GUID(IID_IDXGIDevice4,0x95B4F95F,0xD8DA,0x4CA4,0x9E,0xE6,0x3B,0x76,0xD5,0x96,0x8A,0x10); diff --git a/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_6.h b/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_6.h index cbee3d316e..16492f06af 100644 --- a/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_6.h +++ b/3rdparty/bgfx/3rdparty/dxsdk/include/dxgi1_6.h @@ -53,6 +53,20 @@ typedef interface IDXGIOutput6 IDXGIOutput6; #endif /* __IDXGIOutput6_FWD_DEFINED__ */ +#ifndef __IDXGIFactory6_FWD_DEFINED__ +#define __IDXGIFactory6_FWD_DEFINED__ +typedef interface IDXGIFactory6 IDXGIFactory6; + +#endif /* __IDXGIFactory6_FWD_DEFINED__ */ + + +#ifndef __IDXGIFactory7_FWD_DEFINED__ +#define __IDXGIFactory7_FWD_DEFINED__ +typedef interface IDXGIFactory7 IDXGIFactory7; + +#endif /* __IDXGIFactory7_FWD_DEFINED__ */ + + /* header files for imported files */ #include "dxgi1_5.h" @@ -65,6 +79,10 @@ extern "C"{ /* [local] */ // Copyright (c) Microsoft Corporation. All Rights Reserved +#include +#pragma region App Family +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) +HRESULT WINAPI DXGIDeclareAdapterRemovalSupport(); typedef enum DXGI_ADAPTER_FLAG3 { @@ -72,6 +90,9 @@ enum DXGI_ADAPTER_FLAG3 DXGI_ADAPTER_FLAG3_REMOTE = 1, DXGI_ADAPTER_FLAG3_SOFTWARE = 2, DXGI_ADAPTER_FLAG3_ACG_COMPATIBLE = 4, + DXGI_ADAPTER_FLAG3_SUPPORT_MONITORED_FENCES = 8, + DXGI_ADAPTER_FLAG3_SUPPORT_NON_MONITORED_FENCES = 0x10, + DXGI_ADAPTER_FLAG3_KEYED_MUTEX_CONFORMANCE = 0x20, DXGI_ADAPTER_FLAG3_FORCE_DWORD = 0xffffffff } DXGI_ADAPTER_FLAG3; @@ -702,13 +723,786 @@ EXTERN_C const IID IID_IDXGIOutput6; /* interface __MIDL_itf_dxgi1_6_0000_0002 */ /* [local] */ -DEFINE_GUID(IID_IDXGIAdapter4,0x3c8d99d1,0x4fbf,0x4181,0xa8,0x2c,0xaf,0x66,0xbf,0x7b,0xd2,0x4e); -DEFINE_GUID(IID_IDXGIOutput6,0x068346e8,0xaaec,0x4b84,0xad,0xd7,0x13,0x7f,0x51,0x3f,0x77,0xa1); +typedef +enum DXGI_GPU_PREFERENCE + { + DXGI_GPU_PREFERENCE_UNSPECIFIED = 0, + DXGI_GPU_PREFERENCE_MINIMUM_POWER = ( DXGI_GPU_PREFERENCE_UNSPECIFIED + 1 ) , + DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE = ( DXGI_GPU_PREFERENCE_MINIMUM_POWER + 1 ) + } DXGI_GPU_PREFERENCE; + extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0002_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0002_v0_0_s_ifspec; +#ifndef __IDXGIFactory6_INTERFACE_DEFINED__ +#define __IDXGIFactory6_INTERFACE_DEFINED__ + +/* interface IDXGIFactory6 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIFactory6; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("c1b6694f-ff09-44a9-b03c-77900a0a1d17") + IDXGIFactory6 : public IDXGIFactory5 + { + public: + virtual HRESULT STDMETHODCALLTYPE EnumAdapterByGpuPreference( + /* [annotation] */ + _In_ UINT Adapter, + /* [annotation] */ + _In_ DXGI_GPU_PREFERENCE GpuPreference, + /* [annotation] */ + _In_ REFIID riid, + /* [annotation] */ + _COM_Outptr_ void **ppvAdapter) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIFactory6Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIFactory6 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIFactory6 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIFactory6 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIFactory6 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIFactory6 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIFactory6 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIFactory6 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapters )( + IDXGIFactory6 * This, + /* [in] */ UINT Adapter, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter); + + HRESULT ( STDMETHODCALLTYPE *MakeWindowAssociation )( + IDXGIFactory6 * This, + HWND WindowHandle, + UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *GetWindowAssociation )( + IDXGIFactory6 * This, + /* [annotation][out] */ + _Out_ HWND *pWindowHandle); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChain )( + IDXGIFactory6 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ DXGI_SWAP_CHAIN_DESC *pDesc, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *CreateSoftwareAdapter )( + IDXGIFactory6 * This, + /* [in] */ HMODULE Module, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapters1 )( + IDXGIFactory6 * This, + /* [in] */ UINT Adapter, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter1 **ppAdapter); + + BOOL ( STDMETHODCALLTYPE *IsCurrent )( + IDXGIFactory6 * This); + + BOOL ( STDMETHODCALLTYPE *IsWindowedStereoEnabled )( + IDXGIFactory6 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForHwnd )( + IDXGIFactory6 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ HWND hWnd, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForCoreWindow )( + IDXGIFactory6 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ IUnknown *pWindow, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *GetSharedResourceAdapterLuid )( + IDXGIFactory6 * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _Out_ LUID *pLuid); + + HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusWindow )( + IDXGIFactory6 * This, + /* [annotation][in] */ + _In_ HWND WindowHandle, + /* [annotation][in] */ + _In_ UINT wMsg, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusEvent )( + IDXGIFactory6 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterStereoStatus )( + IDXGIFactory6 * This, + /* [annotation][in] */ + _In_ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusWindow )( + IDXGIFactory6 * This, + /* [annotation][in] */ + _In_ HWND WindowHandle, + /* [annotation][in] */ + _In_ UINT wMsg, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusEvent )( + IDXGIFactory6 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterOcclusionStatus )( + IDXGIFactory6 * This, + /* [annotation][in] */ + _In_ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForComposition )( + IDXGIFactory6 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + UINT ( STDMETHODCALLTYPE *GetCreationFlags )( + IDXGIFactory6 * This); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapterByLuid )( + IDXGIFactory6 * This, + /* [annotation] */ + _In_ LUID AdapterLuid, + /* [annotation] */ + _In_ REFIID riid, + /* [annotation] */ + _COM_Outptr_ void **ppvAdapter); + + HRESULT ( STDMETHODCALLTYPE *EnumWarpAdapter )( + IDXGIFactory6 * This, + /* [annotation] */ + _In_ REFIID riid, + /* [annotation] */ + _COM_Outptr_ void **ppvAdapter); + + HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( + IDXGIFactory6 * This, + DXGI_FEATURE Feature, + /* [annotation] */ + _Inout_updates_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapterByGpuPreference )( + IDXGIFactory6 * This, + /* [annotation] */ + _In_ UINT Adapter, + /* [annotation] */ + _In_ DXGI_GPU_PREFERENCE GpuPreference, + /* [annotation] */ + _In_ REFIID riid, + /* [annotation] */ + _COM_Outptr_ void **ppvAdapter); + + END_INTERFACE + } IDXGIFactory6Vtbl; + + interface IDXGIFactory6 + { + CONST_VTBL struct IDXGIFactory6Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIFactory6_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIFactory6_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIFactory6_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIFactory6_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIFactory6_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIFactory6_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIFactory6_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIFactory6_EnumAdapters(This,Adapter,ppAdapter) \ + ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) ) + +#define IDXGIFactory6_MakeWindowAssociation(This,WindowHandle,Flags) \ + ( (This)->lpVtbl -> MakeWindowAssociation(This,WindowHandle,Flags) ) + +#define IDXGIFactory6_GetWindowAssociation(This,pWindowHandle) \ + ( (This)->lpVtbl -> GetWindowAssociation(This,pWindowHandle) ) + +#define IDXGIFactory6_CreateSwapChain(This,pDevice,pDesc,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChain(This,pDevice,pDesc,ppSwapChain) ) + +#define IDXGIFactory6_CreateSoftwareAdapter(This,Module,ppAdapter) \ + ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) ) + + +#define IDXGIFactory6_EnumAdapters1(This,Adapter,ppAdapter) \ + ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) ) + +#define IDXGIFactory6_IsCurrent(This) \ + ( (This)->lpVtbl -> IsCurrent(This) ) + + +#define IDXGIFactory6_IsWindowedStereoEnabled(This) \ + ( (This)->lpVtbl -> IsWindowedStereoEnabled(This) ) + +#define IDXGIFactory6_CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) ) + +#define IDXGIFactory6_CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) ) + +#define IDXGIFactory6_GetSharedResourceAdapterLuid(This,hResource,pLuid) \ + ( (This)->lpVtbl -> GetSharedResourceAdapterLuid(This,hResource,pLuid) ) + +#define IDXGIFactory6_RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) \ + ( (This)->lpVtbl -> RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) ) + +#define IDXGIFactory6_RegisterStereoStatusEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterStereoStatusEvent(This,hEvent,pdwCookie) ) + +#define IDXGIFactory6_UnregisterStereoStatus(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterStereoStatus(This,dwCookie) ) + +#define IDXGIFactory6_RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) \ + ( (This)->lpVtbl -> RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) ) + +#define IDXGIFactory6_RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) ) + +#define IDXGIFactory6_UnregisterOcclusionStatus(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterOcclusionStatus(This,dwCookie) ) + +#define IDXGIFactory6_CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) ) + + +#define IDXGIFactory6_GetCreationFlags(This) \ + ( (This)->lpVtbl -> GetCreationFlags(This) ) + + +#define IDXGIFactory6_EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter) \ + ( (This)->lpVtbl -> EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter) ) + +#define IDXGIFactory6_EnumWarpAdapter(This,riid,ppvAdapter) \ + ( (This)->lpVtbl -> EnumWarpAdapter(This,riid,ppvAdapter) ) + + +#define IDXGIFactory6_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) \ + ( (This)->lpVtbl -> CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) ) + + +#define IDXGIFactory6_EnumAdapterByGpuPreference(This,Adapter,GpuPreference,riid,ppvAdapter) \ + ( (This)->lpVtbl -> EnumAdapterByGpuPreference(This,Adapter,GpuPreference,riid,ppvAdapter) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIFactory6_INTERFACE_DEFINED__ */ + + +#ifndef __IDXGIFactory7_INTERFACE_DEFINED__ +#define __IDXGIFactory7_INTERFACE_DEFINED__ + +/* interface IDXGIFactory7 */ +/* [unique][local][uuid][object] */ + + +EXTERN_C const IID IID_IDXGIFactory7; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("a4966eed-76db-44da-84c1-ee9a7afb20a8") + IDXGIFactory7 : public IDXGIFactory6 + { + public: + virtual HRESULT STDMETHODCALLTYPE RegisterAdaptersChangedEvent( + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie) = 0; + + virtual HRESULT STDMETHODCALLTYPE UnregisterAdaptersChangedEvent( + /* [annotation][in] */ + _In_ DWORD dwCookie) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IDXGIFactory7Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGIFactory7 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGIFactory7 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGIFactory7 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( + IDXGIFactory7 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [in] */ UINT DataSize, + /* [annotation][in] */ + _In_reads_bytes_(DataSize) const void *pData); + + HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( + IDXGIFactory7 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][in] */ + _In_opt_ const IUnknown *pUnknown); + + HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( + IDXGIFactory7 * This, + /* [annotation][in] */ + _In_ REFGUID Name, + /* [annotation][out][in] */ + _Inout_ UINT *pDataSize, + /* [annotation][out] */ + _Out_writes_bytes_(*pDataSize) void *pData); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IDXGIFactory7 * This, + /* [annotation][in] */ + _In_ REFIID riid, + /* [annotation][retval][out] */ + _COM_Outptr_ void **ppParent); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapters )( + IDXGIFactory7 * This, + /* [in] */ UINT Adapter, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter); + + HRESULT ( STDMETHODCALLTYPE *MakeWindowAssociation )( + IDXGIFactory7 * This, + HWND WindowHandle, + UINT Flags); + + HRESULT ( STDMETHODCALLTYPE *GetWindowAssociation )( + IDXGIFactory7 * This, + /* [annotation][out] */ + _Out_ HWND *pWindowHandle); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChain )( + IDXGIFactory7 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ DXGI_SWAP_CHAIN_DESC *pDesc, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *CreateSoftwareAdapter )( + IDXGIFactory7 * This, + /* [in] */ HMODULE Module, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter **ppAdapter); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapters1 )( + IDXGIFactory7 * This, + /* [in] */ UINT Adapter, + /* [annotation][out] */ + _COM_Outptr_ IDXGIAdapter1 **ppAdapter); + + BOOL ( STDMETHODCALLTYPE *IsCurrent )( + IDXGIFactory7 * This); + + BOOL ( STDMETHODCALLTYPE *IsWindowedStereoEnabled )( + IDXGIFactory7 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForHwnd )( + IDXGIFactory7 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ HWND hWnd, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForCoreWindow )( + IDXGIFactory7 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ IUnknown *pWindow, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + HRESULT ( STDMETHODCALLTYPE *GetSharedResourceAdapterLuid )( + IDXGIFactory7 * This, + /* [annotation] */ + _In_ HANDLE hResource, + /* [annotation] */ + _Out_ LUID *pLuid); + + HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusWindow )( + IDXGIFactory7 * This, + /* [annotation][in] */ + _In_ HWND WindowHandle, + /* [annotation][in] */ + _In_ UINT wMsg, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusEvent )( + IDXGIFactory7 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterStereoStatus )( + IDXGIFactory7 * This, + /* [annotation][in] */ + _In_ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusWindow )( + IDXGIFactory7 * This, + /* [annotation][in] */ + _In_ HWND WindowHandle, + /* [annotation][in] */ + _In_ UINT wMsg, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusEvent )( + IDXGIFactory7 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + void ( STDMETHODCALLTYPE *UnregisterOcclusionStatus )( + IDXGIFactory7 * This, + /* [annotation][in] */ + _In_ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForComposition )( + IDXGIFactory7 * This, + /* [annotation][in] */ + _In_ IUnknown *pDevice, + /* [annotation][in] */ + _In_ const DXGI_SWAP_CHAIN_DESC1 *pDesc, + /* [annotation][in] */ + _In_opt_ IDXGIOutput *pRestrictToOutput, + /* [annotation][out] */ + _COM_Outptr_ IDXGISwapChain1 **ppSwapChain); + + UINT ( STDMETHODCALLTYPE *GetCreationFlags )( + IDXGIFactory7 * This); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapterByLuid )( + IDXGIFactory7 * This, + /* [annotation] */ + _In_ LUID AdapterLuid, + /* [annotation] */ + _In_ REFIID riid, + /* [annotation] */ + _COM_Outptr_ void **ppvAdapter); + + HRESULT ( STDMETHODCALLTYPE *EnumWarpAdapter )( + IDXGIFactory7 * This, + /* [annotation] */ + _In_ REFIID riid, + /* [annotation] */ + _COM_Outptr_ void **ppvAdapter); + + HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( + IDXGIFactory7 * This, + DXGI_FEATURE Feature, + /* [annotation] */ + _Inout_updates_bytes_(FeatureSupportDataSize) void *pFeatureSupportData, + UINT FeatureSupportDataSize); + + HRESULT ( STDMETHODCALLTYPE *EnumAdapterByGpuPreference )( + IDXGIFactory7 * This, + /* [annotation] */ + _In_ UINT Adapter, + /* [annotation] */ + _In_ DXGI_GPU_PREFERENCE GpuPreference, + /* [annotation] */ + _In_ REFIID riid, + /* [annotation] */ + _COM_Outptr_ void **ppvAdapter); + + HRESULT ( STDMETHODCALLTYPE *RegisterAdaptersChangedEvent )( + IDXGIFactory7 * This, + /* [annotation][in] */ + _In_ HANDLE hEvent, + /* [annotation][out] */ + _Out_ DWORD *pdwCookie); + + HRESULT ( STDMETHODCALLTYPE *UnregisterAdaptersChangedEvent )( + IDXGIFactory7 * This, + /* [annotation][in] */ + _In_ DWORD dwCookie); + + END_INTERFACE + } IDXGIFactory7Vtbl; + + interface IDXGIFactory7 + { + CONST_VTBL struct IDXGIFactory7Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGIFactory7_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IDXGIFactory7_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IDXGIFactory7_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IDXGIFactory7_SetPrivateData(This,Name,DataSize,pData) \ + ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) + +#define IDXGIFactory7_SetPrivateDataInterface(This,Name,pUnknown) \ + ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) + +#define IDXGIFactory7_GetPrivateData(This,Name,pDataSize,pData) \ + ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) + +#define IDXGIFactory7_GetParent(This,riid,ppParent) \ + ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) + + +#define IDXGIFactory7_EnumAdapters(This,Adapter,ppAdapter) \ + ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) ) + +#define IDXGIFactory7_MakeWindowAssociation(This,WindowHandle,Flags) \ + ( (This)->lpVtbl -> MakeWindowAssociation(This,WindowHandle,Flags) ) + +#define IDXGIFactory7_GetWindowAssociation(This,pWindowHandle) \ + ( (This)->lpVtbl -> GetWindowAssociation(This,pWindowHandle) ) + +#define IDXGIFactory7_CreateSwapChain(This,pDevice,pDesc,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChain(This,pDevice,pDesc,ppSwapChain) ) + +#define IDXGIFactory7_CreateSoftwareAdapter(This,Module,ppAdapter) \ + ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) ) + + +#define IDXGIFactory7_EnumAdapters1(This,Adapter,ppAdapter) \ + ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) ) + +#define IDXGIFactory7_IsCurrent(This) \ + ( (This)->lpVtbl -> IsCurrent(This) ) + + +#define IDXGIFactory7_IsWindowedStereoEnabled(This) \ + ( (This)->lpVtbl -> IsWindowedStereoEnabled(This) ) + +#define IDXGIFactory7_CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) ) + +#define IDXGIFactory7_CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) ) + +#define IDXGIFactory7_GetSharedResourceAdapterLuid(This,hResource,pLuid) \ + ( (This)->lpVtbl -> GetSharedResourceAdapterLuid(This,hResource,pLuid) ) + +#define IDXGIFactory7_RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) \ + ( (This)->lpVtbl -> RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) ) + +#define IDXGIFactory7_RegisterStereoStatusEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterStereoStatusEvent(This,hEvent,pdwCookie) ) + +#define IDXGIFactory7_UnregisterStereoStatus(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterStereoStatus(This,dwCookie) ) + +#define IDXGIFactory7_RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) \ + ( (This)->lpVtbl -> RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) ) + +#define IDXGIFactory7_RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) ) + +#define IDXGIFactory7_UnregisterOcclusionStatus(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterOcclusionStatus(This,dwCookie) ) + +#define IDXGIFactory7_CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) \ + ( (This)->lpVtbl -> CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) ) + + +#define IDXGIFactory7_GetCreationFlags(This) \ + ( (This)->lpVtbl -> GetCreationFlags(This) ) + + +#define IDXGIFactory7_EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter) \ + ( (This)->lpVtbl -> EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter) ) + +#define IDXGIFactory7_EnumWarpAdapter(This,riid,ppvAdapter) \ + ( (This)->lpVtbl -> EnumWarpAdapter(This,riid,ppvAdapter) ) + + +#define IDXGIFactory7_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) \ + ( (This)->lpVtbl -> CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) ) + + +#define IDXGIFactory7_EnumAdapterByGpuPreference(This,Adapter,GpuPreference,riid,ppvAdapter) \ + ( (This)->lpVtbl -> EnumAdapterByGpuPreference(This,Adapter,GpuPreference,riid,ppvAdapter) ) + + +#define IDXGIFactory7_RegisterAdaptersChangedEvent(This,hEvent,pdwCookie) \ + ( (This)->lpVtbl -> RegisterAdaptersChangedEvent(This,hEvent,pdwCookie) ) + +#define IDXGIFactory7_UnregisterAdaptersChangedEvent(This,dwCookie) \ + ( (This)->lpVtbl -> UnregisterAdaptersChangedEvent(This,dwCookie) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDXGIFactory7_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxgi1_6_0000_0004 */ +/* [local] */ + +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ +#pragma endregion +DEFINE_GUID(IID_IDXGIAdapter4,0x3c8d99d1,0x4fbf,0x4181,0xa8,0x2c,0xaf,0x66,0xbf,0x7b,0xd2,0x4e); +DEFINE_GUID(IID_IDXGIOutput6,0x068346e8,0xaaec,0x4b84,0xad,0xd7,0x13,0x7f,0x51,0x3f,0x77,0xa1); +DEFINE_GUID(IID_IDXGIFactory6,0xc1b6694f,0xff09,0x44a9,0xb0,0x3c,0x77,0x90,0x0a,0x0a,0x1d,0x17); +DEFINE_GUID(IID_IDXGIFactory7,0xa4966eed,0x76db,0x44da,0x84,0xc1,0xee,0x9a,0x7a,0xfb,0x20,0xa8); + + +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0004_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0004_v0_0_s_ifspec; + /* Additional Prototypes for ALL interfaces */ /* end of Additional Prototypes */ diff --git a/3rdparty/bgfx/3rdparty/glslang/CMakeLists.txt b/3rdparty/bgfx/3rdparty/glslang/CMakeLists.txt index 9aa72315ea..7dc35b01ae 100644 --- a/3rdparty/bgfx/3rdparty/glslang/CMakeLists.txt +++ b/3rdparty/bgfx/3rdparty/glslang/CMakeLists.txt @@ -45,12 +45,12 @@ if(USE_CCACHE) endif() # Precompiled header macro. Parameters are source file list and filename for pch cpp file. -macro(PCH SRCS PCHCPP) +macro(glslang_pch SRCS PCHCPP) if(MSVC) if (CMAKE_GENERATOR MATCHES "^Visual Studio") set(PCH_NAME "$(IntDir)\\pch.pch") else() - set(PCH_NAME "pch.pch") + set(PCH_NAME "${CMAKE_CURRENT_BINARY_DIR}/pch.pch") endif() # make source files use/depend on PCH_NAME set_source_files_properties(${${SRCS}} PROPERTIES COMPILE_FLAGS "/Yupch.h /FIpch.h /Fp${PCH_NAME} /Zm300" OBJECT_DEPENDS "${PCH_NAME}") @@ -58,7 +58,7 @@ macro(PCH SRCS PCHCPP) set_source_files_properties(${PCHCPP} PROPERTIES COMPILE_FLAGS "/Ycpch.h /Fp${PCH_NAME} /Zm300" OBJECT_OUTPUTS "${PCH_NAME}") list(APPEND ${SRCS} "${PCHCPP}") endif() -endmacro(PCH) +endmacro(glslang_pch) project(glslang) # make testing optional diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/GlslangToSpv.cpp b/3rdparty/bgfx/3rdparty/glslang/SPIRV/GlslangToSpv.cpp index 632a21752b..2e2a2fe595 100755 --- a/3rdparty/bgfx/3rdparty/glslang/SPIRV/GlslangToSpv.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/GlslangToSpv.cpp @@ -2775,7 +2775,9 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* // can still have a mapping to a SPIR-V Id. // This includes specialization constants. if (node->getQualifier().isConstant()) { - return createSpvConstant(*node); + spv::Id result = createSpvConstant(*node); + if (result != spv::NoResult) + return result; } // Now, handle actual variables @@ -3457,6 +3459,7 @@ glslang::TLayoutPacking TGlslangToSpvTraverser::getExplicitLayout(const glslang: switch (type.getQualifier().layoutPacking) { case glslang::ElpStd140: case glslang::ElpStd430: + case glslang::ElpScalar: return type.getQualifier().layoutPacking; default: return glslang::ElpNone; @@ -3468,7 +3471,7 @@ int TGlslangToSpvTraverser::getArrayStride(const glslang::TType& arrayType, glsl { int size; int stride; - glslangIntermediate->getBaseAlignment(arrayType, size, stride, explicitLayout == glslang::ElpStd140, matrixLayout == glslang::ElmRowMajor); + glslangIntermediate->getMemberAlignment(arrayType, size, stride, explicitLayout, matrixLayout == glslang::ElmRowMajor); return stride; } @@ -3483,7 +3486,7 @@ int TGlslangToSpvTraverser::getMatrixStride(const glslang::TType& matrixType, gl int size; int stride; - glslangIntermediate->getBaseAlignment(elementType, size, stride, explicitLayout == glslang::ElpStd140, matrixLayout == glslang::ElmRowMajor); + glslangIntermediate->getMemberAlignment(elementType, size, stride, explicitLayout, matrixLayout == glslang::ElmRowMajor); return stride; } @@ -3525,7 +3528,7 @@ void TGlslangToSpvTraverser::updateMemberOffset(const glslang::TType& structType int memberSize; int dummyStride; - int memberAlignment = glslangIntermediate->getBaseAlignment(memberType, memberSize, dummyStride, explicitLayout == glslang::ElpStd140, matrixLayout == glslang::ElmRowMajor); + int memberAlignment = glslangIntermediate->getMemberAlignment(memberType, memberSize, dummyStride, explicitLayout, matrixLayout == glslang::ElmRowMajor); // Adjust alignment for HLSL rules // TODO: make this consistent in early phases of code: @@ -3544,7 +3547,7 @@ void TGlslangToSpvTraverser::updateMemberOffset(const glslang::TType& structType glslang::RoundToPow2(currentOffset, memberAlignment); // Bump up to vec4 if there is a bad straddle - if (glslangIntermediate->improperStraddle(memberType, memberSize, currentOffset)) + if (explicitLayout != glslang::ElpScalar && glslangIntermediate->improperStraddle(memberType, memberSize, currentOffset)) glslang::RoundToPow2(currentOffset, 16); nextOffset = currentOffset + memberSize; @@ -4631,7 +4634,9 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, OpD assert(builder.isScalar(right)); needMatchingVectors = false; binOp = spv::OpVectorTimesScalar; - } else + } else if (isFloat) + binOp = spv::OpFMul; + else binOp = spv::OpIMul; break; case glslang::EOpVectorTimesMatrix: @@ -6910,6 +6915,17 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: // We might need the remaining arguments, e.g. in the EOpFrexp case. std::vector callArguments(operands.begin(), operands.begin() + consumedOperands); id = builder.createBuiltinCall(typeId, extBuiltins >= 0 ? extBuiltins : stdBuiltins, libCall, callArguments); + } else if (opCode == spv::OpDot && !isFloat) { + // int dot(int, int) + // NOTE: never called for scalar/vector1, this is turned into simple mul before this can be reached + const int componentCount = builder.getNumComponents(operands[0]); + spv::Id mulOp = builder.createBinOp(spv::OpIMul, builder.getTypeId(operands[0]), operands[0], operands[1]); + builder.setPrecision(mulOp, precision); + id = builder.createCompositeExtract(mulOp, typeId, 0); + for (int i = 1; i < componentCount; ++i) { + builder.setPrecision(id, precision); + id = builder.createBinOp(spv::OpIAdd, typeId, id, builder.createCompositeExtract(operands[0], typeId, i)); + } } else { switch (consumedOperands) { case 0: @@ -7302,6 +7318,9 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TIntermTyped& n } else if (auto* const_union_array = &sn->getConstArray()) { int nextConst = 0; result = createSpvConstantFromConstUnionArray(sn->getType(), *const_union_array, nextConst, true); + } else { + logger->missingFunctionality("Invalid initializer for spec onstant."); + return spv::NoResult; } builder.addName(result, sn->getName().c_str()); return result; @@ -7310,7 +7329,6 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TIntermTyped& n // Neither a front-end constant node, nor a specialization constant node with constant union array or // constant sub tree as initializer. logger->missingFunctionality("Neither a front-end constant nor a spec constant."); - exit(1); return spv::NoResult; } diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/SpvTools.cpp b/3rdparty/bgfx/3rdparty/glslang/SPIRV/SpvTools.cpp index bc9bf9e08a..05f234cc1f 100755 --- a/3rdparty/bgfx/3rdparty/glslang/SPIRV/SpvTools.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/SpvTools.cpp @@ -152,6 +152,7 @@ void SpirvToolsLegalize(const glslang::TIntermediate&, std::vector out << std::endl; }); + optimizer.RegisterPass(spvtools::CreateDeadBranchElimPass()); optimizer.RegisterPass(spvtools::CreateMergeReturnPass()); optimizer.RegisterPass(spvtools::CreateInlineExhaustivePass()); optimizer.RegisterPass(spvtools::CreateEliminateDeadFunctionsPass()); diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/300.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/300.vert.out index 95ebb92e3c..d8c9e16b22 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/300.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/300.vert.out @@ -39,7 +39,7 @@ ERROR: 0:168: 'Binst' : cannot add storage, auxiliary, memory, interpolation, la ERROR: 0:169: 'Bblock' : cannot add storage, auxiliary, memory, interpolation, layout, or precision qualifier to an existing variable ERROR: 0:170: 'Bfoo' : cannot add storage, auxiliary, memory, interpolation, layout, or precision qualifier to an existing variable ERROR: 0:172: 'std430' : not supported for this version or the enabled extensions -ERROR: 0:172: 'std430' : requires the 'buffer' storage qualifier +ERROR: 0:172: 'std430 requires the buffer storage qualifier' : required extension not requested: GL_EXT_scalar_block_layout ERROR: 0:175: '' : array size required ERROR: 0:185: 'assign' : cannot convert from ' temp 4-element array of highp float' to ' temp 3-element array of highp float' ERROR: 0:186: 'assign' : cannot convert from ' temp 3-element array of highp float' to ' temp 4-element array of highp float' diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.vert.out index 21fa27b90f..baf0987082 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.vert.out @@ -15,7 +15,7 @@ ERROR: 0:78: 'vertex-shader array-of-struct output' : not supported with this pr ERROR: 0:79: 'vertex-shader array-of-struct output' : not supported with this profile: es ERROR: 0:81: 'vertex-shader struct output containing an array' : not supported with this profile: es ERROR: 0:83: 'vertex-shader struct output containing structure' : not supported with this profile: es -ERROR: 0:85: 'std430' : requires the 'buffer' storage qualifier +ERROR: 0:85: 'std430 requires the buffer storage qualifier' : required extension not requested: GL_EXT_scalar_block_layout ERROR: 0:97: 's' : member of block cannot be or contain a sampler, image, or atomic_uint type ERROR: 0:105: 'location' : overlapping use of location 12 ERROR: 0:107: 'input block' : not supported in this stage: vertex diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.vert.out index 25bce16cc3..22577ab05e 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.vert.out @@ -46,7 +46,7 @@ ERROR: 0:142: 'r8_snorm' : does not apply to signed integer images ERROR: 0:143: 'rgba32ui' : does not apply to signed integer images ERROR: 0:144: 'r8ui' : does not apply to signed integer images ERROR: 0:147: 'offset on block member' : not supported for this version or the enabled extensions -ERROR: 0:147: 'offset/align' : can only be used with std140 or std430 layout packing +ERROR: 0:147: 'offset/align' : can only be used with std140, std430, or scalar layout packing ERROR: 0:157: 'textureQueryLevels' : no matching overloaded function found ERROR: 0:157: 'assign' : cannot convert from ' const float' to ' temp int' ERROR: 0:158: 'textureQueryLevels' : no matching overloaded function found diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430.vert.out index 29ffb01aa8..f57a39c1fb 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430.vert.out @@ -27,9 +27,9 @@ ERROR: 0:64: 'uniform buffer-member align' : not supported for this version or t ERROR: 0:65: 'uniform buffer-member align' : not supported for this version or the enabled extensions ERROR: 0:65: 'offset on block member' : not supported for this version or the enabled extensions ERROR: 0:66: 'offset on block member' : not supported for this version or the enabled extensions -ERROR: 0:64: 'align' : can only be used with std140 or std430 layout packing -ERROR: 0:65: 'offset/align' : can only be used with std140 or std430 layout packing -ERROR: 0:66: 'offset/align' : can only be used with std140 or std430 layout packing +ERROR: 0:64: 'align' : can only be used with std140, std430, or scalar layout packing +ERROR: 0:65: 'offset/align' : can only be used with std140, std430, or scalar layout packing +ERROR: 0:66: 'offset/align' : can only be used with std140, std430, or scalar layout packing ERROR: 0:71: 'offset on block member' : not supported for this version or the enabled extensions ERROR: 0:74: 'gl_MaxTransformFeedbackBuffers' : required extension not requested: GL_ARB_enhanced_layouts ERROR: 0:75: 'gl_MaxTransformFeedbackInterleavedComponents' : required extension not requested: GL_ARB_enhanced_layouts diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/440.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/440.frag.out index 18e014f921..1ac6e7c68b 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/440.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/440.frag.out @@ -21,11 +21,11 @@ ERROR: 0:38: 'offset' : only applies to block members, not blocks ERROR: 0:39: 'output block' : not supported in this stage: fragment ERROR: 0:39: 'layout' : offset/align can only be used on a uniform or buffer ERROR: 0:39: 'offset' : only applies to block members, not blocks -ERROR: 0:42: 'align' : can only be used with std140 or std430 layout packing -ERROR: 0:43: 'align' : can only be used with std140 or std430 layout packing +ERROR: 0:42: 'align' : can only be used with std140, std430, or scalar layout packing +ERROR: 0:43: 'align' : can only be used with std140, std430, or scalar layout packing ERROR: 0:43: 'layout' : offset/align can only be used on a uniform or buffer ERROR: 0:44: 'output block' : not supported in this stage: fragment -ERROR: 0:44: 'align' : can only be used with std140 or std430 layout packing +ERROR: 0:44: 'align' : can only be used with std140, std430, or scalar layout packing ERROR: 0:44: 'layout' : offset/align can only be used on a uniform or buffer ERROR: 0:46: 'offset' : cannot specify on a variable declaration ERROR: 0:47: 'layout' : offset/align can only be used on a uniform or buffer @@ -36,9 +36,9 @@ ERROR: 0:52: 'layout' : offset/align can only be used on a uniform or buffer ERROR: 0:54: 'layout' : matrix or packing qualifiers can only be used on a uniform or buffer ERROR: 0:55: 'layout' : cannot specify packing on a variable declaration ERROR: 0:57: 'align' : must be a power of 2 -ERROR: 0:58: 'offset/align' : can only be used with std140 or std430 layout packing -ERROR: 0:62: 'offset/align' : can only be used with std140 or std430 layout packing -ERROR: 0:63: 'offset/align' : can only be used with std140 or std430 layout packing +ERROR: 0:58: 'offset/align' : can only be used with std140, std430, or scalar layout packing +ERROR: 0:62: 'offset/align' : can only be used with std140, std430, or scalar layout packing +ERROR: 0:63: 'offset/align' : can only be used with std140, std430, or scalar layout packing ERROR: 0:62: 'layout' : offset/align can only be used on a uniform or buffer ERROR: 0:63: 'layout' : offset/align can only be used on a uniform or buffer ERROR: 0:84: 'align' : must be a power of 2 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/440.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/440.vert.out index 41796cb52a..5a10e261ae 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/440.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/440.vert.out @@ -171,6 +171,8 @@ ERROR: xfb_buffer 0, xfb_stride 92 ERROR: Linking vertex stage: xfb_stride must be multiple of 4: ERROR: xfb_buffer 5, xfb_stride 6 ERROR: Linking vertex stage: xfb_stride is too large: +ERROR: xfb_buffer 6, components (1/4 stride) needed are 500, gl_MaxTransformFeedbackInterleavedComponents is 64 +ERROR: Linking vertex stage: xfb_stride is too large: ERROR: xfb_buffer 7, components (1/4 stride) needed are 66, gl_MaxTransformFeedbackInterleavedComponents is 64 Shader version: 440 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppBad.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppBad.vert.out index 1a2286aa91..a5267ff64a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppBad.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppBad.vert.out @@ -10,6 +10,7 @@ ERROR: 5 compilation errors. No code generated. Shader version: 100 ERROR: node is still EOpNull! 0:? Linker Objects +0:? 'n' ( global highp int) Linked vertex stage: @@ -19,4 +20,5 @@ ERROR: Linking vertex stage: Missing entry point: Each stage requires one entry Shader version: 100 ERROR: node is still EOpNull! 0:? Linker Objects +0:? 'n' ( global highp int) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppSimple.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppSimple.vert.out index 8da3ae67ad..85beb4eb5d 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppSimple.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppSimple.vert.out @@ -35,9 +35,9 @@ ERROR: 0:155: '#else' : unexpected tokens following directive ERROR: 0:158: '#else' : #else after #else ERROR: 0:160: '#endif' : unexpected tokens following directive ERROR: 0:164: '#define' : duplicate macro parameter -ERROR: 0:173: '#define' : Macro redefined; different number of arguments: m4 -ERROR: 0:178: '#define' : Macro redefined; different number of arguments: m5 -ERROR: 0:182: '#define' : Macro redefined; different number of arguments: m6 +ERROR: 0:173: '#define' : Macro redefined; function-like versus object-like: m4 +ERROR: 0:177: '#define' : Macro redefined; function-like versus object-like: m5 +ERROR: 0:181: '#define' : Macro redefined; different number of arguments: m6 ERROR: 0:185: '#define' : Macro redefined; different substitutions: m7 ERROR: 0:192: '#define' : Macro redefined; different substitutions: m8 ERROR: 0:196: '#define' : Macro redefined; different argument names: m9 @@ -77,7 +77,7 @@ ERROR: 12:9000: 'preprocessor evaluation' : expected ')' ERROR: 12:9002: '#if' : unexpected tokens following directive ERROR: 12:9014: 'FOOOM' : undeclared identifier ERROR: 12:9014: '=' : cannot convert from ' temp float' to ' global int' -ERROR: 12:9016: 'preprocessor evaluation' : can't evaluate expression +ERROR: 12:9015: 'preprocessor evaluation' : can't evaluate expression ERROR: 12:9016: 'preprocessor evaluation' : bad expression ERROR: 12:9500: 'preprocessor evaluation' : bad expression ERROR: 12:9500: '#if' : unexpected tokens following directive diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.buffer.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.buffer.frag.out index 4528d98b0e..71393f0837 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.buffer.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.buffer.frag.out @@ -146,7 +146,7 @@ gl_FragCoord origin is upper left 0:? 'input' ( in 4-component vector of float FragCoord) error: SPIRV-Tools Validation Errors -error: Structure id 50 decorated as BufferBlock for variable in Uniform storage class must follow standard storage buffer layout rules: member 7 at offset 128 overlaps previous member ending at offset 171 +error: Structure id 50 decorated as BufferBlock for variable in Uniform storage class must follow relaxed storage buffer layout rules: member 7 at offset 128 overlaps previous member ending at offset 171 %tbufName = OpTypeStruct %v4float %int %float %float %float %float %float %float %mat3v4float %mat3v4float %mat3v4float %mat3v4float // Module Version 10000 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.constantbuffer.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.constantbuffer.frag.out index 4185ea95e0..052d84e487 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.constantbuffer.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.constantbuffer.frag.out @@ -132,7 +132,9 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) error: SPIRV-Tools Validation Errors -error: Only a single level of array is allowed for descriptor set variables +error: Uniform OpVariable '18[cb3] 'has illegal type. +From Vulkan spec, section 14.5.2: +Variables identified with the Uniform storage class are used to access transparent buffer backed resources. Such variables must be typed as OpTypeStruct, or an array of this type %cb3_0 = OpVariable %_ptr_Uniform__arr__arr_cb3_uint_4_uint_2 Uniform // Module Version 10000 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.float1.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.float1.frag.out index 31febfd492..49827dcf8d 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.float1.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.float1.frag.out @@ -64,10 +64,6 @@ gl_FragCoord origin is upper left 0:? 'f1' ( global 1-component vector of float) 0:? 'scalar' ( global float) -error: SPIRV-Tools Validation Errors -error: Expected int scalar or vector type as Result Type: IMul - %20 = OpIMul %float %18 %19 - // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 27 @@ -106,10 +102,10 @@ error: Expected int scalar or vector type as Result Type: IMul 12: Label 18: 6(float) Load 14(f1) 19: 6(float) Load 16(scalar) - 20: 6(float) IMul 18 19 + 20: 6(float) FMul 18 19 21: 6(float) Load 9(inFloat1) 22: 6(float) Load 10(inScalar) - 23: 6(float) IMul 21 22 + 23: 6(float) FMul 21 22 24: 6(float) FAdd 20 23 ReturnValue 24 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.int.dot.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.int.dot.frag.out new file mode 100644 index 0000000000..afe44c85ed --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.int.dot.frag.out @@ -0,0 +1,339 @@ +hlsl.int.dot.frag +Shader version: 500 +gl_FragCoord origin is upper left +0:? Sequence +0:1 Function Definition: @main( ( temp 4-component vector of float) +0:1 Function Parameters: +0:? Sequence +0:2 Sequence +0:2 move second child to first child ( temp int) +0:2 'i' ( temp int) +0:2 Constant: +0:2 1 (const int) +0:3 Sequence +0:3 move second child to first child ( temp 1-component vector of int) +0:3 'i2' ( temp 1-component vector of int) +0:3 Constant: +0:3 2 (const int) +0:4 Sequence +0:4 move second child to first child ( temp 2-component vector of int) +0:4 'i3' ( temp 2-component vector of int) +0:4 Constant: +0:4 3 (const int) +0:4 3 (const int) +0:5 Sequence +0:5 move second child to first child ( temp 3-component vector of int) +0:5 'i4' ( temp 3-component vector of int) +0:5 Constant: +0:5 4 (const int) +0:5 4 (const int) +0:5 4 (const int) +0:6 Sequence +0:6 move second child to first child ( temp 4-component vector of int) +0:6 'i5' ( temp 4-component vector of int) +0:6 Constant: +0:6 5 (const int) +0:6 5 (const int) +0:6 5 (const int) +0:6 5 (const int) +0:8 move second child to first child ( temp int) +0:8 'i' ( temp int) +0:8 dot-product ( temp int) +0:8 'i' ( temp int) +0:8 'i' ( temp int) +0:9 move second child to first child ( temp 1-component vector of int) +0:9 'i2' ( temp 1-component vector of int) +0:9 Construct int ( temp 1-component vector of int) +0:9 dot-product ( temp int) +0:9 Construct int ( in int) +0:9 'i2' ( temp 1-component vector of int) +0:9 Construct int ( in int) +0:9 'i2' ( temp 1-component vector of int) +0:10 move second child to first child ( temp 2-component vector of int) +0:10 'i3' ( temp 2-component vector of int) +0:10 Construct ivec2 ( temp 2-component vector of int) +0:10 dot-product ( temp int) +0:10 'i3' ( temp 2-component vector of int) +0:10 'i3' ( temp 2-component vector of int) +0:11 move second child to first child ( temp 3-component vector of int) +0:11 'i4' ( temp 3-component vector of int) +0:11 Construct ivec3 ( temp 3-component vector of int) +0:11 dot-product ( temp int) +0:11 'i4' ( temp 3-component vector of int) +0:11 'i4' ( temp 3-component vector of int) +0:12 move second child to first child ( temp 4-component vector of int) +0:12 'i5' ( temp 4-component vector of int) +0:12 Construct ivec4 ( temp 4-component vector of int) +0:12 dot-product ( temp int) +0:12 'i5' ( temp 4-component vector of int) +0:12 'i5' ( temp 4-component vector of int) +0:13 Branch: Return with expression +0:13 Convert int to float ( temp 4-component vector of float) +0:13 add ( temp 4-component vector of int) +0:13 add ( temp 4-component vector of int) +0:13 add ( temp 4-component vector of int) +0:13 add ( temp 4-component vector of int) +0:13 'i' ( temp int) +0:13 Construct ivec4 ( temp 4-component vector of int) +0:13 Construct int ( temp int) +0:13 'i2' ( temp 1-component vector of int) +0:13 vector swizzle ( temp 4-component vector of int) +0:13 'i3' ( temp 2-component vector of int) +0:13 Sequence +0:13 Constant: +0:13 0 (const int) +0:13 Constant: +0:13 1 (const int) +0:13 Constant: +0:13 0 (const int) +0:13 Constant: +0:13 1 (const int) +0:13 vector swizzle ( temp 4-component vector of int) +0:13 'i4' ( temp 3-component vector of int) +0:13 Sequence +0:13 Constant: +0:13 0 (const int) +0:13 Constant: +0:13 1 (const int) +0:13 Constant: +0:13 2 (const int) +0:13 Constant: +0:13 0 (const int) +0:13 'i5' ( temp 4-component vector of int) +0:1 Function Definition: main( ( temp void) +0:1 Function Parameters: +0:? Sequence +0:1 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) +0:1 Function Call: @main( ( temp 4-component vector of float) +0:? Linker Objects +0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) + + +Linked fragment stage: + + +Shader version: 500 +gl_FragCoord origin is upper left +0:? Sequence +0:1 Function Definition: @main( ( temp 4-component vector of float) +0:1 Function Parameters: +0:? Sequence +0:2 Sequence +0:2 move second child to first child ( temp int) +0:2 'i' ( temp int) +0:2 Constant: +0:2 1 (const int) +0:3 Sequence +0:3 move second child to first child ( temp 1-component vector of int) +0:3 'i2' ( temp 1-component vector of int) +0:3 Constant: +0:3 2 (const int) +0:4 Sequence +0:4 move second child to first child ( temp 2-component vector of int) +0:4 'i3' ( temp 2-component vector of int) +0:4 Constant: +0:4 3 (const int) +0:4 3 (const int) +0:5 Sequence +0:5 move second child to first child ( temp 3-component vector of int) +0:5 'i4' ( temp 3-component vector of int) +0:5 Constant: +0:5 4 (const int) +0:5 4 (const int) +0:5 4 (const int) +0:6 Sequence +0:6 move second child to first child ( temp 4-component vector of int) +0:6 'i5' ( temp 4-component vector of int) +0:6 Constant: +0:6 5 (const int) +0:6 5 (const int) +0:6 5 (const int) +0:6 5 (const int) +0:8 move second child to first child ( temp int) +0:8 'i' ( temp int) +0:8 dot-product ( temp int) +0:8 'i' ( temp int) +0:8 'i' ( temp int) +0:9 move second child to first child ( temp 1-component vector of int) +0:9 'i2' ( temp 1-component vector of int) +0:9 Construct int ( temp 1-component vector of int) +0:9 dot-product ( temp int) +0:9 Construct int ( in int) +0:9 'i2' ( temp 1-component vector of int) +0:9 Construct int ( in int) +0:9 'i2' ( temp 1-component vector of int) +0:10 move second child to first child ( temp 2-component vector of int) +0:10 'i3' ( temp 2-component vector of int) +0:10 Construct ivec2 ( temp 2-component vector of int) +0:10 dot-product ( temp int) +0:10 'i3' ( temp 2-component vector of int) +0:10 'i3' ( temp 2-component vector of int) +0:11 move second child to first child ( temp 3-component vector of int) +0:11 'i4' ( temp 3-component vector of int) +0:11 Construct ivec3 ( temp 3-component vector of int) +0:11 dot-product ( temp int) +0:11 'i4' ( temp 3-component vector of int) +0:11 'i4' ( temp 3-component vector of int) +0:12 move second child to first child ( temp 4-component vector of int) +0:12 'i5' ( temp 4-component vector of int) +0:12 Construct ivec4 ( temp 4-component vector of int) +0:12 dot-product ( temp int) +0:12 'i5' ( temp 4-component vector of int) +0:12 'i5' ( temp 4-component vector of int) +0:13 Branch: Return with expression +0:13 Convert int to float ( temp 4-component vector of float) +0:13 add ( temp 4-component vector of int) +0:13 add ( temp 4-component vector of int) +0:13 add ( temp 4-component vector of int) +0:13 add ( temp 4-component vector of int) +0:13 'i' ( temp int) +0:13 Construct ivec4 ( temp 4-component vector of int) +0:13 Construct int ( temp int) +0:13 'i2' ( temp 1-component vector of int) +0:13 vector swizzle ( temp 4-component vector of int) +0:13 'i3' ( temp 2-component vector of int) +0:13 Sequence +0:13 Constant: +0:13 0 (const int) +0:13 Constant: +0:13 1 (const int) +0:13 Constant: +0:13 0 (const int) +0:13 Constant: +0:13 1 (const int) +0:13 vector swizzle ( temp 4-component vector of int) +0:13 'i4' ( temp 3-component vector of int) +0:13 Sequence +0:13 Constant: +0:13 0 (const int) +0:13 Constant: +0:13 1 (const int) +0:13 Constant: +0:13 2 (const int) +0:13 Constant: +0:13 0 (const int) +0:13 'i5' ( temp 4-component vector of int) +0:1 Function Definition: main( ( temp void) +0:1 Function Parameters: +0:? Sequence +0:1 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) +0:1 Function Call: @main( ( temp 4-component vector of float) +0:? Linker Objects +0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) + +// Module Version 10300 +// Generated by (magic number): 80007 +// Id's are bound by 84 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 82 + ExecutionMode 4 OriginUpperLeft + Source HLSL 500 + Name 4 "main" + Name 9 "@main(" + Name 13 "i" + Name 15 "i2" + Name 19 "i3" + Name 24 "i4" + Name 29 "i5" + Name 82 "@entryPointOutput" + Decorate 82(@entryPointOutput) Location 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypeFunction 7(fvec4) + 11: TypeInt 32 1 + 12: TypePointer Function 11(int) + 14: 11(int) Constant 1 + 16: 11(int) Constant 2 + 17: TypeVector 11(int) 2 + 18: TypePointer Function 17(ivec2) + 20: 11(int) Constant 3 + 21: 17(ivec2) ConstantComposite 20 20 + 22: TypeVector 11(int) 3 + 23: TypePointer Function 22(ivec3) + 25: 11(int) Constant 4 + 26: 22(ivec3) ConstantComposite 25 25 25 + 27: TypeVector 11(int) 4 + 28: TypePointer Function 27(ivec4) + 30: 11(int) Constant 5 + 31: 27(ivec4) ConstantComposite 30 30 30 30 + 81: TypePointer Output 7(fvec4) +82(@entryPointOutput): 81(ptr) Variable Output + 4(main): 2 Function None 3 + 5: Label + 83: 7(fvec4) FunctionCall 9(@main() + Store 82(@entryPointOutput) 83 + Return + FunctionEnd + 9(@main(): 7(fvec4) Function None 8 + 10: Label + 13(i): 12(ptr) Variable Function + 15(i2): 12(ptr) Variable Function + 19(i3): 18(ptr) Variable Function + 24(i4): 23(ptr) Variable Function + 29(i5): 28(ptr) Variable Function + Store 13(i) 14 + Store 15(i2) 16 + Store 19(i3) 21 + Store 24(i4) 26 + Store 29(i5) 31 + 32: 11(int) Load 13(i) + 33: 11(int) Load 13(i) + 34: 11(int) IMul 32 33 + Store 13(i) 34 + 35: 11(int) Load 15(i2) + 36: 11(int) Load 15(i2) + 37: 11(int) IMul 35 36 + Store 15(i2) 37 + 38: 17(ivec2) Load 19(i3) + 39: 17(ivec2) Load 19(i3) + 40: 17(ivec2) IMul 38 39 + 41: 11(int) CompositeExtract 40 0 + 42: 11(int) CompositeExtract 38 1 + 43: 11(int) IAdd 41 42 + 44: 17(ivec2) CompositeConstruct 43 43 + Store 19(i3) 44 + 45: 22(ivec3) Load 24(i4) + 46: 22(ivec3) Load 24(i4) + 47: 22(ivec3) IMul 45 46 + 48: 11(int) CompositeExtract 47 0 + 49: 11(int) CompositeExtract 45 1 + 50: 11(int) IAdd 48 49 + 51: 11(int) CompositeExtract 45 2 + 52: 11(int) IAdd 50 51 + 53: 22(ivec3) CompositeConstruct 52 52 52 + Store 24(i4) 53 + 54: 27(ivec4) Load 29(i5) + 55: 27(ivec4) Load 29(i5) + 56: 27(ivec4) IMul 54 55 + 57: 11(int) CompositeExtract 56 0 + 58: 11(int) CompositeExtract 54 1 + 59: 11(int) IAdd 57 58 + 60: 11(int) CompositeExtract 54 2 + 61: 11(int) IAdd 59 60 + 62: 11(int) CompositeExtract 54 3 + 63: 11(int) IAdd 61 62 + 64: 27(ivec4) CompositeConstruct 63 63 63 63 + Store 29(i5) 64 + 65: 11(int) Load 13(i) + 66: 11(int) Load 15(i2) + 67: 27(ivec4) CompositeConstruct 66 66 66 66 + 68: 27(ivec4) CompositeConstruct 65 65 65 65 + 69: 27(ivec4) IAdd 68 67 + 70: 17(ivec2) Load 19(i3) + 71: 27(ivec4) VectorShuffle 70 70 0 1 0 1 + 72: 27(ivec4) IAdd 69 71 + 73: 22(ivec3) Load 24(i4) + 74: 27(ivec4) VectorShuffle 73 73 0 1 2 0 + 75: 27(ivec4) IAdd 72 74 + 76: 27(ivec4) Load 29(i5) + 77: 27(ivec4) IAdd 75 76 + 78: 7(fvec4) ConvertSToF 77 + ReturnValue 78 + FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structarray.flatten.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structarray.flatten.frag.out index 411f155876..fc66a7ceeb 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structarray.flatten.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structarray.flatten.frag.out @@ -155,6 +155,12 @@ gl_FragCoord origin is upper left 0:? 'g_texdata_array2[2].nonopaque_thing' ( uniform int) 0:? 'ps_output.color' (layout( location=0) out 4-component vector of float) +error: SPIRV-Tools Validation Errors +error: UniformConstant OpVariable '65[g_texdata.nonopaque_thing] 'has illegal type. +From Vulkan spec, section 14.5.2: +Variables identified with the UniformConstant storage class are used only as handles to refer to opaque resources. Such variables must be typed as OpTypeImage, OpTypeSampler, OpTypeSampledImage, OpTypeAccelerationStructureNV, or an array of one of these types. + %g_texdata_nonopaque_thing = OpVariable %_ptr_UniformConstant_int UniformConstant + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 80 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.type.type.conversion.all.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.type.type.conversion.all.frag.out new file mode 100644 index 0000000000..083c92969d --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.type.type.conversion.all.frag.out @@ -0,0 +1,1469 @@ +hlsl.type.type.conversion.all.frag +ERROR: 0:88: '=' : cannot convert from ' const 2X2 matrix of float' to ' temp 2-component vector of float' +ERROR: 0:89: '=' : cannot convert from ' const 2X3 matrix of float' to ' temp 2-component vector of float' +ERROR: 0:90: '=' : cannot convert from ' const 2X4 matrix of float' to ' temp 2-component vector of float' +ERROR: 0:91: '=' : cannot convert from ' const 3X2 matrix of float' to ' temp 2-component vector of float' +ERROR: 0:92: '=' : cannot convert from ' const 3X3 matrix of float' to ' temp 2-component vector of float' +ERROR: 0:93: '=' : cannot convert from ' const 3X4 matrix of float' to ' temp 2-component vector of float' +ERROR: 0:94: '=' : cannot convert from ' const 4X2 matrix of float' to ' temp 2-component vector of float' +ERROR: 0:95: '=' : cannot convert from ' const 4X3 matrix of float' to ' temp 2-component vector of float' +ERROR: 0:96: '=' : cannot convert from ' const 4X4 matrix of float' to ' temp 2-component vector of float' +ERROR: 0:97: '=' : cannot convert from ' const 2-component vector of float' to ' temp 3-component vector of float' +ERROR: 0:98: '=' : cannot convert from ' const 2X2 matrix of float' to ' temp 3-component vector of float' +ERROR: 0:99: '=' : cannot convert from ' const 2X3 matrix of float' to ' temp 3-component vector of float' +ERROR: 0:100: '=' : cannot convert from ' const 2X4 matrix of float' to ' temp 3-component vector of float' +ERROR: 0:101: '=' : cannot convert from ' const 3X2 matrix of float' to ' temp 3-component vector of float' +ERROR: 0:102: '=' : cannot convert from ' const 3X3 matrix of float' to ' temp 3-component vector of float' +ERROR: 0:103: '=' : cannot convert from ' const 3X4 matrix of float' to ' temp 3-component vector of float' +ERROR: 0:104: '=' : cannot convert from ' const 4X2 matrix of float' to ' temp 3-component vector of float' +ERROR: 0:105: '=' : cannot convert from ' const 4X3 matrix of float' to ' temp 3-component vector of float' +ERROR: 0:106: '=' : cannot convert from ' const 4X4 matrix of float' to ' temp 3-component vector of float' +ERROR: 0:107: '=' : cannot convert from ' const 2-component vector of float' to ' temp 4-component vector of float' +ERROR: 0:108: '=' : cannot convert from ' const 3-component vector of float' to ' temp 4-component vector of float' +ERROR: 0:109: '=' : cannot convert from ' const 2X3 matrix of float' to ' temp 4-component vector of float' +ERROR: 0:110: '=' : cannot convert from ' const 2X4 matrix of float' to ' temp 4-component vector of float' +ERROR: 0:111: '=' : cannot convert from ' const 3X2 matrix of float' to ' temp 4-component vector of float' +ERROR: 0:112: '=' : cannot convert from ' const 3X3 matrix of float' to ' temp 4-component vector of float' +ERROR: 0:113: '=' : cannot convert from ' const 3X4 matrix of float' to ' temp 4-component vector of float' +ERROR: 0:114: '=' : cannot convert from ' const 4X2 matrix of float' to ' temp 4-component vector of float' +ERROR: 0:115: '=' : cannot convert from ' const 4X3 matrix of float' to ' temp 4-component vector of float' +ERROR: 0:116: '=' : cannot convert from ' const 4X4 matrix of float' to ' temp 4-component vector of float' +ERROR: 0:117: '=' : cannot convert from ' const 2-component vector of float' to ' temp 2X2 matrix of float' +ERROR: 0:118: '=' : cannot convert from ' const 3-component vector of float' to ' temp 2X2 matrix of float' +ERROR: 0:119: '=' : cannot convert from ' const 2-component vector of float' to ' temp 2X3 matrix of float' +ERROR: 0:120: '=' : cannot convert from ' const 3-component vector of float' to ' temp 2X3 matrix of float' +ERROR: 0:121: '=' : cannot convert from ' const 4-component vector of float' to ' temp 2X3 matrix of float' +ERROR: 0:122: '=' : cannot convert from ' const 2X2 matrix of float' to ' temp 2X3 matrix of float' +ERROR: 0:123: '=' : cannot convert from ' const 3X2 matrix of float' to ' temp 2X3 matrix of float' +ERROR: 0:124: '=' : cannot convert from ' const 4X2 matrix of float' to ' temp 2X3 matrix of float' +ERROR: 0:125: '=' : cannot convert from ' const 2-component vector of float' to ' temp 2X4 matrix of float' +ERROR: 0:126: '=' : cannot convert from ' const 3-component vector of float' to ' temp 2X4 matrix of float' +ERROR: 0:127: '=' : cannot convert from ' const 4-component vector of float' to ' temp 2X4 matrix of float' +ERROR: 0:128: '=' : cannot convert from ' const 2X2 matrix of float' to ' temp 2X4 matrix of float' +ERROR: 0:129: '=' : cannot convert from ' const 2X3 matrix of float' to ' temp 2X4 matrix of float' +ERROR: 0:130: '=' : cannot convert from ' const 3X2 matrix of float' to ' temp 2X4 matrix of float' +ERROR: 0:131: '=' : cannot convert from ' const 3X3 matrix of float' to ' temp 2X4 matrix of float' +ERROR: 0:132: '=' : cannot convert from ' const 4X2 matrix of float' to ' temp 2X4 matrix of float' +ERROR: 0:133: '=' : cannot convert from ' const 4X3 matrix of float' to ' temp 2X4 matrix of float' +ERROR: 0:134: '=' : cannot convert from ' const 2-component vector of float' to ' temp 3X2 matrix of float' +ERROR: 0:135: '=' : cannot convert from ' const 3-component vector of float' to ' temp 3X2 matrix of float' +ERROR: 0:136: '=' : cannot convert from ' const 4-component vector of float' to ' temp 3X2 matrix of float' +ERROR: 0:137: '=' : cannot convert from ' const 2X2 matrix of float' to ' temp 3X2 matrix of float' +ERROR: 0:138: '=' : cannot convert from ' const 2X3 matrix of float' to ' temp 3X2 matrix of float' +ERROR: 0:139: '=' : cannot convert from ' const 2X4 matrix of float' to ' temp 3X2 matrix of float' +ERROR: 0:140: '=' : cannot convert from ' const 2-component vector of float' to ' temp 3X3 matrix of float' +ERROR: 0:141: '=' : cannot convert from ' const 3-component vector of float' to ' temp 3X3 matrix of float' +ERROR: 0:142: '=' : cannot convert from ' const 4-component vector of float' to ' temp 3X3 matrix of float' +ERROR: 0:143: '=' : cannot convert from ' const 2X2 matrix of float' to ' temp 3X3 matrix of float' +ERROR: 0:144: '=' : cannot convert from ' const 2X3 matrix of float' to ' temp 3X3 matrix of float' +ERROR: 0:145: '=' : cannot convert from ' const 2X4 matrix of float' to ' temp 3X3 matrix of float' +ERROR: 0:146: '=' : cannot convert from ' const 3X2 matrix of float' to ' temp 3X3 matrix of float' +ERROR: 0:147: '=' : cannot convert from ' const 4X2 matrix of float' to ' temp 3X3 matrix of float' +ERROR: 0:148: '=' : cannot convert from ' const 2-component vector of float' to ' temp 3X4 matrix of float' +ERROR: 0:149: '=' : cannot convert from ' const 3-component vector of float' to ' temp 3X4 matrix of float' +ERROR: 0:150: '=' : cannot convert from ' const 4-component vector of float' to ' temp 3X4 matrix of float' +ERROR: 0:151: '=' : cannot convert from ' const 2X2 matrix of float' to ' temp 3X4 matrix of float' +ERROR: 0:152: '=' : cannot convert from ' const 2X3 matrix of float' to ' temp 3X4 matrix of float' +ERROR: 0:153: '=' : cannot convert from ' const 2X4 matrix of float' to ' temp 3X4 matrix of float' +ERROR: 0:154: '=' : cannot convert from ' const 3X2 matrix of float' to ' temp 3X4 matrix of float' +ERROR: 0:155: '=' : cannot convert from ' const 3X3 matrix of float' to ' temp 3X4 matrix of float' +ERROR: 0:156: '=' : cannot convert from ' const 4X2 matrix of float' to ' temp 3X4 matrix of float' +ERROR: 0:157: '=' : cannot convert from ' const 4X3 matrix of float' to ' temp 3X4 matrix of float' +ERROR: 0:158: '=' : cannot convert from ' const 2-component vector of float' to ' temp 4X2 matrix of float' +ERROR: 0:159: '=' : cannot convert from ' const 3-component vector of float' to ' temp 4X2 matrix of float' +ERROR: 0:160: '=' : cannot convert from ' const 4-component vector of float' to ' temp 4X2 matrix of float' +ERROR: 0:161: '=' : cannot convert from ' const 2X2 matrix of float' to ' temp 4X2 matrix of float' +ERROR: 0:162: '=' : cannot convert from ' const 2X3 matrix of float' to ' temp 4X2 matrix of float' +ERROR: 0:163: '=' : cannot convert from ' const 2X4 matrix of float' to ' temp 4X2 matrix of float' +ERROR: 0:164: '=' : cannot convert from ' const 3X2 matrix of float' to ' temp 4X2 matrix of float' +ERROR: 0:165: '=' : cannot convert from ' const 3X3 matrix of float' to ' temp 4X2 matrix of float' +ERROR: 0:166: '=' : cannot convert from ' const 3X4 matrix of float' to ' temp 4X2 matrix of float' +ERROR: 0:167: '=' : cannot convert from ' const 2-component vector of float' to ' temp 4X3 matrix of float' +ERROR: 0:168: '=' : cannot convert from ' const 3-component vector of float' to ' temp 4X3 matrix of float' +ERROR: 0:169: '=' : cannot convert from ' const 4-component vector of float' to ' temp 4X3 matrix of float' +ERROR: 0:170: '=' : cannot convert from ' const 2X2 matrix of float' to ' temp 4X3 matrix of float' +ERROR: 0:171: '=' : cannot convert from ' const 2X3 matrix of float' to ' temp 4X3 matrix of float' +ERROR: 0:172: '=' : cannot convert from ' const 2X4 matrix of float' to ' temp 4X3 matrix of float' +ERROR: 0:173: '=' : cannot convert from ' const 3X2 matrix of float' to ' temp 4X3 matrix of float' +ERROR: 0:174: '=' : cannot convert from ' const 3X3 matrix of float' to ' temp 4X3 matrix of float' +ERROR: 0:175: '=' : cannot convert from ' const 3X4 matrix of float' to ' temp 4X3 matrix of float' +ERROR: 0:176: '=' : cannot convert from ' const 4X2 matrix of float' to ' temp 4X3 matrix of float' +ERROR: 0:177: '=' : cannot convert from ' const 2-component vector of float' to ' temp 4X4 matrix of float' +ERROR: 0:178: '=' : cannot convert from ' const 3-component vector of float' to ' temp 4X4 matrix of float' +ERROR: 0:179: '=' : cannot convert from ' const 4-component vector of float' to ' temp 4X4 matrix of float' +ERROR: 0:180: '=' : cannot convert from ' const 2X2 matrix of float' to ' temp 4X4 matrix of float' +ERROR: 0:181: '=' : cannot convert from ' const 2X3 matrix of float' to ' temp 4X4 matrix of float' +ERROR: 0:182: '=' : cannot convert from ' const 2X4 matrix of float' to ' temp 4X4 matrix of float' +ERROR: 0:183: '=' : cannot convert from ' const 3X2 matrix of float' to ' temp 4X4 matrix of float' +ERROR: 0:184: '=' : cannot convert from ' const 3X3 matrix of float' to ' temp 4X4 matrix of float' +ERROR: 0:185: '=' : cannot convert from ' const 3X4 matrix of float' to ' temp 4X4 matrix of float' +ERROR: 0:186: '=' : cannot convert from ' const 4X2 matrix of float' to ' temp 4X4 matrix of float' +ERROR: 0:187: '=' : cannot convert from ' const 4X3 matrix of float' to ' temp 4X4 matrix of float' +ERROR: 100 compilation errors. No code generated. + + +Shader version: 500 +gl_FragCoord origin is upper left +ERROR: node is still EOpNull! +0:18 Function Definition: @main( ( temp 4-component vector of float) +0:18 Function Parameters: +0:? Sequence +0:19 Sequence +0:19 move second child to first child ( temp float) +0:19 'var0' ( temp float) +0:19 Constant: +0:19 0.000000 +0:20 Sequence +0:20 move second child to first child ( temp 2-component vector of float) +0:20 'var13' ( temp 2-component vector of float) +0:20 Constant: +0:20 0.000000 +0:20 0.000000 +0:21 Sequence +0:21 move second child to first child ( temp 2-component vector of float) +0:21 'var14' ( temp 2-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:22 Sequence +0:22 move second child to first child ( temp 3-component vector of float) +0:22 'var26' ( temp 3-component vector of float) +0:22 Constant: +0:22 0.000000 +0:22 0.000000 +0:22 0.000000 +0:23 Sequence +0:23 move second child to first child ( temp 3-component vector of float) +0:23 'var28' ( temp 3-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:24 Sequence +0:24 move second child to first child ( temp 4-component vector of float) +0:24 'var39' ( temp 4-component vector of float) +0:24 Constant: +0:24 0.000000 +0:24 0.000000 +0:24 0.000000 +0:24 0.000000 +0:25 Sequence +0:25 move second child to first child ( temp 4-component vector of float) +0:25 'var42' ( temp 4-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:26 Sequence +0:26 move second child to first child ( temp 4-component vector of float) +0:26 'var43' ( temp 4-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:27 Sequence +0:27 move second child to first child ( temp 2X2 matrix of float) +0:27 'var52' ( temp 2X2 matrix of float) +0:27 Constant: +0:27 0.000000 +0:27 0.000000 +0:27 0.000000 +0:27 0.000000 +0:28 Sequence +0:28 move second child to first child ( temp 2X2 matrix of float) +0:28 'var55' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:29 Sequence +0:29 move second child to first child ( temp 2X2 matrix of float) +0:29 'var56' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:30 Sequence +0:30 move second child to first child ( temp 2X3 matrix of float) +0:30 'var65' ( temp 2X3 matrix of float) +0:30 Constant: +0:30 0.000000 +0:30 0.000000 +0:30 0.000000 +0:30 0.000000 +0:30 0.000000 +0:30 0.000000 +0:31 Sequence +0:31 move second child to first child ( temp 2X3 matrix of float) +0:31 'var70' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:32 Sequence +0:32 move second child to first child ( temp 2X4 matrix of float) +0:32 'var78' ( temp 2X4 matrix of float) +0:32 Constant: +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:33 Sequence +0:33 move second child to first child ( temp 2X4 matrix of float) +0:33 'var84' ( temp 2X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:34 Sequence +0:34 move second child to first child ( temp 3X2 matrix of float) +0:34 'var91' ( temp 3X2 matrix of float) +0:34 Constant: +0:34 0.000000 +0:34 0.000000 +0:34 0.000000 +0:34 0.000000 +0:34 0.000000 +0:34 0.000000 +0:35 Sequence +0:35 move second child to first child ( temp 3X2 matrix of float) +0:35 'var98' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:36 Sequence +0:36 move second child to first child ( temp 3X3 matrix of float) +0:36 'var104' ( temp 3X3 matrix of float) +0:36 Constant: +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:37 Sequence +0:37 move second child to first child ( temp 3X3 matrix of float) +0:37 'var112' ( temp 3X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:38 Sequence +0:38 move second child to first child ( temp 3X4 matrix of float) +0:38 'var117' ( temp 3X4 matrix of float) +0:38 Constant: +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:39 Sequence +0:39 move second child to first child ( temp 3X4 matrix of float) +0:39 'var126' ( temp 3X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:40 Sequence +0:40 move second child to first child ( temp 4X2 matrix of float) +0:40 'var130' ( temp 4X2 matrix of float) +0:40 Constant: +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:41 Sequence +0:41 move second child to first child ( temp 4X2 matrix of float) +0:41 'var140' ( temp 4X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:42 Sequence +0:42 move second child to first child ( temp 4X3 matrix of float) +0:42 'var143' ( temp 4X3 matrix of float) +0:42 Constant: +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:43 Sequence +0:43 move second child to first child ( temp 4X3 matrix of float) +0:43 'var154' ( temp 4X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:44 Sequence +0:44 move second child to first child ( temp 4X4 matrix of float) +0:44 'var156' ( temp 4X4 matrix of float) +0:44 Constant: +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:45 Sequence +0:45 move second child to first child ( temp 4X4 matrix of float) +0:45 'var168' ( temp 4X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:46 Sequence +0:46 move second child to first child ( temp float) +0:46 'var1' ( temp float) +0:? Constant: +0:? 0.000000 +0:47 Sequence +0:47 move second child to first child ( temp float) +0:47 'var2' ( temp float) +0:? Constant: +0:? 0.000000 +0:48 Sequence +0:48 move second child to first child ( temp float) +0:48 'var3' ( temp float) +0:? Constant: +0:? 0.000000 +0:49 Sequence +0:49 move second child to first child ( temp float) +0:49 'var4' ( temp float) +0:? Constant: +0:? 0.000000 +0:50 Sequence +0:50 move second child to first child ( temp float) +0:50 'var5' ( temp float) +0:? Constant: +0:? 0.000000 +0:51 Sequence +0:51 move second child to first child ( temp float) +0:51 'var6' ( temp float) +0:? Constant: +0:? 0.000000 +0:52 Sequence +0:52 move second child to first child ( temp float) +0:52 'var7' ( temp float) +0:? Constant: +0:? 0.000000 +0:53 Sequence +0:53 move second child to first child ( temp float) +0:53 'var8' ( temp float) +0:? Constant: +0:? 0.000000 +0:54 Sequence +0:54 move second child to first child ( temp float) +0:54 'var9' ( temp float) +0:? Constant: +0:? 0.000000 +0:55 Sequence +0:55 move second child to first child ( temp float) +0:55 'var10' ( temp float) +0:? Constant: +0:? 0.000000 +0:56 Sequence +0:56 move second child to first child ( temp float) +0:56 'var11' ( temp float) +0:? Constant: +0:? 0.000000 +0:57 Sequence +0:57 move second child to first child ( temp float) +0:57 'var12' ( temp float) +0:? Constant: +0:? 0.000000 +0:58 Sequence +0:58 move second child to first child ( temp 2-component vector of float) +0:58 'var15' ( temp 2-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:59 Sequence +0:59 move second child to first child ( temp 2-component vector of float) +0:59 'var16' ( temp 2-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:60 Sequence +0:60 move second child to first child ( temp 3-component vector of float) +0:60 'var29' ( temp 3-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:61 Sequence +0:61 move second child to first child ( temp 2X2 matrix of float) +0:61 'var57' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:62 Sequence +0:62 move second child to first child ( temp 2X2 matrix of float) +0:62 'var58' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:63 Sequence +0:63 move second child to first child ( temp 2X2 matrix of float) +0:63 'var59' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:64 Sequence +0:64 move second child to first child ( temp 2X2 matrix of float) +0:64 'var60' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:65 Sequence +0:65 move second child to first child ( temp 2X2 matrix of float) +0:65 'var61' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:66 Sequence +0:66 move second child to first child ( temp 2X2 matrix of float) +0:66 'var62' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:67 Sequence +0:67 move second child to first child ( temp 2X2 matrix of float) +0:67 'var63' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:68 Sequence +0:68 move second child to first child ( temp 2X2 matrix of float) +0:68 'var64' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:69 Sequence +0:69 move second child to first child ( temp 2X3 matrix of float) +0:69 'var71' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:70 Sequence +0:70 move second child to first child ( temp 2X3 matrix of float) +0:70 'var73' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:71 Sequence +0:71 move second child to first child ( temp 2X3 matrix of float) +0:71 'var74' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:72 Sequence +0:72 move second child to first child ( temp 2X3 matrix of float) +0:72 'var76' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:73 Sequence +0:73 move second child to first child ( temp 2X3 matrix of float) +0:73 'var77' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:74 Sequence +0:74 move second child to first child ( temp 2X4 matrix of float) +0:74 'var87' ( temp 2X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:75 Sequence +0:75 move second child to first child ( temp 2X4 matrix of float) +0:75 'var90' ( temp 2X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:76 Sequence +0:76 move second child to first child ( temp 3X2 matrix of float) +0:76 'var99' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:77 Sequence +0:77 move second child to first child ( temp 3X2 matrix of float) +0:77 'var100' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:78 Sequence +0:78 move second child to first child ( temp 3X2 matrix of float) +0:78 'var101' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:79 Sequence +0:79 move second child to first child ( temp 3X2 matrix of float) +0:79 'var102' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:80 Sequence +0:80 move second child to first child ( temp 3X2 matrix of float) +0:80 'var103' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:81 Sequence +0:81 move second child to first child ( temp 3X3 matrix of float) +0:81 'var113' ( temp 3X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:82 Sequence +0:82 move second child to first child ( temp 3X3 matrix of float) +0:82 'var115' ( temp 3X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:83 Sequence +0:83 move second child to first child ( temp 3X3 matrix of float) +0:83 'var116' ( temp 3X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:84 Sequence +0:84 move second child to first child ( temp 3X4 matrix of float) +0:84 'var129' ( temp 3X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:85 Sequence +0:85 move second child to first child ( temp 4X2 matrix of float) +0:85 'var141' ( temp 4X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:86 Sequence +0:86 move second child to first child ( temp 4X2 matrix of float) +0:86 'var142' ( temp 4X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:87 Sequence +0:87 move second child to first child ( temp 4X3 matrix of float) +0:87 'var155' ( temp 4X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:188 Branch: Return with expression +0:188 Constant: +0:188 0.000000 +0:188 0.000000 +0:188 0.000000 +0:188 0.000000 +0:18 Function Definition: main( ( temp void) +0:18 Function Parameters: +0:? Sequence +0:18 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) +0:18 Function Call: @main( ( temp 4-component vector of float) +0:? Linker Objects +0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) + + +Linked fragment stage: + + +Shader version: 500 +gl_FragCoord origin is upper left +ERROR: node is still EOpNull! +0:18 Function Definition: @main( ( temp 4-component vector of float) +0:18 Function Parameters: +0:? Sequence +0:19 Sequence +0:19 move second child to first child ( temp float) +0:19 'var0' ( temp float) +0:19 Constant: +0:19 0.000000 +0:20 Sequence +0:20 move second child to first child ( temp 2-component vector of float) +0:20 'var13' ( temp 2-component vector of float) +0:20 Constant: +0:20 0.000000 +0:20 0.000000 +0:21 Sequence +0:21 move second child to first child ( temp 2-component vector of float) +0:21 'var14' ( temp 2-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:22 Sequence +0:22 move second child to first child ( temp 3-component vector of float) +0:22 'var26' ( temp 3-component vector of float) +0:22 Constant: +0:22 0.000000 +0:22 0.000000 +0:22 0.000000 +0:23 Sequence +0:23 move second child to first child ( temp 3-component vector of float) +0:23 'var28' ( temp 3-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:24 Sequence +0:24 move second child to first child ( temp 4-component vector of float) +0:24 'var39' ( temp 4-component vector of float) +0:24 Constant: +0:24 0.000000 +0:24 0.000000 +0:24 0.000000 +0:24 0.000000 +0:25 Sequence +0:25 move second child to first child ( temp 4-component vector of float) +0:25 'var42' ( temp 4-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:26 Sequence +0:26 move second child to first child ( temp 4-component vector of float) +0:26 'var43' ( temp 4-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:27 Sequence +0:27 move second child to first child ( temp 2X2 matrix of float) +0:27 'var52' ( temp 2X2 matrix of float) +0:27 Constant: +0:27 0.000000 +0:27 0.000000 +0:27 0.000000 +0:27 0.000000 +0:28 Sequence +0:28 move second child to first child ( temp 2X2 matrix of float) +0:28 'var55' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:29 Sequence +0:29 move second child to first child ( temp 2X2 matrix of float) +0:29 'var56' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:30 Sequence +0:30 move second child to first child ( temp 2X3 matrix of float) +0:30 'var65' ( temp 2X3 matrix of float) +0:30 Constant: +0:30 0.000000 +0:30 0.000000 +0:30 0.000000 +0:30 0.000000 +0:30 0.000000 +0:30 0.000000 +0:31 Sequence +0:31 move second child to first child ( temp 2X3 matrix of float) +0:31 'var70' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:32 Sequence +0:32 move second child to first child ( temp 2X4 matrix of float) +0:32 'var78' ( temp 2X4 matrix of float) +0:32 Constant: +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:33 Sequence +0:33 move second child to first child ( temp 2X4 matrix of float) +0:33 'var84' ( temp 2X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:34 Sequence +0:34 move second child to first child ( temp 3X2 matrix of float) +0:34 'var91' ( temp 3X2 matrix of float) +0:34 Constant: +0:34 0.000000 +0:34 0.000000 +0:34 0.000000 +0:34 0.000000 +0:34 0.000000 +0:34 0.000000 +0:35 Sequence +0:35 move second child to first child ( temp 3X2 matrix of float) +0:35 'var98' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:36 Sequence +0:36 move second child to first child ( temp 3X3 matrix of float) +0:36 'var104' ( temp 3X3 matrix of float) +0:36 Constant: +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:37 Sequence +0:37 move second child to first child ( temp 3X3 matrix of float) +0:37 'var112' ( temp 3X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:38 Sequence +0:38 move second child to first child ( temp 3X4 matrix of float) +0:38 'var117' ( temp 3X4 matrix of float) +0:38 Constant: +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:39 Sequence +0:39 move second child to first child ( temp 3X4 matrix of float) +0:39 'var126' ( temp 3X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:40 Sequence +0:40 move second child to first child ( temp 4X2 matrix of float) +0:40 'var130' ( temp 4X2 matrix of float) +0:40 Constant: +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:41 Sequence +0:41 move second child to first child ( temp 4X2 matrix of float) +0:41 'var140' ( temp 4X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:42 Sequence +0:42 move second child to first child ( temp 4X3 matrix of float) +0:42 'var143' ( temp 4X3 matrix of float) +0:42 Constant: +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:43 Sequence +0:43 move second child to first child ( temp 4X3 matrix of float) +0:43 'var154' ( temp 4X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:44 Sequence +0:44 move second child to first child ( temp 4X4 matrix of float) +0:44 'var156' ( temp 4X4 matrix of float) +0:44 Constant: +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:45 Sequence +0:45 move second child to first child ( temp 4X4 matrix of float) +0:45 'var168' ( temp 4X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:46 Sequence +0:46 move second child to first child ( temp float) +0:46 'var1' ( temp float) +0:? Constant: +0:? 0.000000 +0:47 Sequence +0:47 move second child to first child ( temp float) +0:47 'var2' ( temp float) +0:? Constant: +0:? 0.000000 +0:48 Sequence +0:48 move second child to first child ( temp float) +0:48 'var3' ( temp float) +0:? Constant: +0:? 0.000000 +0:49 Sequence +0:49 move second child to first child ( temp float) +0:49 'var4' ( temp float) +0:? Constant: +0:? 0.000000 +0:50 Sequence +0:50 move second child to first child ( temp float) +0:50 'var5' ( temp float) +0:? Constant: +0:? 0.000000 +0:51 Sequence +0:51 move second child to first child ( temp float) +0:51 'var6' ( temp float) +0:? Constant: +0:? 0.000000 +0:52 Sequence +0:52 move second child to first child ( temp float) +0:52 'var7' ( temp float) +0:? Constant: +0:? 0.000000 +0:53 Sequence +0:53 move second child to first child ( temp float) +0:53 'var8' ( temp float) +0:? Constant: +0:? 0.000000 +0:54 Sequence +0:54 move second child to first child ( temp float) +0:54 'var9' ( temp float) +0:? Constant: +0:? 0.000000 +0:55 Sequence +0:55 move second child to first child ( temp float) +0:55 'var10' ( temp float) +0:? Constant: +0:? 0.000000 +0:56 Sequence +0:56 move second child to first child ( temp float) +0:56 'var11' ( temp float) +0:? Constant: +0:? 0.000000 +0:57 Sequence +0:57 move second child to first child ( temp float) +0:57 'var12' ( temp float) +0:? Constant: +0:? 0.000000 +0:58 Sequence +0:58 move second child to first child ( temp 2-component vector of float) +0:58 'var15' ( temp 2-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:59 Sequence +0:59 move second child to first child ( temp 2-component vector of float) +0:59 'var16' ( temp 2-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:60 Sequence +0:60 move second child to first child ( temp 3-component vector of float) +0:60 'var29' ( temp 3-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:61 Sequence +0:61 move second child to first child ( temp 2X2 matrix of float) +0:61 'var57' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:62 Sequence +0:62 move second child to first child ( temp 2X2 matrix of float) +0:62 'var58' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:63 Sequence +0:63 move second child to first child ( temp 2X2 matrix of float) +0:63 'var59' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:64 Sequence +0:64 move second child to first child ( temp 2X2 matrix of float) +0:64 'var60' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:65 Sequence +0:65 move second child to first child ( temp 2X2 matrix of float) +0:65 'var61' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:66 Sequence +0:66 move second child to first child ( temp 2X2 matrix of float) +0:66 'var62' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:67 Sequence +0:67 move second child to first child ( temp 2X2 matrix of float) +0:67 'var63' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:68 Sequence +0:68 move second child to first child ( temp 2X2 matrix of float) +0:68 'var64' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:69 Sequence +0:69 move second child to first child ( temp 2X3 matrix of float) +0:69 'var71' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:70 Sequence +0:70 move second child to first child ( temp 2X3 matrix of float) +0:70 'var73' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:71 Sequence +0:71 move second child to first child ( temp 2X3 matrix of float) +0:71 'var74' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:72 Sequence +0:72 move second child to first child ( temp 2X3 matrix of float) +0:72 'var76' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:73 Sequence +0:73 move second child to first child ( temp 2X3 matrix of float) +0:73 'var77' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:74 Sequence +0:74 move second child to first child ( temp 2X4 matrix of float) +0:74 'var87' ( temp 2X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:75 Sequence +0:75 move second child to first child ( temp 2X4 matrix of float) +0:75 'var90' ( temp 2X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:76 Sequence +0:76 move second child to first child ( temp 3X2 matrix of float) +0:76 'var99' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:77 Sequence +0:77 move second child to first child ( temp 3X2 matrix of float) +0:77 'var100' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:78 Sequence +0:78 move second child to first child ( temp 3X2 matrix of float) +0:78 'var101' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:79 Sequence +0:79 move second child to first child ( temp 3X2 matrix of float) +0:79 'var102' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:80 Sequence +0:80 move second child to first child ( temp 3X2 matrix of float) +0:80 'var103' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:81 Sequence +0:81 move second child to first child ( temp 3X3 matrix of float) +0:81 'var113' ( temp 3X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:82 Sequence +0:82 move second child to first child ( temp 3X3 matrix of float) +0:82 'var115' ( temp 3X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:83 Sequence +0:83 move second child to first child ( temp 3X3 matrix of float) +0:83 'var116' ( temp 3X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:84 Sequence +0:84 move second child to first child ( temp 3X4 matrix of float) +0:84 'var129' ( temp 3X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:85 Sequence +0:85 move second child to first child ( temp 4X2 matrix of float) +0:85 'var141' ( temp 4X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:86 Sequence +0:86 move second child to first child ( temp 4X2 matrix of float) +0:86 'var142' ( temp 4X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:87 Sequence +0:87 move second child to first child ( temp 4X3 matrix of float) +0:87 'var155' ( temp 4X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:188 Branch: Return with expression +0:188 Constant: +0:188 0.000000 +0:188 0.000000 +0:188 0.000000 +0:188 0.000000 +0:18 Function Definition: main( ( temp void) +0:18 Function Parameters: +0:? Sequence +0:18 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) +0:18 Function Call: @main( ( temp 4-component vector of float) +0:? Linker Objects +0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) + +SPIR-V is not generated for failed compile or link diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.type.type.conversion.valid.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.type.type.conversion.valid.frag.out new file mode 100644 index 0000000000..fc67200146 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.type.type.conversion.valid.frag.out @@ -0,0 +1,1640 @@ +hlsl.type.type.conversion.valid.frag +Shader version: 500 +gl_FragCoord origin is upper left +0:? Sequence +0:18 Function Definition: @main( ( temp 4-component vector of float) +0:18 Function Parameters: +0:? Sequence +0:19 Sequence +0:19 move second child to first child ( temp float) +0:19 'var0' ( temp float) +0:19 Constant: +0:19 0.000000 +0:20 Sequence +0:20 move second child to first child ( temp 2-component vector of float) +0:20 'var13' ( temp 2-component vector of float) +0:20 Constant: +0:20 0.000000 +0:20 0.000000 +0:21 Sequence +0:21 move second child to first child ( temp 2-component vector of float) +0:21 'var14' ( temp 2-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:22 Sequence +0:22 move second child to first child ( temp 3-component vector of float) +0:22 'var26' ( temp 3-component vector of float) +0:22 Constant: +0:22 0.000000 +0:22 0.000000 +0:22 0.000000 +0:23 Sequence +0:23 move second child to first child ( temp 3-component vector of float) +0:23 'var28' ( temp 3-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:24 Sequence +0:24 move second child to first child ( temp 4-component vector of float) +0:24 'var39' ( temp 4-component vector of float) +0:24 Constant: +0:24 0.000000 +0:24 0.000000 +0:24 0.000000 +0:24 0.000000 +0:25 Sequence +0:25 move second child to first child ( temp 4-component vector of float) +0:25 'var42' ( temp 4-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:26 Sequence +0:26 move second child to first child ( temp 4-component vector of float) +0:26 'var43' ( temp 4-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:27 Sequence +0:27 move second child to first child ( temp 2X2 matrix of float) +0:27 'var52' ( temp 2X2 matrix of float) +0:27 Constant: +0:27 0.000000 +0:27 0.000000 +0:27 0.000000 +0:27 0.000000 +0:28 Sequence +0:28 move second child to first child ( temp 2X2 matrix of float) +0:28 'var55' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:29 Sequence +0:29 move second child to first child ( temp 2X2 matrix of float) +0:29 'var56' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:30 Sequence +0:30 move second child to first child ( temp 2X3 matrix of float) +0:30 'var65' ( temp 2X3 matrix of float) +0:30 Constant: +0:30 0.000000 +0:30 0.000000 +0:30 0.000000 +0:30 0.000000 +0:30 0.000000 +0:30 0.000000 +0:31 Sequence +0:31 move second child to first child ( temp 2X3 matrix of float) +0:31 'var70' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:32 Sequence +0:32 move second child to first child ( temp 2X4 matrix of float) +0:32 'var78' ( temp 2X4 matrix of float) +0:32 Constant: +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:33 Sequence +0:33 move second child to first child ( temp 2X4 matrix of float) +0:33 'var84' ( temp 2X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:34 Sequence +0:34 move second child to first child ( temp 3X2 matrix of float) +0:34 'var91' ( temp 3X2 matrix of float) +0:34 Constant: +0:34 0.000000 +0:34 0.000000 +0:34 0.000000 +0:34 0.000000 +0:34 0.000000 +0:34 0.000000 +0:35 Sequence +0:35 move second child to first child ( temp 3X2 matrix of float) +0:35 'var98' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:36 Sequence +0:36 move second child to first child ( temp 3X3 matrix of float) +0:36 'var104' ( temp 3X3 matrix of float) +0:36 Constant: +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:37 Sequence +0:37 move second child to first child ( temp 3X3 matrix of float) +0:37 'var112' ( temp 3X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:38 Sequence +0:38 move second child to first child ( temp 3X4 matrix of float) +0:38 'var117' ( temp 3X4 matrix of float) +0:38 Constant: +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:39 Sequence +0:39 move second child to first child ( temp 3X4 matrix of float) +0:39 'var126' ( temp 3X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:40 Sequence +0:40 move second child to first child ( temp 4X2 matrix of float) +0:40 'var130' ( temp 4X2 matrix of float) +0:40 Constant: +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:41 Sequence +0:41 move second child to first child ( temp 4X2 matrix of float) +0:41 'var140' ( temp 4X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:42 Sequence +0:42 move second child to first child ( temp 4X3 matrix of float) +0:42 'var143' ( temp 4X3 matrix of float) +0:42 Constant: +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:43 Sequence +0:43 move second child to first child ( temp 4X3 matrix of float) +0:43 'var154' ( temp 4X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:44 Sequence +0:44 move second child to first child ( temp 4X4 matrix of float) +0:44 'var156' ( temp 4X4 matrix of float) +0:44 Constant: +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:45 Sequence +0:45 move second child to first child ( temp 4X4 matrix of float) +0:45 'var168' ( temp 4X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:46 Sequence +0:46 move second child to first child ( temp float) +0:46 'var1' ( temp float) +0:? Constant: +0:? 0.000000 +0:47 Sequence +0:47 move second child to first child ( temp float) +0:47 'var2' ( temp float) +0:? Constant: +0:? 0.000000 +0:48 Sequence +0:48 move second child to first child ( temp float) +0:48 'var3' ( temp float) +0:? Constant: +0:? 0.000000 +0:49 Sequence +0:49 move second child to first child ( temp float) +0:49 'var4' ( temp float) +0:? Constant: +0:? 0.000000 +0:50 Sequence +0:50 move second child to first child ( temp float) +0:50 'var5' ( temp float) +0:? Constant: +0:? 0.000000 +0:51 Sequence +0:51 move second child to first child ( temp float) +0:51 'var6' ( temp float) +0:? Constant: +0:? 0.000000 +0:52 Sequence +0:52 move second child to first child ( temp float) +0:52 'var7' ( temp float) +0:? Constant: +0:? 0.000000 +0:53 Sequence +0:53 move second child to first child ( temp float) +0:53 'var8' ( temp float) +0:? Constant: +0:? 0.000000 +0:54 Sequence +0:54 move second child to first child ( temp float) +0:54 'var9' ( temp float) +0:? Constant: +0:? 0.000000 +0:55 Sequence +0:55 move second child to first child ( temp float) +0:55 'var10' ( temp float) +0:? Constant: +0:? 0.000000 +0:56 Sequence +0:56 move second child to first child ( temp float) +0:56 'var11' ( temp float) +0:? Constant: +0:? 0.000000 +0:57 Sequence +0:57 move second child to first child ( temp float) +0:57 'var12' ( temp float) +0:? Constant: +0:? 0.000000 +0:58 Sequence +0:58 move second child to first child ( temp 2-component vector of float) +0:58 'var15' ( temp 2-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:59 Sequence +0:59 move second child to first child ( temp 2-component vector of float) +0:59 'var16' ( temp 2-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:60 Sequence +0:60 move second child to first child ( temp 3-component vector of float) +0:60 'var29' ( temp 3-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:61 Sequence +0:61 move second child to first child ( temp 2X2 matrix of float) +0:61 'var57' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:62 Sequence +0:62 move second child to first child ( temp 2X2 matrix of float) +0:62 'var58' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:63 Sequence +0:63 move second child to first child ( temp 2X2 matrix of float) +0:63 'var59' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:64 Sequence +0:64 move second child to first child ( temp 2X2 matrix of float) +0:64 'var60' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:65 Sequence +0:65 move second child to first child ( temp 2X2 matrix of float) +0:65 'var61' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:66 Sequence +0:66 move second child to first child ( temp 2X2 matrix of float) +0:66 'var62' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:67 Sequence +0:67 move second child to first child ( temp 2X2 matrix of float) +0:67 'var63' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:68 Sequence +0:68 move second child to first child ( temp 2X2 matrix of float) +0:68 'var64' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:69 Sequence +0:69 move second child to first child ( temp 2X3 matrix of float) +0:69 'var71' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:70 Sequence +0:70 move second child to first child ( temp 2X3 matrix of float) +0:70 'var73' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:71 Sequence +0:71 move second child to first child ( temp 2X3 matrix of float) +0:71 'var74' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:72 Sequence +0:72 move second child to first child ( temp 2X3 matrix of float) +0:72 'var76' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:73 Sequence +0:73 move second child to first child ( temp 2X3 matrix of float) +0:73 'var77' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:74 Sequence +0:74 move second child to first child ( temp 2X4 matrix of float) +0:74 'var87' ( temp 2X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:75 Sequence +0:75 move second child to first child ( temp 2X4 matrix of float) +0:75 'var90' ( temp 2X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:76 Sequence +0:76 move second child to first child ( temp 3X2 matrix of float) +0:76 'var99' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:77 Sequence +0:77 move second child to first child ( temp 3X2 matrix of float) +0:77 'var100' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:78 Sequence +0:78 move second child to first child ( temp 3X2 matrix of float) +0:78 'var101' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:79 Sequence +0:79 move second child to first child ( temp 3X2 matrix of float) +0:79 'var102' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:80 Sequence +0:80 move second child to first child ( temp 3X2 matrix of float) +0:80 'var103' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:81 Sequence +0:81 move second child to first child ( temp 3X3 matrix of float) +0:81 'var113' ( temp 3X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:82 Sequence +0:82 move second child to first child ( temp 3X3 matrix of float) +0:82 'var115' ( temp 3X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:83 Sequence +0:83 move second child to first child ( temp 3X3 matrix of float) +0:83 'var116' ( temp 3X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:84 Sequence +0:84 move second child to first child ( temp 3X4 matrix of float) +0:84 'var129' ( temp 3X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:85 Sequence +0:85 move second child to first child ( temp 4X2 matrix of float) +0:85 'var141' ( temp 4X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:86 Sequence +0:86 move second child to first child ( temp 4X2 matrix of float) +0:86 'var142' ( temp 4X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:87 Sequence +0:87 move second child to first child ( temp 4X3 matrix of float) +0:87 'var155' ( temp 4X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:88 Branch: Return with expression +0:88 Constant: +0:88 0.000000 +0:88 0.000000 +0:88 0.000000 +0:88 0.000000 +0:18 Function Definition: main( ( temp void) +0:18 Function Parameters: +0:? Sequence +0:18 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) +0:18 Function Call: @main( ( temp 4-component vector of float) +0:? Linker Objects +0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) + + +Linked fragment stage: + + +Shader version: 500 +gl_FragCoord origin is upper left +0:? Sequence +0:18 Function Definition: @main( ( temp 4-component vector of float) +0:18 Function Parameters: +0:? Sequence +0:19 Sequence +0:19 move second child to first child ( temp float) +0:19 'var0' ( temp float) +0:19 Constant: +0:19 0.000000 +0:20 Sequence +0:20 move second child to first child ( temp 2-component vector of float) +0:20 'var13' ( temp 2-component vector of float) +0:20 Constant: +0:20 0.000000 +0:20 0.000000 +0:21 Sequence +0:21 move second child to first child ( temp 2-component vector of float) +0:21 'var14' ( temp 2-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:22 Sequence +0:22 move second child to first child ( temp 3-component vector of float) +0:22 'var26' ( temp 3-component vector of float) +0:22 Constant: +0:22 0.000000 +0:22 0.000000 +0:22 0.000000 +0:23 Sequence +0:23 move second child to first child ( temp 3-component vector of float) +0:23 'var28' ( temp 3-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:24 Sequence +0:24 move second child to first child ( temp 4-component vector of float) +0:24 'var39' ( temp 4-component vector of float) +0:24 Constant: +0:24 0.000000 +0:24 0.000000 +0:24 0.000000 +0:24 0.000000 +0:25 Sequence +0:25 move second child to first child ( temp 4-component vector of float) +0:25 'var42' ( temp 4-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:26 Sequence +0:26 move second child to first child ( temp 4-component vector of float) +0:26 'var43' ( temp 4-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:27 Sequence +0:27 move second child to first child ( temp 2X2 matrix of float) +0:27 'var52' ( temp 2X2 matrix of float) +0:27 Constant: +0:27 0.000000 +0:27 0.000000 +0:27 0.000000 +0:27 0.000000 +0:28 Sequence +0:28 move second child to first child ( temp 2X2 matrix of float) +0:28 'var55' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:29 Sequence +0:29 move second child to first child ( temp 2X2 matrix of float) +0:29 'var56' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:30 Sequence +0:30 move second child to first child ( temp 2X3 matrix of float) +0:30 'var65' ( temp 2X3 matrix of float) +0:30 Constant: +0:30 0.000000 +0:30 0.000000 +0:30 0.000000 +0:30 0.000000 +0:30 0.000000 +0:30 0.000000 +0:31 Sequence +0:31 move second child to first child ( temp 2X3 matrix of float) +0:31 'var70' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:32 Sequence +0:32 move second child to first child ( temp 2X4 matrix of float) +0:32 'var78' ( temp 2X4 matrix of float) +0:32 Constant: +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:32 0.000000 +0:33 Sequence +0:33 move second child to first child ( temp 2X4 matrix of float) +0:33 'var84' ( temp 2X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:34 Sequence +0:34 move second child to first child ( temp 3X2 matrix of float) +0:34 'var91' ( temp 3X2 matrix of float) +0:34 Constant: +0:34 0.000000 +0:34 0.000000 +0:34 0.000000 +0:34 0.000000 +0:34 0.000000 +0:34 0.000000 +0:35 Sequence +0:35 move second child to first child ( temp 3X2 matrix of float) +0:35 'var98' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:36 Sequence +0:36 move second child to first child ( temp 3X3 matrix of float) +0:36 'var104' ( temp 3X3 matrix of float) +0:36 Constant: +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:36 0.000000 +0:37 Sequence +0:37 move second child to first child ( temp 3X3 matrix of float) +0:37 'var112' ( temp 3X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:38 Sequence +0:38 move second child to first child ( temp 3X4 matrix of float) +0:38 'var117' ( temp 3X4 matrix of float) +0:38 Constant: +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:38 0.000000 +0:39 Sequence +0:39 move second child to first child ( temp 3X4 matrix of float) +0:39 'var126' ( temp 3X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:40 Sequence +0:40 move second child to first child ( temp 4X2 matrix of float) +0:40 'var130' ( temp 4X2 matrix of float) +0:40 Constant: +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:40 0.000000 +0:41 Sequence +0:41 move second child to first child ( temp 4X2 matrix of float) +0:41 'var140' ( temp 4X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:42 Sequence +0:42 move second child to first child ( temp 4X3 matrix of float) +0:42 'var143' ( temp 4X3 matrix of float) +0:42 Constant: +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:42 0.000000 +0:43 Sequence +0:43 move second child to first child ( temp 4X3 matrix of float) +0:43 'var154' ( temp 4X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:44 Sequence +0:44 move second child to first child ( temp 4X4 matrix of float) +0:44 'var156' ( temp 4X4 matrix of float) +0:44 Constant: +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:44 0.000000 +0:45 Sequence +0:45 move second child to first child ( temp 4X4 matrix of float) +0:45 'var168' ( temp 4X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:46 Sequence +0:46 move second child to first child ( temp float) +0:46 'var1' ( temp float) +0:? Constant: +0:? 0.000000 +0:47 Sequence +0:47 move second child to first child ( temp float) +0:47 'var2' ( temp float) +0:? Constant: +0:? 0.000000 +0:48 Sequence +0:48 move second child to first child ( temp float) +0:48 'var3' ( temp float) +0:? Constant: +0:? 0.000000 +0:49 Sequence +0:49 move second child to first child ( temp float) +0:49 'var4' ( temp float) +0:? Constant: +0:? 0.000000 +0:50 Sequence +0:50 move second child to first child ( temp float) +0:50 'var5' ( temp float) +0:? Constant: +0:? 0.000000 +0:51 Sequence +0:51 move second child to first child ( temp float) +0:51 'var6' ( temp float) +0:? Constant: +0:? 0.000000 +0:52 Sequence +0:52 move second child to first child ( temp float) +0:52 'var7' ( temp float) +0:? Constant: +0:? 0.000000 +0:53 Sequence +0:53 move second child to first child ( temp float) +0:53 'var8' ( temp float) +0:? Constant: +0:? 0.000000 +0:54 Sequence +0:54 move second child to first child ( temp float) +0:54 'var9' ( temp float) +0:? Constant: +0:? 0.000000 +0:55 Sequence +0:55 move second child to first child ( temp float) +0:55 'var10' ( temp float) +0:? Constant: +0:? 0.000000 +0:56 Sequence +0:56 move second child to first child ( temp float) +0:56 'var11' ( temp float) +0:? Constant: +0:? 0.000000 +0:57 Sequence +0:57 move second child to first child ( temp float) +0:57 'var12' ( temp float) +0:? Constant: +0:? 0.000000 +0:58 Sequence +0:58 move second child to first child ( temp 2-component vector of float) +0:58 'var15' ( temp 2-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:59 Sequence +0:59 move second child to first child ( temp 2-component vector of float) +0:59 'var16' ( temp 2-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:60 Sequence +0:60 move second child to first child ( temp 3-component vector of float) +0:60 'var29' ( temp 3-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:61 Sequence +0:61 move second child to first child ( temp 2X2 matrix of float) +0:61 'var57' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:62 Sequence +0:62 move second child to first child ( temp 2X2 matrix of float) +0:62 'var58' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:63 Sequence +0:63 move second child to first child ( temp 2X2 matrix of float) +0:63 'var59' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:64 Sequence +0:64 move second child to first child ( temp 2X2 matrix of float) +0:64 'var60' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:65 Sequence +0:65 move second child to first child ( temp 2X2 matrix of float) +0:65 'var61' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:66 Sequence +0:66 move second child to first child ( temp 2X2 matrix of float) +0:66 'var62' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:67 Sequence +0:67 move second child to first child ( temp 2X2 matrix of float) +0:67 'var63' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:68 Sequence +0:68 move second child to first child ( temp 2X2 matrix of float) +0:68 'var64' ( temp 2X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:69 Sequence +0:69 move second child to first child ( temp 2X3 matrix of float) +0:69 'var71' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:70 Sequence +0:70 move second child to first child ( temp 2X3 matrix of float) +0:70 'var73' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:71 Sequence +0:71 move second child to first child ( temp 2X3 matrix of float) +0:71 'var74' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:72 Sequence +0:72 move second child to first child ( temp 2X3 matrix of float) +0:72 'var76' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:73 Sequence +0:73 move second child to first child ( temp 2X3 matrix of float) +0:73 'var77' ( temp 2X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:74 Sequence +0:74 move second child to first child ( temp 2X4 matrix of float) +0:74 'var87' ( temp 2X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:75 Sequence +0:75 move second child to first child ( temp 2X4 matrix of float) +0:75 'var90' ( temp 2X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:76 Sequence +0:76 move second child to first child ( temp 3X2 matrix of float) +0:76 'var99' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:77 Sequence +0:77 move second child to first child ( temp 3X2 matrix of float) +0:77 'var100' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:78 Sequence +0:78 move second child to first child ( temp 3X2 matrix of float) +0:78 'var101' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:79 Sequence +0:79 move second child to first child ( temp 3X2 matrix of float) +0:79 'var102' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:80 Sequence +0:80 move second child to first child ( temp 3X2 matrix of float) +0:80 'var103' ( temp 3X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:81 Sequence +0:81 move second child to first child ( temp 3X3 matrix of float) +0:81 'var113' ( temp 3X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:82 Sequence +0:82 move second child to first child ( temp 3X3 matrix of float) +0:82 'var115' ( temp 3X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:83 Sequence +0:83 move second child to first child ( temp 3X3 matrix of float) +0:83 'var116' ( temp 3X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:84 Sequence +0:84 move second child to first child ( temp 3X4 matrix of float) +0:84 'var129' ( temp 3X4 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:85 Sequence +0:85 move second child to first child ( temp 4X2 matrix of float) +0:85 'var141' ( temp 4X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:86 Sequence +0:86 move second child to first child ( temp 4X2 matrix of float) +0:86 'var142' ( temp 4X2 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:87 Sequence +0:87 move second child to first child ( temp 4X3 matrix of float) +0:87 'var155' ( temp 4X3 matrix of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:88 Branch: Return with expression +0:88 Constant: +0:88 0.000000 +0:88 0.000000 +0:88 0.000000 +0:88 0.000000 +0:18 Function Definition: main( ( temp void) +0:18 Function Parameters: +0:? Sequence +0:18 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) +0:18 Function Call: @main( ( temp 4-component vector of float) +0:? Linker Objects +0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) + +// Module Version 10300 +// Generated by (magic number): 80007 +// Id's are bound by 122 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 120 + ExecutionMode 4 OriginUpperLeft + Source HLSL 500 + Name 4 "main" + Name 9 "@main(" + Name 12 "var0" + Name 16 "var13" + Name 18 "var14" + Name 21 "var26" + Name 23 "var28" + Name 25 "var39" + Name 27 "var42" + Name 28 "var43" + Name 31 "var52" + Name 33 "var55" + Name 34 "var56" + Name 37 "var65" + Name 39 "var70" + Name 42 "var78" + Name 44 "var84" + Name 47 "var91" + Name 49 "var98" + Name 52 "var104" + Name 54 "var112" + Name 57 "var117" + Name 59 "var126" + Name 62 "var130" + Name 64 "var140" + Name 67 "var143" + Name 69 "var154" + Name 72 "var156" + Name 74 "var168" + Name 75 "var1" + Name 76 "var2" + Name 77 "var3" + Name 78 "var4" + Name 79 "var5" + Name 80 "var6" + Name 81 "var7" + Name 82 "var8" + Name 83 "var9" + Name 84 "var10" + Name 85 "var11" + Name 86 "var12" + Name 87 "var15" + Name 88 "var16" + Name 89 "var29" + Name 90 "var57" + Name 91 "var58" + Name 92 "var59" + Name 93 "var60" + Name 94 "var61" + Name 95 "var62" + Name 96 "var63" + Name 97 "var64" + Name 98 "var71" + Name 99 "var73" + Name 100 "var74" + Name 101 "var76" + Name 102 "var77" + Name 103 "var87" + Name 104 "var90" + Name 105 "var99" + Name 106 "var100" + Name 107 "var101" + Name 108 "var102" + Name 109 "var103" + Name 110 "var113" + Name 111 "var115" + Name 112 "var116" + Name 113 "var129" + Name 114 "var141" + Name 115 "var142" + Name 116 "var155" + Name 120 "@entryPointOutput" + Decorate 120(@entryPointOutput) Location 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypeFunction 7(fvec4) + 11: TypePointer Function 6(float) + 13: 6(float) Constant 0 + 14: TypeVector 6(float) 2 + 15: TypePointer Function 14(fvec2) + 17: 14(fvec2) ConstantComposite 13 13 + 19: TypeVector 6(float) 3 + 20: TypePointer Function 19(fvec3) + 22: 19(fvec3) ConstantComposite 13 13 13 + 24: TypePointer Function 7(fvec4) + 26: 7(fvec4) ConstantComposite 13 13 13 13 + 29: TypeMatrix 14(fvec2) 2 + 30: TypePointer Function 29 + 32: 29 ConstantComposite 17 17 + 35: TypeMatrix 19(fvec3) 2 + 36: TypePointer Function 35 + 38: 35 ConstantComposite 22 22 + 40: TypeMatrix 7(fvec4) 2 + 41: TypePointer Function 40 + 43: 40 ConstantComposite 26 26 + 45: TypeMatrix 14(fvec2) 3 + 46: TypePointer Function 45 + 48: 45 ConstantComposite 17 17 17 + 50: TypeMatrix 19(fvec3) 3 + 51: TypePointer Function 50 + 53: 50 ConstantComposite 22 22 22 + 55: TypeMatrix 7(fvec4) 3 + 56: TypePointer Function 55 + 58: 55 ConstantComposite 26 26 26 + 60: TypeMatrix 14(fvec2) 4 + 61: TypePointer Function 60 + 63: 60 ConstantComposite 17 17 17 17 + 65: TypeMatrix 19(fvec3) 4 + 66: TypePointer Function 65 + 68: 65 ConstantComposite 22 22 22 22 + 70: TypeMatrix 7(fvec4) 4 + 71: TypePointer Function 70 + 73: 70 ConstantComposite 26 26 26 26 + 119: TypePointer Output 7(fvec4) +120(@entryPointOutput): 119(ptr) Variable Output + 4(main): 2 Function None 3 + 5: Label + 121: 7(fvec4) FunctionCall 9(@main() + Store 120(@entryPointOutput) 121 + Return + FunctionEnd + 9(@main(): 7(fvec4) Function None 8 + 10: Label + 12(var0): 11(ptr) Variable Function + 16(var13): 15(ptr) Variable Function + 18(var14): 15(ptr) Variable Function + 21(var26): 20(ptr) Variable Function + 23(var28): 20(ptr) Variable Function + 25(var39): 24(ptr) Variable Function + 27(var42): 24(ptr) Variable Function + 28(var43): 24(ptr) Variable Function + 31(var52): 30(ptr) Variable Function + 33(var55): 30(ptr) Variable Function + 34(var56): 30(ptr) Variable Function + 37(var65): 36(ptr) Variable Function + 39(var70): 36(ptr) Variable Function + 42(var78): 41(ptr) Variable Function + 44(var84): 41(ptr) Variable Function + 47(var91): 46(ptr) Variable Function + 49(var98): 46(ptr) Variable Function + 52(var104): 51(ptr) Variable Function + 54(var112): 51(ptr) Variable Function + 57(var117): 56(ptr) Variable Function + 59(var126): 56(ptr) Variable Function + 62(var130): 61(ptr) Variable Function + 64(var140): 61(ptr) Variable Function + 67(var143): 66(ptr) Variable Function + 69(var154): 66(ptr) Variable Function + 72(var156): 71(ptr) Variable Function + 74(var168): 71(ptr) Variable Function + 75(var1): 11(ptr) Variable Function + 76(var2): 11(ptr) Variable Function + 77(var3): 11(ptr) Variable Function + 78(var4): 11(ptr) Variable Function + 79(var5): 11(ptr) Variable Function + 80(var6): 11(ptr) Variable Function + 81(var7): 11(ptr) Variable Function + 82(var8): 11(ptr) Variable Function + 83(var9): 11(ptr) Variable Function + 84(var10): 11(ptr) Variable Function + 85(var11): 11(ptr) Variable Function + 86(var12): 11(ptr) Variable Function + 87(var15): 15(ptr) Variable Function + 88(var16): 15(ptr) Variable Function + 89(var29): 20(ptr) Variable Function + 90(var57): 30(ptr) Variable Function + 91(var58): 30(ptr) Variable Function + 92(var59): 30(ptr) Variable Function + 93(var60): 30(ptr) Variable Function + 94(var61): 30(ptr) Variable Function + 95(var62): 30(ptr) Variable Function + 96(var63): 30(ptr) Variable Function + 97(var64): 30(ptr) Variable Function + 98(var71): 36(ptr) Variable Function + 99(var73): 36(ptr) Variable Function + 100(var74): 36(ptr) Variable Function + 101(var76): 36(ptr) Variable Function + 102(var77): 36(ptr) Variable Function + 103(var87): 41(ptr) Variable Function + 104(var90): 41(ptr) Variable Function + 105(var99): 46(ptr) Variable Function + 106(var100): 46(ptr) Variable Function + 107(var101): 46(ptr) Variable Function + 108(var102): 46(ptr) Variable Function + 109(var103): 46(ptr) Variable Function + 110(var113): 51(ptr) Variable Function + 111(var115): 51(ptr) Variable Function + 112(var116): 51(ptr) Variable Function + 113(var129): 56(ptr) Variable Function + 114(var141): 61(ptr) Variable Function + 115(var142): 61(ptr) Variable Function + 116(var155): 66(ptr) Variable Function + Store 12(var0) 13 + Store 16(var13) 17 + Store 18(var14) 17 + Store 21(var26) 22 + Store 23(var28) 22 + Store 25(var39) 26 + Store 27(var42) 26 + Store 28(var43) 26 + Store 31(var52) 32 + Store 33(var55) 32 + Store 34(var56) 32 + Store 37(var65) 38 + Store 39(var70) 38 + Store 42(var78) 43 + Store 44(var84) 43 + Store 47(var91) 48 + Store 49(var98) 48 + Store 52(var104) 53 + Store 54(var112) 53 + Store 57(var117) 58 + Store 59(var126) 58 + Store 62(var130) 63 + Store 64(var140) 63 + Store 67(var143) 68 + Store 69(var154) 68 + Store 72(var156) 73 + Store 74(var168) 73 + Store 75(var1) 13 + Store 76(var2) 13 + Store 77(var3) 13 + Store 78(var4) 13 + Store 79(var5) 13 + Store 80(var6) 13 + Store 81(var7) 13 + Store 82(var8) 13 + Store 83(var9) 13 + Store 84(var10) 13 + Store 85(var11) 13 + Store 86(var12) 13 + Store 87(var15) 17 + Store 88(var16) 17 + Store 89(var29) 22 + Store 90(var57) 32 + Store 91(var58) 32 + Store 92(var59) 32 + Store 93(var60) 32 + Store 94(var61) 32 + Store 95(var62) 32 + Store 96(var63) 32 + Store 97(var64) 32 + Store 98(var71) 38 + Store 99(var73) 38 + Store 100(var74) 38 + Store 101(var76) 38 + Store 102(var77) 38 + Store 103(var87) 43 + Store 104(var90) 43 + Store 105(var99) 48 + Store 106(var100) 48 + Store 107(var101) 48 + Store 108(var102) 48 + Store 109(var103) 48 + Store 110(var113) 53 + Store 111(var115) 53 + Store 112(var116) 53 + Store 113(var129) 58 + Store 114(var141) 63 + Store 115(var142) 63 + Store 116(var155) 68 + ReturnValue 26 + FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.simple.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.simple.vert.out index 56bfe010f9..57b020c676 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.simple.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.simple.vert.out @@ -28,3 +28,39 @@ int main(){ 1.2 2E10 5u - 5l f } +struct S { + int member1; + float member2; + vec4 member3; +}; + + + + + + + + + + + + + +void foo() +{ + S s; + s . member2 + s . member1; + s . member3 . zyx; + s . member2 . xxyz; + s . member2 . yyz; + s . member2 . xxyz(); + s . member2 . yzy; + vec3 a = vec3(0);vec3 b = a . zxyz;vec3 b = a . xxyz;vec3 b = a . yyz;vec3 b = a . xxyz();vec3 b = a . yzy;vec3 b = a . z; + + + yyz; + yzy + + +} + diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.AofA.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.AofA.frag.out index 798f083afe..e8572ba985 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.AofA.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.AofA.frag.out @@ -2,7 +2,9 @@ spv.AofA.frag WARNING: 0:6: '[][]' : Generating SPIR-V array-of-arrays, but Vulkan only supports single array level for this resource error: SPIRV-Tools Validation Errors -error: Only a single level of array is allowed for descriptor set variables +error: Uniform OpVariable '98[nameAofA] 'has illegal type. +From Vulkan spec, section 14.5.2: +Variables identified with the Uniform storage class are used to access transparent buffer backed resources. Such variables must be typed as OpTypeStruct, or an array of this type %nameAofA = OpVariable %_ptr_Uniform__arr__arr_uAofA_uint_5_uint_3 Uniform // Module Version 10000 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.functionNestedOpaque.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.functionNestedOpaque.vert.out index 34ae7c3f0e..ff94077f53 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.functionNestedOpaque.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.functionNestedOpaque.vert.out @@ -1,4 +1,10 @@ spv.functionNestedOpaque.vert +error: SPIRV-Tools Validation Errors +error: UniformConstant OpVariable '36[si] 'has illegal type. +From Vulkan spec, section 14.5.2: +Variables identified with the UniformConstant storage class are used only as handles to refer to opaque resources. Such variables must be typed as OpTypeImage, OpTypeSampler, OpTypeSampledImage, OpTypeAccelerationStructureNV, or an array of one of these types. + %si = OpVariable %_ptr_UniformConstant_S UniformConstant + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 39 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.scalarlayout.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.scalarlayout.frag.out new file mode 100644 index 0000000000..2935e1a094 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.scalarlayout.frag.out @@ -0,0 +1,80 @@ +spv.scalarlayout.frag +error: SPIRV-Tools Validation Errors +error: Structure id 17 decorated as Block for variable in Uniform storage class must follow standard uniform buffer layout rules: member 1 at offset 4 is not aligned to 8 + %B1 = OpTypeStruct %float %v2float %v3float %_arr_float_uint_2 %mat2v3float %_arr_mat2v3float_uint_2 %float %S %_arr_S_uint_2 + +// Module Version 10000 +// Generated by (magic number): 80007 +// Id's are bound by 20 + + Capability Shader + Capability Float64 + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_EXT_scalar_block_layout" + Name 4 "main" + Name 15 "S" + MemberName 15(S) 0 "a" + MemberName 15(S) 1 "b" + MemberName 15(S) 2 "c" + MemberName 15(S) 3 "d" + MemberName 15(S) 4 "e" + MemberName 15(S) 5 "f" + Name 17 "B1" + MemberName 17(B1) 0 "a" + MemberName 17(B1) 1 "b" + MemberName 17(B1) 2 "c" + MemberName 17(B1) 3 "d" + MemberName 17(B1) 4 "e" + MemberName 17(B1) 5 "f" + MemberName 17(B1) 6 "g" + MemberName 17(B1) 7 "h" + MemberName 17(B1) 8 "i" + Name 19 "" + Decorate 11 ArrayStride 4 + Decorate 13 ArrayStride 24 + MemberDecorate 15(S) 0 Offset 0 + MemberDecorate 15(S) 1 Offset 4 + MemberDecorate 15(S) 2 Offset 16 + MemberDecorate 15(S) 3 Offset 24 + MemberDecorate 15(S) 4 Offset 28 + MemberDecorate 15(S) 5 Offset 40 + Decorate 16 ArrayStride 48 + MemberDecorate 17(B1) 0 Offset 0 + MemberDecorate 17(B1) 1 Offset 4 + MemberDecorate 17(B1) 2 Offset 12 + MemberDecorate 17(B1) 3 Offset 24 + MemberDecorate 17(B1) 4 ColMajor + MemberDecorate 17(B1) 4 Offset 32 + MemberDecorate 17(B1) 4 MatrixStride 12 + MemberDecorate 17(B1) 5 ColMajor + MemberDecorate 17(B1) 5 Offset 56 + MemberDecorate 17(B1) 5 MatrixStride 12 + MemberDecorate 17(B1) 6 Offset 104 + MemberDecorate 17(B1) 7 Offset 112 + MemberDecorate 17(B1) 8 Offset 160 + Decorate 17(B1) Block + Decorate 19 DescriptorSet 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 2 + 8: TypeVector 6(float) 3 + 9: TypeInt 32 0 + 10: 9(int) Constant 2 + 11: TypeArray 6(float) 10 + 12: TypeMatrix 8(fvec3) 2 + 13: TypeArray 12 10 + 14: TypeFloat 64 + 15(S): TypeStruct 6(float) 7(fvec2) 14(float64_t) 6(float) 8(fvec3) 6(float) + 16: TypeArray 15(S) 10 + 17(B1): TypeStruct 6(float) 7(fvec2) 8(fvec3) 11 12 13 6(float) 15(S) 16 + 18: TypePointer Uniform 17(B1) + 19: 18(ptr) Variable Uniform + 4(main): 2 Function None 3 + 5: Label + Return + FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.scalarlayoutfloat16.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.scalarlayoutfloat16.frag.out new file mode 100644 index 0000000000..9118636f2d --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.scalarlayoutfloat16.frag.out @@ -0,0 +1,72 @@ +spv.scalarlayoutfloat16.frag +error: SPIRV-Tools Validation Errors +error: Structure id 15 decorated as Block for variable in Uniform storage class must follow standard uniform buffer layout rules: member 1 at offset 2 is not aligned to 4 + %B1 = OpTypeStruct %half %v2half %v3half %_arr_half_uint_2 %half %S %_arr_S_uint_2 + +// Module Version 10000 +// Generated by (magic number): 80007 +// Id's are bound by 18 + + Capability Shader + Capability Float64 + Capability StorageUniform16 + Extension "SPV_KHR_16bit_storage" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_EXT_scalar_block_layout" + SourceExtension "GL_EXT_shader_16bit_storage" + Name 4 "main" + Name 13 "S" + MemberName 13(S) 0 "a" + MemberName 13(S) 1 "b" + MemberName 13(S) 2 "c" + MemberName 13(S) 3 "d" + MemberName 13(S) 4 "e" + MemberName 13(S) 5 "f" + Name 15 "B1" + MemberName 15(B1) 0 "a" + MemberName 15(B1) 1 "b" + MemberName 15(B1) 2 "c" + MemberName 15(B1) 3 "d" + MemberName 15(B1) 4 "g" + MemberName 15(B1) 5 "h" + MemberName 15(B1) 6 "i" + Name 17 "" + Decorate 11 ArrayStride 2 + MemberDecorate 13(S) 0 Offset 0 + MemberDecorate 13(S) 1 Offset 2 + MemberDecorate 13(S) 2 Offset 8 + MemberDecorate 13(S) 3 Offset 16 + MemberDecorate 13(S) 4 Offset 18 + MemberDecorate 13(S) 5 Offset 24 + Decorate 14 ArrayStride 32 + MemberDecorate 15(B1) 0 Offset 0 + MemberDecorate 15(B1) 1 Offset 2 + MemberDecorate 15(B1) 2 Offset 6 + MemberDecorate 15(B1) 3 Offset 12 + MemberDecorate 15(B1) 4 Offset 16 + MemberDecorate 15(B1) 5 Offset 24 + MemberDecorate 15(B1) 6 Offset 56 + Decorate 15(B1) Block + Decorate 17 DescriptorSet 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 16 + 7: TypeVector 6(float16_t) 2 + 8: TypeVector 6(float16_t) 3 + 9: TypeInt 32 0 + 10: 9(int) Constant 2 + 11: TypeArray 6(float16_t) 10 + 12: TypeFloat 64 + 13(S): TypeStruct 6(float16_t) 7(f16vec2) 12(float64_t) 6(float16_t) 8(f16vec3) 6(float16_t) + 14: TypeArray 13(S) 10 + 15(B1): TypeStruct 6(float16_t) 7(f16vec2) 8(f16vec3) 11 6(float16_t) 13(S) 14 + 16: TypePointer Uniform 15(B1) + 17: 16(ptr) Variable Uniform + 4(main): 2 Function None 3 + 5: Label + Return + FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.xfbOffsetOnStructMembersAssignment.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.xfbOffsetOnStructMembersAssignment.vert.out new file mode 100644 index 0000000000..7eb4593426 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.xfbOffsetOnStructMembersAssignment.vert.out @@ -0,0 +1,93 @@ +spv.xfbOffsetOnStructMembersAssignment.vert +// Module Version 10000 +// Generated by (magic number): 80007 +// Id's are bound by 40 + + Capability Shader + Capability TransformFeedback + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 4 "main" 9 21 34 38 39 + ExecutionMode 4 Xfb + Source GLSL 450 + Name 4 "main" + Name 7 "S" + MemberName 7(S) 0 "x1_out" + MemberName 7(S) 1 "x2_out" + Name 9 "s1" + Name 19 "S2" + MemberName 19(S2) 0 "y1_out" + MemberName 19(S2) 1 "y2_out" + Name 21 "s2" + Name 32 "gl_PerVertex" + MemberName 32(gl_PerVertex) 0 "gl_Position" + MemberName 32(gl_PerVertex) 1 "gl_PointSize" + MemberName 32(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 32(gl_PerVertex) 3 "gl_CullDistance" + Name 34 "" + Name 38 "gl_VertexID" + Name 39 "gl_InstanceID" + MemberDecorate 7(S) 0 Offset 16 + MemberDecorate 7(S) 1 Offset 20 + Decorate 9(s1) Location 0 + Decorate 9(s1) XfbBuffer 2 + Decorate 9(s1) XfbStride 24 + MemberDecorate 19(S2) 0 Offset 8 + MemberDecorate 19(S2) 1 Offset 12 + Decorate 21(s2) Location 5 + Decorate 21(s2) XfbBuffer 1 + Decorate 21(s2) XfbStride 28 + MemberDecorate 32(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 32(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 32(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 32(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 32(gl_PerVertex) Block + Decorate 34 XfbBuffer 0 + Decorate 34 XfbStride 0 + Decorate 38(gl_VertexID) BuiltIn VertexId + Decorate 39(gl_InstanceID) BuiltIn InstanceId + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7(S): TypeStruct 6(float) 6(float) + 8: TypePointer Output 7(S) + 9(s1): 8(ptr) Variable Output + 10: TypeInt 32 1 + 11: 10(int) Constant 0 + 12: 6(float) Constant 1084227584 + 13: TypePointer Output 6(float) + 15: 10(int) Constant 1 + 16: 6(float) Constant 1086324736 + 18: TypeVector 6(float) 4 + 19(S2): TypeStruct 6(float) 18(fvec4) + 20: TypePointer Output 19(S2) + 21(s2): 20(ptr) Variable Output + 22: 6(float) Constant 1088421888 + 24: 6(float) Constant 1065353216 + 25: 6(float) Constant 0 + 26: 18(fvec4) ConstantComposite 24 25 25 24 + 27: TypePointer Output 18(fvec4) + 29: TypeInt 32 0 + 30: 29(int) Constant 1 + 31: TypeArray 6(float) 30 +32(gl_PerVertex): TypeStruct 18(fvec4) 6(float) 31 31 + 33: TypePointer Output 32(gl_PerVertex) + 34: 33(ptr) Variable Output + 35: 18(fvec4) ConstantComposite 25 25 25 25 + 37: TypePointer Input 10(int) + 38(gl_VertexID): 37(ptr) Variable Input +39(gl_InstanceID): 37(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 14: 13(ptr) AccessChain 9(s1) 11 + Store 14 12 + 17: 13(ptr) AccessChain 9(s1) 15 + Store 17 16 + 23: 13(ptr) AccessChain 21(s2) 11 + Store 23 22 + 28: 27(ptr) AccessChain 21(s2) 15 + Store 28 26 + 36: 27(ptr) AccessChain 34 11 + Store 36 35 + Return + FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/cppSimple.vert b/3rdparty/bgfx/3rdparty/glslang/Test/cppSimple.vert old mode 100644 new mode 100755 index fdd14221b6..2f7de30f7a --- a/3rdparty/bgfx/3rdparty/glslang/Test/cppSimple.vert +++ b/3rdparty/bgfx/3rdparty/glslang/Test/cppSimple.vert @@ -170,7 +170,7 @@ int a = length("aoenatuh"); // ERROR // ERROR #define m4(b) -#define m4 (b) +#define m4 // ERROR #define m5 (b) @@ -178,7 +178,7 @@ int a = length("aoenatuh"); // ERROR // ERROR #define m6(a) -#define m6 +#define m6(a,b) // ERROR (whitespace) #define m7 (a) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.int.dot.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.int.dot.frag new file mode 100644 index 0000000000..c293dc14b8 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.int.dot.frag @@ -0,0 +1,14 @@ +float4 main() : SV_Target { + int i = 1; + int1 i2 = 2; + int2 i3 = 3; + int3 i4 = 4; + int4 i5 = 5; + + i = dot(i, i); + i2 = dot(i2, i2); + i3 = dot(i3, i3); + i4 = dot(i4, i4); + i5 = dot(i5, i5); + return i + i2.xxxx + i3.xyxy + i4.xyzx + i5; +} \ No newline at end of file diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.structbuffer.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.structbuffer.frag index 4eb6912bf4..dd522a6977 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.structbuffer.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.structbuffer.frag @@ -5,7 +5,7 @@ struct sb_t bool test2; }; // stride = 20 -StructuredBuffer sbuf : register(c10); +StructuredBuffer sbuf : register(t10); StructuredBuffer sbuf2; float4 main(uint pos : FOO) : SV_Target0 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.type.type.conversion.all.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.type.type.conversion.all.frag new file mode 100644 index 0000000000..1883b01871 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.type.type.conversion.all.frag @@ -0,0 +1,190 @@ +#define zeros 0 +#define zeros1 0 +#define zeros2 0, 0 +#define zeros3 0, 0, 0 +#define zeros4 0, 0, 0, 0 +#define zeros5 0, 0, 0, 0, 0 +#define zeros6 0, 0, 0, 0, 0, 0 +#define zeros7 0, 0, 0, 0, 0, 0, 0 +#define zeros8 0, 0, 0, 0, 0, 0, 0, 0 +#define zeros9 0, 0, 0, 0, 0, 0, 0, 0, 0 +#define zeros10 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +#define zeros11 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +#define zeros12 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +#define zeros13 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +#define zeros14 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +#define zeros15 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +#define zeros16 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +float4 main() : SV_Target { + float var0 = float(zeros1); + float2 var13 = float(zeros1); + float2 var14 = float2(zeros2); + float3 var26 = float(zeros1); + float3 var28 = float3(zeros3); + float4 var39 = float(zeros1); + float4 var42 = float4(zeros4); + float4 var43 = float2x2(zeros4); + float2x2 var52 = float(zeros1); + float2x2 var55 = float4(zeros4); + float2x2 var56 = float2x2(zeros4); + float2x3 var65 = float(zeros1); + float2x3 var70 = float2x3(zeros6); + float2x4 var78 = float(zeros1); + float2x4 var84 = float2x4(zeros8); + float3x2 var91 = float(zeros1); + float3x2 var98 = float3x2(zeros6); + float3x3 var104 = float(zeros1); + float3x3 var112 = float3x3(zeros9); + float3x4 var117 = float(zeros1); + float3x4 var126 = float3x4(zeros12); + float4x2 var130 = float(zeros1); + float4x2 var140 = float4x2(zeros8); + float4x3 var143 = float(zeros1); + float4x3 var154 = float4x3(zeros12); + float4x4 var156 = float(zeros1); + float4x4 var168 = float4x4(zeros16); + float var1 = float2(zeros2);// warning X3206: implicit truncation of vector type + float var2 = float3(zeros3);// warning X3206: implicit truncation of vector type + float var3 = float4(zeros4);// warning X3206: implicit truncation of vector type + float var4 = float2x2(zeros4);// warning X3206: implicit truncation of vector type + float var5 = float2x3(zeros6);// warning X3206: implicit truncation of vector type + float var6 = float2x4(zeros8);// warning X3206: implicit truncation of vector type + float var7 = float3x2(zeros6);// warning X3206: implicit truncation of vector type + float var8 = float3x3(zeros9);// warning X3206: implicit truncation of vector type + float var9 = float3x4(zeros12);// warning X3206: implicit truncation of vector type + float var10 = float4x2(zeros8);// warning X3206: implicit truncation of vector type + float var11 = float4x3(zeros12);// warning X3206: implicit truncation of vector type + float var12 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + float2 var15 = float3(zeros3);// warning X3206: implicit truncation of vector type + float2 var16 = float4(zeros4);// warning X3206: implicit truncation of vector type + float3 var29 = float4(zeros4);// warning X3206: implicit truncation of vector type + float2x2 var57 = float2x3(zeros6);// warning X3206: implicit truncation of vector type + float2x2 var58 = float2x4(zeros8);// warning X3206: implicit truncation of vector type + float2x2 var59 = float3x2(zeros6);// warning X3206: implicit truncation of vector type + float2x2 var60 = float3x3(zeros9);// warning X3206: implicit truncation of vector type + float2x2 var61 = float3x4(zeros12);// warning X3206: implicit truncation of vector type + float2x2 var62 = float4x2(zeros8);// warning X3206: implicit truncation of vector type + float2x2 var63 = float4x3(zeros12);// warning X3206: implicit truncation of vector type + float2x2 var64 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + float2x3 var71 = float2x4(zeros8);// warning X3206: implicit truncation of vector type + float2x3 var73 = float3x3(zeros9);// warning X3206: implicit truncation of vector type + float2x3 var74 = float3x4(zeros12);// warning X3206: implicit truncation of vector type + float2x3 var76 = float4x3(zeros12);// warning X3206: implicit truncation of vector type + float2x3 var77 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + float2x4 var87 = float3x4(zeros12);// warning X3206: implicit truncation of vector type + float2x4 var90 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + float3x2 var99 = float3x3(zeros9);// warning X3206: implicit truncation of vector type + float3x2 var100 = float3x4(zeros12);// warning X3206: implicit truncation of vector type + float3x2 var101 = float4x2(zeros8);// warning X3206: implicit truncation of vector type + float3x2 var102 = float4x3(zeros12);// warning X3206: implicit truncation of vector type + float3x2 var103 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + float3x3 var113 = float3x4(zeros12);// warning X3206: implicit truncation of vector type + float3x3 var115 = float4x3(zeros12);// warning X3206: implicit truncation of vector type + float3x3 var116 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + float3x4 var129 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + float4x2 var141 = float4x3(zeros12);// warning X3206: implicit truncation of vector type + float4x2 var142 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + float4x3 var155 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + float2 var17 = float2x2(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x2' to 'float2' + float2 var18 = float2x3(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x3' to 'float2' + float2 var19 = float2x4(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x4' to 'float2' + float2 var20 = float3x2(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x2' to 'float2' + float2 var21 = float3x3(zeros9);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x3' to 'float2' + float2 var22 = float3x4(zeros12);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x4' to 'float2' + float2 var23 = float4x2(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x2' to 'float2' + float2 var24 = float4x3(zeros12);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x3' to 'float2' + float2 var25 = float4x4(zeros16);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x4' to 'float2' + float3 var27 = float2(zeros2);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2' to 'float3' + float3 var30 = float2x2(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x2' to 'float3' + float3 var31 = float2x3(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x3' to 'float3' + float3 var32 = float2x4(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x4' to 'float3' + float3 var33 = float3x2(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x2' to 'float3' + float3 var34 = float3x3(zeros9);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x3' to 'float3' + float3 var35 = float3x4(zeros12);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x4' to 'float3' + float3 var36 = float4x2(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x2' to 'float3' + float3 var37 = float4x3(zeros12);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x3' to 'float3' + float3 var38 = float4x4(zeros16);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x4' to 'float3' + float4 var40 = float2(zeros2);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2' to 'float4' + float4 var41 = float3(zeros3);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3' to 'float4' + float4 var44 = float2x3(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x3' to 'float4' + float4 var45 = float2x4(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x4' to 'float4' + float4 var46 = float3x2(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x2' to 'float4' + float4 var47 = float3x3(zeros9);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x3' to 'float4' + float4 var48 = float3x4(zeros12);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x4' to 'float4' + float4 var49 = float4x2(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x2' to 'float4' + float4 var50 = float4x3(zeros12);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x3' to 'float4' + float4 var51 = float4x4(zeros16);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x4' to 'float4' + float2x2 var53 = float2(zeros2);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2' to 'float2x2' + float2x2 var54 = float3(zeros3);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3' to 'float2x2' + float2x3 var66 = float2(zeros2);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2' to 'float2x3' + float2x3 var67 = float3(zeros3);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3' to 'float2x3' + float2x3 var68 = float4(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4' to 'float2x3' + float2x3 var69 = float2x2(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x2' to 'float2x3' + float2x3 var72 = float3x2(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x2' to 'float2x3' + float2x3 var75 = float4x2(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x2' to 'float2x3' + float2x4 var79 = float2(zeros2);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2' to 'float2x4' + float2x4 var80 = float3(zeros3);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3' to 'float2x4' + float2x4 var81 = float4(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4' to 'float2x4' + float2x4 var82 = float2x2(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x2' to 'float2x4' + float2x4 var83 = float2x3(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x3' to 'float2x4' + float2x4 var85 = float3x2(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x2' to 'float2x4' + float2x4 var86 = float3x3(zeros9);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x3' to 'float2x4' + float2x4 var88 = float4x2(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x2' to 'float2x4' + float2x4 var89 = float4x3(zeros12);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x3' to 'float2x4' + float3x2 var92 = float2(zeros2);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2' to 'float3x2' + float3x2 var93 = float3(zeros3);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3' to 'float3x2' + float3x2 var94 = float4(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4' to 'float3x2' + float3x2 var95 = float2x2(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x2' to 'float3x2' + float3x2 var96 = float2x3(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x3' to 'float3x2' + float3x2 var97 = float2x4(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x4' to 'float3x2' + float3x3 var105 = float2(zeros2);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2' to 'float3x3' + float3x3 var106 = float3(zeros3);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3' to 'float3x3' + float3x3 var107 = float4(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4' to 'float3x3' + float3x3 var108 = float2x2(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x2' to 'float3x3' + float3x3 var109 = float2x3(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x3' to 'float3x3' + float3x3 var110 = float2x4(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x4' to 'float3x3' + float3x3 var111 = float3x2(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x2' to 'float3x3' + float3x3 var114 = float4x2(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x2' to 'float3x3' + float3x4 var118 = float2(zeros2);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2' to 'float3x4' + float3x4 var119 = float3(zeros3);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3' to 'float3x4' + float3x4 var120 = float4(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4' to 'float3x4' + float3x4 var121 = float2x2(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x2' to 'float3x4' + float3x4 var122 = float2x3(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x3' to 'float3x4' + float3x4 var123 = float2x4(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x4' to 'float3x4' + float3x4 var124 = float3x2(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x2' to 'float3x4' + float3x4 var125 = float3x3(zeros9);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x3' to 'float3x4' + float3x4 var127 = float4x2(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x2' to 'float3x4' + float3x4 var128 = float4x3(zeros12);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x3' to 'float3x4' + float4x2 var131 = float2(zeros2);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2' to 'float4x2' + float4x2 var132 = float3(zeros3);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3' to 'float4x2' + float4x2 var133 = float4(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4' to 'float4x2' + float4x2 var134 = float2x2(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x2' to 'float4x2' + float4x2 var135 = float2x3(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x3' to 'float4x2' + float4x2 var136 = float2x4(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x4' to 'float4x2' + float4x2 var137 = float3x2(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x2' to 'float4x2' + float4x2 var138 = float3x3(zeros9);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x3' to 'float4x2' + float4x2 var139 = float3x4(zeros12);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x4' to 'float4x2' + float4x3 var144 = float2(zeros2);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2' to 'float4x3' + float4x3 var145 = float3(zeros3);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3' to 'float4x3' + float4x3 var146 = float4(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4' to 'float4x3' + float4x3 var147 = float2x2(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x2' to 'float4x3' + float4x3 var148 = float2x3(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x3' to 'float4x3' + float4x3 var149 = float2x4(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x4' to 'float4x3' + float4x3 var150 = float3x2(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x2' to 'float4x3' + float4x3 var151 = float3x3(zeros9);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x3' to 'float4x3' + float4x3 var152 = float3x4(zeros12);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x4' to 'float4x3' + float4x3 var153 = float4x2(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x2' to 'float4x3' + float4x4 var157 = float2(zeros2);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2' to 'float4x4' + float4x4 var158 = float3(zeros3);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3' to 'float4x4' + float4x4 var159 = float4(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4' to 'float4x4' + float4x4 var160 = float2x2(zeros4);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x2' to 'float4x4' + float4x4 var161 = float2x3(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x3' to 'float4x4' + float4x4 var162 = float2x4(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float2x4' to 'float4x4' + float4x4 var163 = float3x2(zeros6);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x2' to 'float4x4' + float4x4 var164 = float3x3(zeros9);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x3' to 'float4x4' + float4x4 var165 = float3x4(zeros12);// Compilation failed because: error X3017: cannot implicitly convert from 'const float3x4' to 'float4x4' + float4x4 var166 = float4x2(zeros8);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x2' to 'float4x4' + float4x4 var167 = float4x3(zeros12);// Compilation failed because: error X3017: cannot implicitly convert from 'const float4x3' to 'float4x4' + return 0; +} + diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.type.type.conversion.valid.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.type.type.conversion.valid.frag new file mode 100644 index 0000000000..114edbccaf --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.type.type.conversion.valid.frag @@ -0,0 +1,90 @@ +#define zeros 0 +#define zeros1 0 +#define zeros2 0, 0 +#define zeros3 0, 0, 0 +#define zeros4 0, 0, 0, 0 +#define zeros5 0, 0, 0, 0, 0 +#define zeros6 0, 0, 0, 0, 0, 0 +#define zeros7 0, 0, 0, 0, 0, 0, 0 +#define zeros8 0, 0, 0, 0, 0, 0, 0, 0 +#define zeros9 0, 0, 0, 0, 0, 0, 0, 0, 0 +#define zeros10 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +#define zeros11 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +#define zeros12 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +#define zeros13 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +#define zeros14 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +#define zeros15 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +#define zeros16 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +float4 main() : SV_Target { + float var0 = float(zeros1); + float2 var13 = float(zeros1); + float2 var14 = float2(zeros2); + float3 var26 = float(zeros1); + float3 var28 = float3(zeros3); + float4 var39 = float(zeros1); + float4 var42 = float4(zeros4); + float4 var43 = float2x2(zeros4); + float2x2 var52 = float(zeros1); + float2x2 var55 = float4(zeros4); + float2x2 var56 = float2x2(zeros4); + float2x3 var65 = float(zeros1); + float2x3 var70 = float2x3(zeros6); + float2x4 var78 = float(zeros1); + float2x4 var84 = float2x4(zeros8); + float3x2 var91 = float(zeros1); + float3x2 var98 = float3x2(zeros6); + float3x3 var104 = float(zeros1); + float3x3 var112 = float3x3(zeros9); + float3x4 var117 = float(zeros1); + float3x4 var126 = float3x4(zeros12); + float4x2 var130 = float(zeros1); + float4x2 var140 = float4x2(zeros8); + float4x3 var143 = float(zeros1); + float4x3 var154 = float4x3(zeros12); + float4x4 var156 = float(zeros1); + float4x4 var168 = float4x4(zeros16); + float var1 = float2(zeros2);// warning X3206: implicit truncation of vector type + float var2 = float3(zeros3);// warning X3206: implicit truncation of vector type + float var3 = float4(zeros4);// warning X3206: implicit truncation of vector type + float var4 = float2x2(zeros4);// warning X3206: implicit truncation of vector type + float var5 = float2x3(zeros6);// warning X3206: implicit truncation of vector type + float var6 = float2x4(zeros8);// warning X3206: implicit truncation of vector type + float var7 = float3x2(zeros6);// warning X3206: implicit truncation of vector type + float var8 = float3x3(zeros9);// warning X3206: implicit truncation of vector type + float var9 = float3x4(zeros12);// warning X3206: implicit truncation of vector type + float var10 = float4x2(zeros8);// warning X3206: implicit truncation of vector type + float var11 = float4x3(zeros12);// warning X3206: implicit truncation of vector type + float var12 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + float2 var15 = float3(zeros3);// warning X3206: implicit truncation of vector type + float2 var16 = float4(zeros4);// warning X3206: implicit truncation of vector type + float3 var29 = float4(zeros4);// warning X3206: implicit truncation of vector type + float2x2 var57 = float2x3(zeros6);// warning X3206: implicit truncation of vector type + float2x2 var58 = float2x4(zeros8);// warning X3206: implicit truncation of vector type + float2x2 var59 = float3x2(zeros6);// warning X3206: implicit truncation of vector type + float2x2 var60 = float3x3(zeros9);// warning X3206: implicit truncation of vector type + float2x2 var61 = float3x4(zeros12);// warning X3206: implicit truncation of vector type + float2x2 var62 = float4x2(zeros8);// warning X3206: implicit truncation of vector type + float2x2 var63 = float4x3(zeros12);// warning X3206: implicit truncation of vector type + float2x2 var64 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + float2x3 var71 = float2x4(zeros8);// warning X3206: implicit truncation of vector type + float2x3 var73 = float3x3(zeros9);// warning X3206: implicit truncation of vector type + float2x3 var74 = float3x4(zeros12);// warning X3206: implicit truncation of vector type + float2x3 var76 = float4x3(zeros12);// warning X3206: implicit truncation of vector type + float2x3 var77 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + float2x4 var87 = float3x4(zeros12);// warning X3206: implicit truncation of vector type + float2x4 var90 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + float3x2 var99 = float3x3(zeros9);// warning X3206: implicit truncation of vector type + float3x2 var100 = float3x4(zeros12);// warning X3206: implicit truncation of vector type + float3x2 var101 = float4x2(zeros8);// warning X3206: implicit truncation of vector type + float3x2 var102 = float4x3(zeros12);// warning X3206: implicit truncation of vector type + float3x2 var103 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + float3x3 var113 = float3x4(zeros12);// warning X3206: implicit truncation of vector type + float3x3 var115 = float4x3(zeros12);// warning X3206: implicit truncation of vector type + float3x3 var116 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + float3x4 var129 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + float4x2 var141 = float4x3(zeros12);// warning X3206: implicit truncation of vector type + float4x2 var142 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + float4x3 var155 = float4x4(zeros16);// warning X3206: implicit truncation of vector type + return 0; +} + diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/preprocessor.simple.vert b/3rdparty/bgfx/3rdparty/glslang/Test/preprocessor.simple.vert old mode 100644 new mode 100755 index 352227192b..788df76ce5 --- a/3rdparty/bgfx/3rdparty/glslang/Test/preprocessor.simple.vert +++ b/3rdparty/bgfx/3rdparty/glslang/Test/preprocessor.simple.vert @@ -27,3 +27,39 @@ int main() { += -= *= /= %= <<= >>= &= |= ^= 1.2 2E10 5u -5lf } + +struct S { + int member1; + float member2; + vec4 member3; +}; + +#define xyz xxyz +#define yzy() yyz + +#define FUN_MAC() \ + vec3 a = vec3(0); \ + vec3 b = a.zxyz; \ + vec3 b = a.xyz; \ + vec3 b = a.yzy(); \ + vec3 b = a.xyz(); \ + vec3 b = a.yzy; \ + vec3 b = a.z; + +void foo() +{ + S s; + s.member2 + s.member1; + s.member3.zyx; + s.member2.xyz; + s.member2.yzy(); + s.member2.xyz(); + s.member2.yzy; + FUN_MAC() + yzy + + (); + yzy + + +} diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/spv.scalarlayout.frag b/3rdparty/bgfx/3rdparty/glslang/Test/spv.scalarlayout.frag new file mode 100644 index 0000000000..c7ecf5025b --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/Test/spv.scalarlayout.frag @@ -0,0 +1,32 @@ +#version 450 core + +#extension GL_EXT_scalar_block_layout : enable + +// Block memory layout +struct S +{ + float a; // offset 0 + vec2 b; // offset 4 + double c; // offset 16 + float d; // offset 24 + vec3 e; // offset 28 + float f; // offset 40 + // size = 44, align = 8 +}; + +layout(column_major, scalar) uniform B1 +{ + float a; // offset = 0 + vec2 b; // offset = 4 + vec3 c; // offset = 12 + float d[2]; // offset = 24 + mat2x3 e; // offset = 32, takes 24 bytes, matrixstride = 12 + mat2x3 f[2]; // offset = 56, takes 48 bytes, matrixstride = 12, arraystride = 24 + float g; // offset = 104 + S h; // offset = 112 (aligned to multiple of 8) + S i[2]; // offset = 160 (aligned to multiple of 8) stride = 48 +}; + +void main() +{ +} diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/spv.scalarlayoutfloat16.frag b/3rdparty/bgfx/3rdparty/glslang/Test/spv.scalarlayoutfloat16.frag new file mode 100644 index 0000000000..ff8709737a --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/Test/spv.scalarlayoutfloat16.frag @@ -0,0 +1,31 @@ +#version 450 core + +#extension GL_EXT_shader_16bit_storage: enable +#extension GL_EXT_scalar_block_layout : enable + +// Block memory layout +struct S +{ + float16_t a; // offset 0 + f16vec2 b; // offset 2 + double c; // offset 8 + float16_t d; // offset 16 + f16vec3 e; // offset 18 + float16_t f; // offset 24 + // size = 26, align = 8 +}; + +layout(column_major, scalar) uniform B1 +{ + float16_t a; // offset = 0 + f16vec2 b; // offset = 2 + f16vec3 c; // offset = 6 + float16_t d[2]; // offset = 12 stride = 2 + float16_t g; // offset = 16 + S h; // offset = 24 (aligned to multiple of 8) + S i[2]; // offset = 56 (aligned to multiple of 8) stride = 32 +}; + +void main() +{ +} diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/spv.shaderStencilExport.frag b/3rdparty/bgfx/3rdparty/glslang/Test/spv.shaderStencilExport.frag index 62e0f573ab..e3ad4d67f7 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/spv.shaderStencilExport.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/spv.shaderStencilExport.frag @@ -2,6 +2,8 @@ #extension GL_ARB_shader_stencil_export: enable +out int gl_FragStencilRefARB; + void main() { gl_FragStencilRefARB = 100; diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/spv.xfbOffsetOnStructMembersAssignment.vert b/3rdparty/bgfx/3rdparty/glslang/Test/spv.xfbOffsetOnStructMembersAssignment.vert new file mode 100644 index 0000000000..e6619c582b --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/Test/spv.xfbOffsetOnStructMembersAssignment.vert @@ -0,0 +1,23 @@ +#version 450 + +layout(xfb_buffer=2) out; + +struct S { + float x1_out; + float x2_out; +}; + +layout(location=0, xfb_offset = 16) out S s1; + +layout(location=5, xfb_buffer=1, xfb_offset=8) out struct S2 { + float y1_out; + vec4 y2_out; +}s2; + +void main() { + s1.x1_out = 5.0; + s1.x2_out = 6.0; + s2.y1_out = 7.0; + s2.y2_out = vec4(1.0, 0.0, 0.0, 1.0); + gl_Position = vec4(0.0); +} diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/CMakeLists.txt b/3rdparty/bgfx/3rdparty/glslang/glslang/CMakeLists.txt index 32fadcdd88..5f51476ba5 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/CMakeLists.txt +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/CMakeLists.txt @@ -80,7 +80,7 @@ set(HEADERS # WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) # set(BISON_GLSLParser_OUTPUT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp) -PCH(SOURCES MachineIndependent/pch.cpp) +glslang_pch(SOURCES MachineIndependent/pch.cpp) add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS}) set_property(TARGET glslang PROPERTY FOLDER glslang) diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/Types.h b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/Types.h old mode 100644 new mode 100755 index ae9cf4021c..30fc8ce16a --- a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/Types.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/Types.h @@ -277,6 +277,7 @@ enum TLayoutPacking { ElpStd140, ElpStd430, ElpPacked, + ElpScalar, ElpCount // If expanding, see bitfield width below }; @@ -774,40 +775,40 @@ class TQualifier { int layoutOffset; int layoutAlign; - unsigned int layoutLocation :12; - static const unsigned int layoutLocationEnd = 0xFFF; + unsigned int layoutLocation : 12; + static const unsigned int layoutLocationEnd = 0xFFF; - unsigned int layoutComponent : 3; - static const unsigned int layoutComponentEnd = 4; + unsigned int layoutComponent : 3; + static const unsigned int layoutComponentEnd = 4; - unsigned int layoutSet : 7; - static const unsigned int layoutSetEnd = 0x3F; + unsigned int layoutSet : 7; + static const unsigned int layoutSetEnd = 0x3F; - unsigned int layoutBinding : 16; - static const unsigned int layoutBindingEnd = 0xFFFF; + unsigned int layoutBinding : 16; + static const unsigned int layoutBindingEnd = 0xFFFF; - unsigned int layoutIndex : 8; - static const unsigned int layoutIndexEnd = 0xFF; + unsigned int layoutIndex : 8; + static const unsigned int layoutIndexEnd = 0xFF; - unsigned int layoutStream : 8; - static const unsigned int layoutStreamEnd = 0xFF; + unsigned int layoutStream : 8; + static const unsigned int layoutStreamEnd = 0xFF; - unsigned int layoutXfbBuffer : 4; - static const unsigned int layoutXfbBufferEnd = 0xF; + unsigned int layoutXfbBuffer : 4; + static const unsigned int layoutXfbBufferEnd = 0xF; - unsigned int layoutXfbStride : 10; - static const unsigned int layoutXfbStrideEnd = 0x3FF; + unsigned int layoutXfbStride : 14; + static const unsigned int layoutXfbStrideEnd = 0x3FFF; - unsigned int layoutXfbOffset : 10; - static const unsigned int layoutXfbOffsetEnd = 0x3FF; + unsigned int layoutXfbOffset : 13; + static const unsigned int layoutXfbOffsetEnd = 0x1FFF; - unsigned int layoutAttachment : 8; // for input_attachment_index - static const unsigned int layoutAttachmentEnd = 0XFF; + unsigned int layoutAttachment : 8; // for input_attachment_index + static const unsigned int layoutAttachmentEnd = 0XFF; unsigned int layoutSpecConstantId : 11; static const unsigned int layoutSpecConstantIdEnd = 0x7FF; - TLayoutFormat layoutFormat : 8; + TLayoutFormat layoutFormat : 8; bool layoutPushConstant; @@ -951,6 +952,7 @@ class TQualifier { case ElpShared: return "shared"; case ElpStd140: return "std140"; case ElpStd430: return "std430"; + case ElpScalar: return "scalar"; default: return "none"; } } diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/revision.h b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/revision.h index 900a0b4370..a1acb25119 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/revision.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/revision.h @@ -1,3 +1,3 @@ // This header is generated by the make-revision script. -#define GLSLANG_PATCH_LEVEL 2933 +#define GLSLANG_PATCH_LEVEL 2992 diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp index 769dad0f60..6355f300ca 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp @@ -1119,9 +1119,12 @@ void TIntermediate::addBiShapeConversion(TOperator op, TIntermTyped*& lhsNode, T rhsNode = addUniShapeConversion(op, lhsNode->getType(), rhsNode); return; + case EOpMul: + // matrix multiply does not change shapes + if (lhsNode->isMatrix() && rhsNode->isMatrix()) + return; case EOpAdd: case EOpSub: - case EOpMul: case EOpDiv: // want to support vector * scalar native ops in AST and lower, not smear, similarly for // matrix * vector, etc. @@ -1194,9 +1197,19 @@ TIntermTyped* TIntermediate::addShapeConversion(const TType& type, TIntermTyped* // The new node that handles the conversion TOperator constructorOp = mapTypeToConstructorOp(type); - // HLSL has custom semantics for scalar->mat shape conversions. if (source == EShSourceHlsl) { - if (node->getType().isScalarOrVec1() && type.isMatrix()) { + // HLSL rules for scalar, vector and matrix conversions: + // 1) scalar can become anything, initializing every component with its value + // 2) vector and matrix can become scalar, first element is used (warning: truncation) + // 3) matrix can become matrix with less rows and/or columns (warning: truncation) + // 4) vector can become vector with less rows size (warning: truncation) + // 5a) vector 4 can become 2x2 matrix (special case) (same packing layout, its a reinterpret) + // 5b) 2x2 matrix can become vector 4 (special case) (same packing layout, its a reinterpret) + + const TType &sourceType = node->getType(); + + // rule 1 for scalar to matrix is special + if (sourceType.isScalarOrVec1() && type.isMatrix()) { // HLSL semantics: the scalar (or vec1) is replicated to every component of the matrix. Left to its // own devices, the constructor from a scalar would populate the diagonal. This forces replication @@ -1204,7 +1217,7 @@ TIntermTyped* TIntermediate::addShapeConversion(const TType& type, TIntermTyped* // Note that if the node is complex (e.g, a function call), we don't want to duplicate it here // repeatedly, so we copy it to a temp, then use the temp. - const int matSize = type.getMatrixRows() * type.getMatrixCols(); + const int matSize = type.computeNumComponents(); TIntermAggregate* rhsAggregate = new TIntermAggregate(); const bool isSimple = (node->getAsSymbolNode() != nullptr) || (node->getAsConstantUnion() != nullptr); @@ -1212,12 +1225,44 @@ TIntermTyped* TIntermediate::addShapeConversion(const TType& type, TIntermTyped* if (!isSimple) { assert(0); // TODO: use node replicator service when available. } - - for (int x=0; xgetSequence().push_back(node); return setAggregateOperator(rhsAggregate, constructorOp, type, node->getLoc()); } + + // rule 1 and 2 + if ((sourceType.isScalar() && !type.isScalar()) || (!sourceType.isScalar() && type.isScalar())) + return setAggregateOperator(makeAggregate(node), constructorOp, type, node->getLoc()); + + // rule 3 and 5b + if (sourceType.isMatrix()) { + // rule 3 + if (type.isMatrix()) { + if ((sourceType.getMatrixCols() != type.getMatrixCols() || sourceType.getMatrixRows() != type.getMatrixRows()) && + sourceType.getMatrixCols() >= type.getMatrixCols() && sourceType.getMatrixRows() >= type.getMatrixRows()) + return setAggregateOperator(makeAggregate(node), constructorOp, type, node->getLoc()); + // rule 5b + } else if (type.isVector()) { + if (type.getVectorSize() == 4 && sourceType.getMatrixCols() == 2 && sourceType.getMatrixRows() == 2) + return setAggregateOperator(makeAggregate(node), constructorOp, type, node->getLoc()); + } + } + + // rule 4 and 5a + if (sourceType.isVector()) { + // rule 4 + if (type.isVector()) + { + if (sourceType.getVectorSize() > type.getVectorSize()) + return setAggregateOperator(makeAggregate(node), constructorOp, type, node->getLoc()); + // rule 5a + } else if (type.isMatrix()) { + if (sourceType.getVectorSize() == 4 && type.getMatrixCols() == 2 && type.getMatrixRows() == 2) + return setAggregateOperator(makeAggregate(node), constructorOp, type, node->getLoc()); + } + } } // scalar -> vector or vec1 -> vector or diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp index 74cd5ce5e6..c894f5cfb2 100755 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp @@ -3872,6 +3872,8 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS identifier == "gl_BackSecondaryColor" || identifier == "gl_SecondaryColor" || (identifier == "gl_Color" && language == EShLangFragment) || + (identifier == "gl_FragStencilRefARB" && (nonEsRedecls && version >= 140) + && language == EShLangFragment) || #ifdef NV_EXTENSIONS identifier == "gl_SampleMask" || identifier == "gl_Layer" || @@ -3954,6 +3956,12 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS error(loc, "all redeclarations must use the same depth layout on", "redeclaration", symbol->getName().c_str()); } } + else if (identifier == "gl_FragStencilRefARB") { + if (qualifier.hasLayout()) + error(loc, "cannot apply layout qualifier to", "redeclaration", symbol->getName().c_str()); + if (qualifier.storage != EvqVaryingOut) + error(loc, "cannot change output storage qualification of", "redeclaration", symbol->getName().c_str()); + } #ifdef NV_EXTENSIONS else if (identifier == "gl_SampleMask") { if (!publicType.layoutOverrideCoverage) { @@ -4041,7 +4049,7 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT if (currentBlockQualifier.storage == EvqVaryingOut && globalOutputDefaults.hasXfbBuffer()) { if (!currentBlockQualifier.hasXfbBuffer()) currentBlockQualifier.layoutXfbBuffer = globalOutputDefaults.layoutXfbBuffer; - fixBlockXfbOffsets(currentBlockQualifier, newTypeList); + fixXfbOffsets(currentBlockQualifier, newTypeList); } // Edit and error check the container against the redeclaration @@ -4603,6 +4611,12 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi publicType.qualifier.layoutPacking = ElpStd430; return; } + if (id == TQualifier::getLayoutPackingString(ElpScalar)) { + requireVulkan(loc, "scalar"); + requireExtensions(loc, 1, &E_GL_EXT_scalar_block_layout, "scalar block layout"); + publicType.qualifier.layoutPacking = ElpScalar; + return; + } // TODO: compile-time performance: may need to stop doing linear searches for (TLayoutFormat format = (TLayoutFormat)(ElfNone + 1); format < ElfCount; format = (TLayoutFormat)(format + 1)) { if (id == TQualifier::getLayoutFormatString(format)) { @@ -4928,11 +4942,13 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi } else if (id == "xfb_stride") { // "The resulting stride (implicit or explicit), when divided by 4, must be less than or equal to the // implementation-dependent constant gl_MaxTransformFeedbackInterleavedComponents." - if (value > 4 * resources.maxTransformFeedbackInterleavedComponents) - error(loc, "1/4 stride is too large:", id.c_str(), "gl_MaxTransformFeedbackInterleavedComponents is %d", resources.maxTransformFeedbackInterleavedComponents); - else if (value >= (int)TQualifier::layoutXfbStrideEnd) + if (value > 4 * resources.maxTransformFeedbackInterleavedComponents) { + error(loc, "1/4 stride is too large:", id.c_str(), "gl_MaxTransformFeedbackInterleavedComponents is %d", + resources.maxTransformFeedbackInterleavedComponents); + } + if (value >= (int)TQualifier::layoutXfbStrideEnd) error(loc, "stride is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbStrideEnd-1); - if (value < (int)TQualifier::layoutXfbStrideEnd) + else publicType.qualifier.layoutXfbStride = value; return; } @@ -6116,6 +6132,11 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden // fix up fixOffset(loc, *symbol); + if (symbol->getType().getBasicType() == EbtStruct) { + fixXfbOffsets(symbol->getWritableType().getQualifier(), + *(symbol->getWritableType().getWritableStruct())); + } + return initNode; } @@ -6771,8 +6792,10 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con // "The align qualifier can only be used on blocks or block members, and only for blocks declared with std140 or std430 layouts." if (currentBlockQualifier.hasAlign()) { - if (defaultQualification.layoutPacking != ElpStd140 && defaultQualification.layoutPacking != ElpStd430) { - error(loc, "can only be used with std140 or std430 layout packing", "align", ""); + if (defaultQualification.layoutPacking != ElpStd140 && + defaultQualification.layoutPacking != ElpStd430 && + defaultQualification.layoutPacking != ElpScalar) { + error(loc, "can only be used with std140, std430, or scalar layout packing", "align", ""); defaultQualification.layoutAlign = -1; } } @@ -6821,8 +6844,10 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con // "The offset qualifier can only be used on block members of blocks declared with std140 or std430 layouts." // "The align qualifier can only be used on blocks or block members, and only for blocks declared with std140 or std430 layouts." if (memberQualifier.hasAlign() || memberQualifier.hasOffset()) { - if (defaultQualification.layoutPacking != ElpStd140 && defaultQualification.layoutPacking != ElpStd430) - error(memberLoc, "can only be used with std140 or std430 layout packing", "offset/align", ""); + if (defaultQualification.layoutPacking != ElpStd140 && + defaultQualification.layoutPacking != ElpStd430 && + defaultQualification.layoutPacking != ElpScalar) + error(memberLoc, "can only be used with std140, std430, or scalar layout packing", "offset/align", ""); } #ifdef NV_EXTENSIONS @@ -6840,7 +6865,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con // Process the members fixBlockLocations(loc, currentBlockQualifier, typeList, memberWithLocation, memberWithoutLocation); - fixBlockXfbOffsets(currentBlockQualifier, typeList); + fixXfbOffsets(currentBlockQualifier, typeList); fixBlockUniformOffsets(currentBlockQualifier, typeList); for (unsigned int member = 0; member < typeList.size(); ++member) layoutTypeCheck(typeList[member].loc, *typeList[member].type); @@ -6933,7 +6958,7 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q profileRequires(loc, EEsProfile, 300, nullptr, "uniform block"); profileRequires(loc, ENoProfile, 140, nullptr, "uniform block"); if (currentBlockQualifier.layoutPacking == ElpStd430 && ! currentBlockQualifier.layoutPushConstant) - error(loc, "requires the 'buffer' storage qualifier", "std430", ""); + requireExtensions(loc, 1, &E_GL_EXT_scalar_block_layout, "std430 requires the buffer storage qualifier"); break; case EvqBuffer: requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, "buffer block"); @@ -7091,7 +7116,7 @@ void TParseContext::fixBlockLocations(const TSourceLoc& loc, TQualifier& qualifi } } -void TParseContext::fixBlockXfbOffsets(TQualifier& qualifier, TTypeList& typeList) +void TParseContext::fixXfbOffsets(TQualifier& qualifier, TTypeList& typeList) { // "If a block is qualified with xfb_offset, all its // members are assigned transform feedback buffer offsets. If a block is not qualified with xfb_offset, any @@ -7132,7 +7157,7 @@ void TParseContext::fixBlockUniformOffsets(TQualifier& qualifier, TTypeList& typ { if (!qualifier.isUniformOrBuffer() && !qualifier.isTaskMemory()) return; - if (qualifier.layoutPacking != ElpStd140 && qualifier.layoutPacking != ElpStd430) + if (qualifier.layoutPacking != ElpStd140 && qualifier.layoutPacking != ElpStd430 && qualifier.layoutPacking != ElpScalar) return; int offset = 0; @@ -7146,8 +7171,8 @@ void TParseContext::fixBlockUniformOffsets(TQualifier& qualifier, TTypeList& typ // modify just the children's view of matrix layout, if there is one for this member TLayoutMatrix subMatrixLayout = typeList[member].type->getQualifier().layoutMatrix; int dummyStride; - int memberAlignment = intermediate.getBaseAlignment(*typeList[member].type, memberSize, dummyStride, qualifier.layoutPacking == ElpStd140, - subMatrixLayout != ElmNone ? subMatrixLayout == ElmRowMajor : qualifier.layoutMatrix == ElmRowMajor); + int memberAlignment = intermediate.getMemberAlignment(*typeList[member].type, memberSize, dummyStride, qualifier.layoutPacking, + subMatrixLayout != ElmNone ? subMatrixLayout == ElmRowMajor : qualifier.layoutMatrix == ElmRowMajor); if (memberQualifier.hasOffset()) { // "The specified offset must be a multiple // of the base alignment of the type of the block member it qualifies, or a compile-time error results." diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.h index b513f49786..14421a267b 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.h @@ -403,7 +403,7 @@ class TParseContext : public TParseContextBase { void blockStageIoCheck(const TSourceLoc&, const TQualifier&); void blockQualifierCheck(const TSourceLoc&, const TQualifier&, bool instanceName); void fixBlockLocations(const TSourceLoc&, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation); - void fixBlockXfbOffsets(TQualifier&, TTypeList&); + void fixXfbOffsets(TQualifier&, TTypeList&); void fixBlockUniformOffsets(TQualifier&, TTypeList&); void addQualifierToExisting(const TSourceLoc&, TQualifier, const TString& identifier); void addQualifierToExisting(const TSourceLoc&, TQualifier, TIdentifierList&); diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Versions.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Versions.cpp index 66fa3e25e3..89c033370e 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Versions.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Versions.cpp @@ -204,6 +204,7 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_EXT_control_flow_attributes] = EBhDisable; extensionBehavior[E_GL_EXT_nonuniform_qualifier] = EBhDisable; extensionBehavior[E_GL_EXT_samplerless_texture_functions] = EBhDisable; + extensionBehavior[E_GL_EXT_scalar_block_layout] = EBhDisable; extensionBehavior[E_GL_EXT_shader_16bit_storage] = EBhDisable; extensionBehavior[E_GL_EXT_shader_8bit_storage] = EBhDisable; @@ -378,6 +379,7 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_EXT_shader_16bit_storage 1\n" "#define GL_EXT_shader_8bit_storage 1\n" "#define GL_EXT_samplerless_texture_functions 1\n" + "#define GL_EXT_scalar_block_layout 1\n" // GL_KHR_shader_subgroup "#define GL_KHR_shader_subgroup_basic 1\n" diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Versions.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Versions.h index 85c93c0ac3..df10f0f4ae 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Versions.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Versions.h @@ -166,6 +166,7 @@ const char* const E_GL_EXT_post_depth_coverage = "GL_EXT_post_depth const char* const E_GL_EXT_control_flow_attributes = "GL_EXT_control_flow_attributes"; const char* const E_GL_EXT_nonuniform_qualifier = "GL_EXT_nonuniform_qualifier"; const char* const E_GL_EXT_samplerless_texture_functions = "GL_EXT_samplerless_texture_functions"; +const char* const E_GL_EXT_scalar_block_layout = "GL_EXT_scalar_block_layout"; // Arrays of extensions for the above viewportEXTs duplications diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/linkValidate.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/linkValidate.cpp index 8630128f75..82e7c6e7e1 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/linkValidate.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/linkValidate.cpp @@ -1372,10 +1372,11 @@ int TIntermediate::getBaseAlignmentScalar(const TType& type, int& size) // stride comes from the flattening down to vectors. // // Return value is the alignment of the type. -int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, bool std140, bool rowMajor) +int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, TLayoutPacking layoutPacking, bool rowMajor) { int alignment; + bool std140 = layoutPacking == glslang::ElpStd140; // When using the std140 storage layout, structures will be laid out in buffer // storage with its members stored in monotonically increasing order based on their // location in the declaration. A structure and each structure member have a base @@ -1439,7 +1440,7 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, b if (type.isArray()) { // TODO: perf: this might be flattened by using getCumulativeArraySize(), and a deref that discards all arrayness TType derefType(type, 0); - alignment = getBaseAlignment(derefType, size, dummyStride, std140, rowMajor); + alignment = getBaseAlignment(derefType, size, dummyStride, layoutPacking, rowMajor); if (std140) alignment = std::max(baseAlignmentVec4Std140, alignment); RoundToPow2(size, alignment); @@ -1459,7 +1460,7 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, b int memberSize; // modify just the children's view of matrix layout, if there is one for this member TLayoutMatrix subMatrixLayout = memberList[m].type->getQualifier().layoutMatrix; - int memberAlignment = getBaseAlignment(*memberList[m].type, memberSize, dummyStride, std140, + int memberAlignment = getBaseAlignment(*memberList[m].type, memberSize, dummyStride, layoutPacking, (subMatrixLayout != ElmNone) ? (subMatrixLayout == ElmRowMajor) : rowMajor); maxAlignment = std::max(maxAlignment, memberAlignment); RoundToPow2(size, memberAlignment); @@ -1498,7 +1499,7 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, b // rule 5: deref to row, not to column, meaning the size of vector is num columns instead of num rows TType derefType(type, 0, rowMajor); - alignment = getBaseAlignment(derefType, size, dummyStride, std140, rowMajor); + alignment = getBaseAlignment(derefType, size, dummyStride, layoutPacking, rowMajor); if (std140) alignment = std::max(baseAlignmentVec4Std140, alignment); RoundToPow2(size, alignment); @@ -1526,4 +1527,79 @@ bool TIntermediate::improperStraddle(const TType& type, int size, int offset) : offset % 16 != 0; } +int TIntermediate::getScalarAlignment(const TType& type, int& size, int& stride, bool rowMajor) +{ + int alignment; + + stride = 0; + int dummyStride; + + if (type.isArray()) { + TType derefType(type, 0); + alignment = getScalarAlignment(derefType, size, dummyStride, rowMajor); + + stride = size; + RoundToPow2(stride, alignment); + + size = stride * (type.getOuterArraySize() - 1) + size; + return alignment; + } + + if (type.getBasicType() == EbtStruct) { + const TTypeList& memberList = *type.getStruct(); + + size = 0; + int maxAlignment = 0; + for (size_t m = 0; m < memberList.size(); ++m) { + int memberSize; + // modify just the children's view of matrix layout, if there is one for this member + TLayoutMatrix subMatrixLayout = memberList[m].type->getQualifier().layoutMatrix; + int memberAlignment = getScalarAlignment(*memberList[m].type, memberSize, dummyStride, + (subMatrixLayout != ElmNone) ? (subMatrixLayout == ElmRowMajor) : rowMajor); + maxAlignment = std::max(maxAlignment, memberAlignment); + RoundToPow2(size, memberAlignment); + size += memberSize; + } + + return maxAlignment; + } + + if (type.isScalar()) + return getBaseAlignmentScalar(type, size); + + if (type.isVector()) { + int scalarAlign = getBaseAlignmentScalar(type, size); + + size *= type.getVectorSize(); + return scalarAlign; + } + + if (type.isMatrix()) { + TType derefType(type, 0, rowMajor); + + alignment = getScalarAlignment(derefType, size, dummyStride, rowMajor); + + stride = size; // use intra-matrix stride for stride of a just a matrix + if (rowMajor) + size = stride * type.getMatrixRows(); + else + size = stride * type.getMatrixCols(); + + return alignment; + } + + assert(0); // all cases should be covered above + size = 1; + return 1; +} + +int TIntermediate::getMemberAlignment(const TType& type, int& size, int& stride, TLayoutPacking layoutPacking, bool rowMajor) +{ + if (layoutPacking == glslang::ElpScalar) { + return getScalarAlignment(type, size, stride, rowMajor); + } else { + return getBaseAlignment(type, size, stride, layoutPacking, rowMajor); + } +} + } // end namespace glslang diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/localintermediate.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/localintermediate.h index 99f777f119..762b31085c 100755 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/localintermediate.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/localintermediate.h @@ -634,7 +634,9 @@ class TIntermediate { int addXfbBufferOffset(const TType&); unsigned int computeTypeXfbSize(const TType&, bool& containsDouble) const; static int getBaseAlignmentScalar(const TType&, int& size); - static int getBaseAlignment(const TType&, int& size, int& stride, bool std140, bool rowMajor); + static int getBaseAlignment(const TType&, int& size, int& stride, TLayoutPacking layoutPacking, bool rowMajor); + static int getScalarAlignment(const TType&, int& size, int& stride, bool rowMajor); + static int getMemberAlignment(const TType&, int& size, int& stride, TLayoutPacking layoutPacking, bool rowMajor); static bool improperStraddle(const TType& type, int size, int offset); bool promote(TIntermOperator*); diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp old mode 100644 new mode 100755 index 12353550df..2000b77748 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp @@ -109,11 +109,12 @@ int TPpContext::CPPdefine(TPpToken* ppToken) // save the macro name const int defAtom = atomStrings.getAddAtom(ppToken->name); + TSourceLoc defineLoc = ppToken->loc; // because ppToken might go to the next line before we report errors // gather parameters to the macro, between (...) token = scanToken(ppToken); - if (token == '(' && ! ppToken->space) { - mac.emptyArgs = 1; + if (token == '(' && !ppToken->space) { + mac.functionLike = 1; do { token = scanToken(ppToken); if (mac.args.size() == 0 && token == ')') @@ -123,7 +124,6 @@ int TPpContext::CPPdefine(TPpToken* ppToken) return token; } - mac.emptyArgs = 0; const int argAtom = atomStrings.getAddAtom(ppToken->name); // check for duplication of parameter name @@ -149,7 +149,6 @@ int TPpContext::CPPdefine(TPpToken* ppToken) } // record the definition of the macro - TSourceLoc defineLoc = ppToken->loc; // because ppToken is going to go to the next line before we report errors while (token != '\n' && token != EndOfInput) { mac.body.putToken(token, ppToken); token = scanToken(ppToken); @@ -164,7 +163,9 @@ int TPpContext::CPPdefine(TPpToken* ppToken) // Already defined -- need to make sure they are identical: // "Two replacement lists are identical if and only if the preprocessing tokens in both have the same number, // ordering, spelling, and white-space separation, where all white-space separations are considered identical." - if (existing->args.size() != mac.args.size() || existing->emptyArgs != mac.emptyArgs) + if (existing->functionLike != mac.functionLike) + parseContext.ppError(defineLoc, "Macro redefined; function-like versus object-like:", "#define", atomStrings.getString(defAtom)); + else if (existing->args.size() != mac.args.size()) parseContext.ppError(defineLoc, "Macro redefined; different number of arguments:", "#define", atomStrings.getString(defAtom)); else { if (existing->args != mac.args) @@ -1190,14 +1191,20 @@ MacroExpandResult TPpContext::MacroExpand(TPpToken* ppToken, bool expandUndef, b TSourceLoc loc = ppToken->loc; // in case we go to the next line before discovering the error in->mac = macro; - if (macro->args.size() > 0 || macro->emptyArgs) { - int token = scanToken(ppToken); + if (macro->functionLike) { + // We don't know yet if this will be a successful call of a + // function-like macro; need to look for a '(', but without trashing + // the passed in ppToken, until we know we are no longer speculative. + TPpToken parenToken; + int token = scanToken(&parenToken); if (newLineOkay) { while (token == '\n') - token = scanToken(ppToken); + token = scanToken(&parenToken); } if (token != '(') { - UngetToken(token, ppToken); + // Function-like macro called with object-like syntax: okay, don't expand. + // (We ate exactly one token that might not be white space; put it back. + UngetToken(token, &parenToken); delete in; return MacroExpandNotStarted; } diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.h index 5c26081618..64681fc331 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.h @@ -267,12 +267,12 @@ class TPpContext { // struct MacroSymbol { - MacroSymbol() : emptyArgs(0), busy(0), undef(0) { } + MacroSymbol() : functionLike(0), busy(0), undef(0) { } TVector args; TokenStream body; - unsigned emptyArgs : 1; - unsigned busy : 1; - unsigned undef : 1; + unsigned functionLike : 1; // 0 means object-like, 1 means function-like + unsigned busy : 1; + unsigned undef : 1; }; typedef TMap TSymbolMap; diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/reflection.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/reflection.cpp index 5d59f2895b..8cfc2acb86 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/reflection.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/reflection.cpp @@ -131,11 +131,11 @@ class TReflectionTraverser : public TLiveTraverser { for (int m = 0; m <= index; ++m) { // modify just the children's view of matrix layout, if there is one for this member TLayoutMatrix subMatrixLayout = memberList[m].type->getQualifier().layoutMatrix; - int memberAlignment = intermediate.getBaseAlignment(*memberList[m].type, memberSize, dummyStride, - type.getQualifier().layoutPacking == ElpStd140, - subMatrixLayout != ElmNone - ? subMatrixLayout == ElmRowMajor - : type.getQualifier().layoutMatrix == ElmRowMajor); + int memberAlignment = intermediate.getMemberAlignment(*memberList[m].type, memberSize, dummyStride, + type.getQualifier().layoutPacking, + subMatrixLayout != ElmNone + ? subMatrixLayout == ElmRowMajor + : type.getQualifier().layoutMatrix == ElmRowMajor); RoundToPow2(offset, memberAlignment); if (m < index) offset += memberSize; @@ -154,9 +154,9 @@ class TReflectionTraverser : public TLiveTraverser { int lastMemberSize; int dummyStride; - intermediate.getBaseAlignment(*memberList[lastIndex].type, lastMemberSize, dummyStride, - blockType.getQualifier().layoutPacking == ElpStd140, - blockType.getQualifier().layoutMatrix == ElmRowMajor); + intermediate.getMemberAlignment(*memberList[lastIndex].type, lastMemberSize, dummyStride, + blockType.getQualifier().layoutPacking, + blockType.getQualifier().layoutMatrix == ElmRowMajor); return lastOffset + lastMemberSize; } diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/Public/ShaderLang.h b/3rdparty/bgfx/3rdparty/glslang/glslang/Public/ShaderLang.h index 070882938d..c5eca4e127 100755 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/Public/ShaderLang.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/Public/ShaderLang.h @@ -70,7 +70,7 @@ // This should always increase, as some paths to do not consume // a more major number. // It should increment by one when new functionality is added. -#define GLSLANG_MINOR_VERSION 10 +#define GLSLANG_MINOR_VERSION 11 // // Call before doing any other compiler/linker operations. diff --git a/3rdparty/bgfx/3rdparty/glslang/gtests/CMakeLists.txt b/3rdparty/bgfx/3rdparty/glslang/gtests/CMakeLists.txt index 4832baac41..f678cb6ea5 100644 --- a/3rdparty/bgfx/3rdparty/glslang/gtests/CMakeLists.txt +++ b/3rdparty/bgfx/3rdparty/glslang/gtests/CMakeLists.txt @@ -25,7 +25,7 @@ if(BUILD_TESTING) # -- Remapper tests ${CMAKE_CURRENT_SOURCE_DIR}/Remap.FromFile.cpp) - PCH(TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/pch.cpp) + glslang_pch(TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/pch.cpp) add_executable(glslangtests ${TEST_SOURCES}) set_property(TARGET glslangtests PROPERTY FOLDER tests) diff --git a/3rdparty/bgfx/3rdparty/glslang/gtests/Hlsl.FromFile.cpp b/3rdparty/bgfx/3rdparty/glslang/gtests/Hlsl.FromFile.cpp index 635c7a87a2..809e525796 100644 --- a/3rdparty/bgfx/3rdparty/glslang/gtests/Hlsl.FromFile.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/gtests/Hlsl.FromFile.cpp @@ -382,7 +382,8 @@ INSTANTIATE_TEST_CASE_P( {"hlsl.typeGraphCopy.vert", "main"}, {"hlsl.typedef.frag", "PixelShaderFunction"}, {"hlsl.whileLoop.frag", "PixelShaderFunction"}, - {"hlsl.void.frag", "PixelShaderFunction"} + {"hlsl.void.frag", "PixelShaderFunction"}, + {"hlsl.type.type.conversion.all.frag", "main"} }), FileNameAsCustomTestSuffix ); @@ -399,6 +400,8 @@ INSTANTIATE_TEST_CASE_P( {"hlsl.wavequery.frag", "PixelShaderFunction"}, {"hlsl.wavereduction.comp", "CSMain"}, {"hlsl.wavevote.comp", "CSMain"}, + { "hlsl.type.type.conversion.valid.frag", "main" }, + {"hlsl.int.dot.frag", "main"} }), FileNameAsCustomTestSuffix ); diff --git a/3rdparty/bgfx/3rdparty/glslang/gtests/Spv.FromFile.cpp b/3rdparty/bgfx/3rdparty/glslang/gtests/Spv.FromFile.cpp index ca558cd8bf..410f8ed0fe 100644 --- a/3rdparty/bgfx/3rdparty/glslang/gtests/Spv.FromFile.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/gtests/Spv.FromFile.cpp @@ -309,6 +309,8 @@ INSTANTIATE_TEST_CASE_P( "spv.sampleId.frag", "spv.samplePosition.frag", "spv.sampleMaskOverrideCoverage.frag", + "spv.scalarlayout.frag", + "spv.scalarlayoutfloat16.frag", "spv.shaderBallot.comp", "spv.shaderDrawParams.vert", "spv.shaderGroupVote.comp", @@ -440,6 +442,7 @@ INSTANTIATE_TEST_CASE_P( "spv.rankShift.comp", "spv.specConst.vert", "spv.OVR_multiview.vert", + "spv.xfbOffsetOnStructMembersAssignment.vert", })), FileNameAsCustomTestSuffix ); diff --git a/3rdparty/bgfx/3rdparty/glslang/hlsl/CMakeLists.txt b/3rdparty/bgfx/3rdparty/glslang/hlsl/CMakeLists.txt index cf2f8f3217..f918d7a13d 100644 --- a/3rdparty/bgfx/3rdparty/glslang/hlsl/CMakeLists.txt +++ b/3rdparty/bgfx/3rdparty/glslang/hlsl/CMakeLists.txt @@ -17,7 +17,7 @@ set(HEADERS hlslGrammar.h hlslParseables.h) -PCH(SOURCES pch.cpp) +glslang_pch(SOURCES pch.cpp) add_library(HLSL ${LIB_TYPE} ${SOURCES} ${HEADERS}) set_property(TARGET HLSL PROPERTY FOLDER hlsl) diff --git a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseHelper.cpp b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseHelper.cpp index 135e1d2886..b536cc9dd1 100755 --- a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseHelper.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseHelper.cpp @@ -3477,8 +3477,8 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte if (argStride != nullptr) { int size; int stride; - intermediate.getBaseAlignment(argArray->getType(), size, stride, false, - argArray->getType().getQualifier().layoutMatrix == ElmRowMajor); + intermediate.getMemberAlignment(argArray->getType(), size, stride, argArray->getType().getQualifier().layoutPacking, + argArray->getType().getQualifier().layoutMatrix == ElmRowMajor); TIntermTyped* assign = intermediate.addAssign(EOpAssign, argStride, intermediate.addConstantUnion(stride, loc, true), loc); @@ -6066,13 +6066,22 @@ void HlslParseContext::handleRegister(const TSourceLoc& loc, TQualifier& qualifi } } - // TODO: learn what all these really mean and how they interact with regNumber and subComponent + // more information about register types see + // https://docs.microsoft.com/en-us/windows/desktop/direct3dhlsl/dx-graphics-hlsl-variable-register const std::vector& resourceInfo = intermediate.getResourceSetBinding(); switch (std::tolower(desc[0])) { + case 'c': + // c register is the register slot in the global const buffer + // each slot is a vector of 4 32 bit components + qualifier.layoutOffset = regNumber * 4 * 4; + break; + // const buffer register slot case 'b': + // textrues and structured buffers case 't': - case 'c': + // samplers case 's': + // uav resources case 'u': // if nothing else has set the binding, do so now // (other mechanisms override this one) @@ -8555,7 +8564,7 @@ void HlslParseContext::declareBlock(const TSourceLoc& loc, TType& type, const TS // Process the members fixBlockLocations(loc, type.getQualifier(), typeList, memberWithLocation, memberWithoutLocation); - fixBlockXfbOffsets(type.getQualifier(), typeList); + fixXfbOffsets(type.getQualifier(), typeList); fixBlockUniformOffsets(type.getQualifier(), typeList); // reverse merge, so that currentBlockQualifier now has all layout information @@ -8638,7 +8647,7 @@ void HlslParseContext::fixBlockLocations(const TSourceLoc& loc, TQualifier& qual } } -void HlslParseContext::fixBlockXfbOffsets(TQualifier& qualifier, TTypeList& typeList) +void HlslParseContext::fixXfbOffsets(TQualifier& qualifier, TTypeList& typeList) { // "If a block is qualified with xfb_offset, all its // members are assigned transform feedback buffer offsets. If a block is not qualified with xfb_offset, any @@ -8679,7 +8688,7 @@ void HlslParseContext::fixBlockUniformOffsets(const TQualifier& qualifier, TType { if (! qualifier.isUniformOrBuffer()) return; - if (qualifier.layoutPacking != ElpStd140 && qualifier.layoutPacking != ElpStd430) + if (qualifier.layoutPacking != ElpStd140 && qualifier.layoutPacking != ElpStd430 && qualifier.layoutPacking != ElpScalar) return; int offset = 0; @@ -8693,11 +8702,11 @@ void HlslParseContext::fixBlockUniformOffsets(const TQualifier& qualifier, TType // modify just the children's view of matrix layout, if there is one for this member TLayoutMatrix subMatrixLayout = typeList[member].type->getQualifier().layoutMatrix; int dummyStride; - int memberAlignment = intermediate.getBaseAlignment(*typeList[member].type, memberSize, dummyStride, - qualifier.layoutPacking == ElpStd140, - subMatrixLayout != ElmNone - ? subMatrixLayout == ElmRowMajor - : qualifier.layoutMatrix == ElmRowMajor); + int memberAlignment = intermediate.getMemberAlignment(*typeList[member].type, memberSize, dummyStride, + qualifier.layoutPacking, + subMatrixLayout != ElmNone + ? subMatrixLayout == ElmRowMajor + : qualifier.layoutMatrix == ElmRowMajor); if (memberQualifier.hasOffset()) { // "The specified offset must be a multiple // of the base alignment of the type of the block member it qualifies, or a compile-time error results." diff --git a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseHelper.h b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseHelper.h index 7cb898cf4b..f99d5c73fc 100644 --- a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseHelper.h +++ b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseHelper.h @@ -155,7 +155,7 @@ class HlslParseContext : public TParseContextBase { void declareBlock(const TSourceLoc&, TType&, const TString* instanceName = 0); void declareStructBufferCounter(const TSourceLoc& loc, const TType& bufferType, const TString& name); void fixBlockLocations(const TSourceLoc&, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation); - void fixBlockXfbOffsets(TQualifier&, TTypeList&); + void fixXfbOffsets(TQualifier&, TTypeList&); void fixBlockUniformOffsets(const TQualifier&, TTypeList&); void addQualifierToExisting(const TSourceLoc&, TQualifier, const TString& identifier); void addQualifierToExisting(const TSourceLoc&, TQualifier, TIdentifierList&); diff --git a/3rdparty/bgfx/3rdparty/glslang/known_good.json b/3rdparty/bgfx/3rdparty/glslang/known_good.json index ee8288568f..d985507918 100755 --- a/3rdparty/bgfx/3rdparty/glslang/known_good.json +++ b/3rdparty/bgfx/3rdparty/glslang/known_good.json @@ -5,7 +5,7 @@ "site" : "github", "subrepo" : "KhronosGroup/SPIRV-Tools", "subdir" : "External/spirv-tools", - "commit" : "fb996dce752507132c40c255898154cce6c072c5" + "commit" : "8e9be303b00ba352ee25dbcd352769641637a853" }, { "name" : "spirv-tools/external/spirv-headers", diff --git a/3rdparty/bgfx/README.md b/3rdparty/bgfx/README.md index c0a97bead8..bf4892ee11 100644 --- a/3rdparty/bgfx/README.md +++ b/3rdparty/bgfx/README.md @@ -43,7 +43,7 @@ Supported compilers: * Clang 3.3 and above * GCC 5 and above - * VS2015 and above + * VS2017 and above Languages: @@ -315,6 +315,11 @@ target="_blank">Off The Road +## Coal Burnout + +https://beardsvibe.com/ - Multiplayer PVP rhythm game. +![coal-burnout](https://beardsvibe.com/scr/0l.png) + [License (BSD 2-clause)](https://bkaradzic.github.io/bgfx/license.html) ----------------------------------------------------------------------- diff --git a/3rdparty/bgfx/include/bgfx/bgfx.h b/3rdparty/bgfx/include/bgfx/bgfx.h index 047ab10b77..3430764e84 100644 --- a/3rdparty/bgfx/include/bgfx/bgfx.h +++ b/3rdparty/bgfx/include/bgfx/bgfx.h @@ -866,6 +866,9 @@ namespace bgfx /// struct Attachment { + void init(TextureHandle _handle, Access::Enum _access = Access::Write, uint16_t _layer = 0, uint16_t _mip = 0, uint8_t _resolve = BGFX_RESOLVE_AUTO_GEN_MIPS); + + Access::Enum access; //!< TextureHandle handle; //!< Texture handle. uint16_t mip; //!< Mip level. uint16_t layer; //!< Cubemap side or depth layer/slice. diff --git a/3rdparty/bgfx/include/bgfx/c99/bgfx.h b/3rdparty/bgfx/include/bgfx/c99/bgfx.h index df4e6554a6..58a583ff12 100644 --- a/3rdparty/bgfx/include/bgfx/c99/bgfx.h +++ b/3rdparty/bgfx/include/bgfx/c99/bgfx.h @@ -483,6 +483,7 @@ typedef struct bgfx_uniform_info_s /**/ typedef struct bgfx_attachment_s { + bgfx_access_t access; bgfx_texture_handle_t handle; uint16_t mip; uint16_t layer; diff --git a/3rdparty/bgfx/include/bgfx/defines.h b/3rdparty/bgfx/include/bgfx/defines.h index a043b0abeb..d6419e47a6 100644 --- a/3rdparty/bgfx/include/bgfx/defines.h +++ b/3rdparty/bgfx/include/bgfx/defines.h @@ -6,7 +6,7 @@ #ifndef BGFX_DEFINES_H_HEADER_GUARD #define BGFX_DEFINES_H_HEADER_GUARD -#define BGFX_API_VERSION UINT32_C(89) +#define BGFX_API_VERSION UINT32_C(90) /// Color RGB/alpha/depth write. When it's not specified write will be disabled. #define BGFX_STATE_WRITE_R UINT64_C(0x0000000000000001) //!< Enable R write. diff --git a/3rdparty/bgfx/makefile b/3rdparty/bgfx/makefile index 72db3a27af..2bb0cef3ea 100644 --- a/3rdparty/bgfx/makefile +++ b/3rdparty/bgfx/makefile @@ -39,7 +39,6 @@ clean: ## Clean all intermediate files. @mkdir .build projgen: ## Generate project files for all configurations. - $(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2015 $(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2017 $(GENIE) --with-tools --with-combined-examples --vs=winstore100 vs2017 $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=mingw-gcc gmake @@ -49,7 +48,6 @@ projgen: ## Generate project files for all configurations. $(GENIE) --with-tools --with-combined-examples --with-shared-lib --xcode=ios xcode8 $(GENIE) --with-combined-examples --with-shared-lib --gcc=freebsd gmake $(GENIE) --with-combined-examples --gcc=android-arm gmake - $(GENIE) --with-combined-examples --gcc=android-mips gmake $(GENIE) --with-combined-examples --gcc=android-x86 gmake $(GENIE) --with-combined-examples --gcc=asmjs gmake $(GENIE) --with-combined-examples --gcc=ios-arm gmake @@ -66,14 +64,6 @@ android-arm-release: .build/projects/gmake-android-arm ## Build - Android ARM Re $(MAKE) -R -C .build/projects/gmake-android-arm config=release android-arm: android-arm-debug android-arm-release ## Build - Android ARM Debug and Release -.build/projects/gmake-android-mips: - $(GENIE) --gcc=android-mips gmake -android-mips-debug: .build/projects/gmake-android-mips ## Build - Android MIPS Debug - $(MAKE) -R -C .build/projects/gmake-android-mips config=debug -android-mips-release: .build/projects/gmake-android-mips ## Build - Android MIPS Release - $(MAKE) -R -C .build/projects/gmake-android-mips config=release -android-mips: android-mips-debug android-mips-release ## Build - Android MIPS Debug and Release - .build/projects/gmake-android-x86: $(GENIE) --gcc=android-x86 gmake android-x86-debug: .build/projects/gmake-android-x86 ## Build - Android x86 Debug and Release @@ -134,18 +124,6 @@ mingw-clang-release64: .build/projects/gmake-mingw-clang ## Build - MinGW Clang $(MAKE) -R -C .build/projects/gmake-mingw-clang config=release64 mingw-clang: mingw-clang-debug32 mingw-clang-release32 mingw-clang-debug64 mingw-clang-release64 ## Build - MinGW Clang x86/x64 Debug and Release -.build/projects/vs2015: - $(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2015 -vs2015-debug32: .build/projects/vs2015 ## Build - VS2015 x86 Debug - devenv .build/projects/vs2015/bgfx.sln /Build "Debug|Win32" -vs2015-release32: .build/projects/vs2015 ## Build - VS2015 x86 Release - devenv .build/projects/vs2015/bgfx.sln /Build "Release|Win32" -vs2015-debug64: .build/projects/vs2015 ## Build - VS2015 x64 Debug - devenv .build/projects/vs2015/bgfx.sln /Build "Debug|x64" -vs2015-release64: .build/projects/vs2015 ## Build - VS2015 x64 Release - devenv .build/projects/vs2015/bgfx.sln /Build "Release|x64" -vs2015: vs2015-debug32 vs2015-release32 vs2015-debug64 vs2015-release64 ## Build - VS2015 x86/x64 Debug and Release - .build/projects/vs2017: $(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2017 vs2017-debug32: .build/projects/vs2017 ## Build - vs2017 x86 Debug diff --git a/3rdparty/bgfx/scripts/shaderc.lua b/3rdparty/bgfx/scripts/shaderc.lua index 52e3b23ff7..049fe8191d 100644 --- a/3rdparty/bgfx/scripts/shaderc.lua +++ b/3rdparty/bgfx/scripts/shaderc.lua @@ -199,6 +199,7 @@ project "glslang" configuration { "mingw* or linux or osx" } buildoptions { "-Wno-ignored-qualifiers", + "-Wno-implicit-fallthrough", "-Wno-missing-field-initializers", "-Wno-reorder", "-Wno-return-type", diff --git a/3rdparty/bgfx/src/bgfx.cpp b/3rdparty/bgfx/src/bgfx.cpp index 9373a8097d..c3df9abe2c 100644 --- a/3rdparty/bgfx/src/bgfx.cpp +++ b/3rdparty/bgfx/src/bgfx.cpp @@ -2097,7 +2097,7 @@ namespace bgfx m_submit->finish(); - bx::xchg(m_render, m_submit); + bx::swap(m_render, m_submit); bx::memCopy(m_render->m_occlusion, m_submit->m_occlusion, sizeof(m_submit->m_occlusion) ); @@ -3104,6 +3104,15 @@ namespace bgfx limits.transientIbSize = BGFX_CONFIG_TRANSIENT_INDEX_BUFFER_SIZE; } + void Attachment::init(TextureHandle _handle, Access::Enum _access, uint16_t _layer, uint16_t _mip, uint8_t _resolve) + { + access = _access; + handle = _handle; + mip = _mip; + layer = _layer; + resolve = _resolve; + } + bool init(const Init& _init) { if (NULL != s_ctx) @@ -4288,10 +4297,7 @@ namespace bgfx for (uint8_t ii = 0; ii < _num; ++ii) { Attachment& at = attachment[ii]; - at.handle = _handles[ii]; - at.mip = 0; - at.layer = 0; - at.resolve = BGFX_RESOLVE_AUTO_GEN_MIPS; + at.init(_handles[ii], Access::Write, 0, 0, BGFX_RESOLVE_AUTO_GEN_MIPS); } return createFrameBuffer(_num, attachment, _destroyTextures); } diff --git a/3rdparty/bgfx/src/bgfx_p.h b/3rdparty/bgfx/src/bgfx_p.h index d3bad0c2cf..5b51c0b719 100644 --- a/3rdparty/bgfx/src/bgfx_p.h +++ b/3rdparty/bgfx/src/bgfx_p.h @@ -1479,24 +1479,12 @@ namespace bgfx Count }; + uint32_t m_samplerFlags; uint16_t m_idx; uint8_t m_type; - - union - { - struct - { - uint32_t m_textureFlags; - } m_draw; - - struct - { - uint8_t m_format; - uint8_t m_access; - uint8_t m_mip; - } m_compute; - - } m_un; + uint8_t m_format; + uint8_t m_access; + uint8_t m_mip; }; struct Stream @@ -1522,7 +1510,7 @@ namespace bgfx Binding& bind = m_bind[ii]; bind.m_idx = kInvalidHandle; bind.m_type = 0; - bind.m_un.m_draw.m_textureFlags = 0; + bind.m_samplerFlags = 0; } }; @@ -2326,7 +2314,7 @@ namespace bgfx Binding& bind = m_bind.m_bind[_stage]; bind.m_idx = _handle.idx; bind.m_type = uint8_t(Binding::Texture); - bind.m_un.m_draw.m_textureFlags = (_flags&BGFX_SAMPLER_INTERNAL_DEFAULT) + bind.m_samplerFlags = (_flags&BGFX_SAMPLER_INTERNAL_DEFAULT) ? BGFX_SAMPLER_INTERNAL_DEFAULT : _flags ; @@ -2343,9 +2331,9 @@ namespace bgfx Binding& bind = m_bind.m_bind[_stage]; bind.m_idx = _handle.idx; bind.m_type = uint8_t(Binding::IndexBuffer); - bind.m_un.m_compute.m_format = 0; - bind.m_un.m_compute.m_access = uint8_t(_access); - bind.m_un.m_compute.m_mip = 0; + bind.m_format = 0; + bind.m_access = uint8_t(_access); + bind.m_mip = 0; } void setBuffer(uint8_t _stage, VertexBufferHandle _handle, Access::Enum _access) @@ -2353,9 +2341,9 @@ namespace bgfx Binding& bind = m_bind.m_bind[_stage]; bind.m_idx = _handle.idx; bind.m_type = uint8_t(Binding::VertexBuffer); - bind.m_un.m_compute.m_format = 0; - bind.m_un.m_compute.m_access = uint8_t(_access); - bind.m_un.m_compute.m_mip = 0; + bind.m_format = 0; + bind.m_access = uint8_t(_access); + bind.m_mip = 0; } void setImage(uint8_t _stage, TextureHandle _handle, uint8_t _mip, Access::Enum _access, TextureFormat::Enum _format) @@ -2363,9 +2351,9 @@ namespace bgfx Binding& bind = m_bind.m_bind[_stage]; bind.m_idx = _handle.idx; bind.m_type = uint8_t(Binding::Image); - bind.m_un.m_compute.m_format = uint8_t(_format); - bind.m_un.m_compute.m_access = uint8_t(_access); - bind.m_un.m_compute.m_mip = _mip; + bind.m_format = uint8_t(_format); + bind.m_access = uint8_t(_access); + bind.m_mip = _mip; } void discard() diff --git a/3rdparty/bgfx/src/renderer_d3d11.cpp b/3rdparty/bgfx/src/renderer_d3d11.cpp index 11ba7c38d0..42374f4907 100644 --- a/3rdparty/bgfx/src/renderer_d3d11.cpp +++ b/3rdparty/bgfx/src/renderer_d3d11.cpp @@ -4514,9 +4514,7 @@ namespace bgfx { namespace d3d11 : uint32_t(m_flags) ; uint32_t index = (flags & BGFX_SAMPLER_BORDER_COLOR_MASK) >> BGFX_SAMPLER_BORDER_COLOR_SHIFT; - ts.m_sampler[_stage] = s_renderD3D11->getSamplerState(flags - , _palette[index]) - ; + ts.m_sampler[_stage] = s_renderD3D11->getSamplerState(flags, _palette[index]); } void TextureD3D11::resolve(uint8_t _resolve) const @@ -4675,10 +4673,11 @@ namespace bgfx { namespace d3d11 m_num = 0; for (uint32_t ii = 0; ii < m_numTh; ++ii) { - TextureHandle handle = m_attachment[ii].handle; - if (isValid(handle) ) + const Attachment& at = m_attachment[ii]; + + if (isValid(at.handle) ) { - const TextureD3D11& texture = s_renderD3D11->m_textures[handle.idx]; + const TextureD3D11& texture = s_renderD3D11->m_textures[at.handle.idx]; if (0 == m_width) { @@ -4724,7 +4723,7 @@ namespace bgfx { namespace d3d11 : D3D11_DSV_DIMENSION_TEXTURE2D ; dsvDesc.Flags = 0; - dsvDesc.Texture2D.MipSlice = m_attachment[ii].mip; + dsvDesc.Texture2D.MipSlice = at.mip; DX_CHECK(s_renderD3D11->m_device->CreateDepthStencilView( NULL == texture.m_rt ? texture.m_ptr : texture.m_rt , &dsvDesc @@ -4741,14 +4740,14 @@ namespace bgfx { namespace d3d11 { dsvDesc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY; dsvDesc.Texture2DMSArray.ArraySize = 1; - dsvDesc.Texture2DMSArray.FirstArraySlice = m_attachment[ii].layer; + dsvDesc.Texture2DMSArray.FirstArraySlice = at.layer; } else { dsvDesc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2DARRAY; dsvDesc.Texture2DArray.ArraySize = 1; - dsvDesc.Texture2DArray.FirstArraySlice = m_attachment[ii].layer; - dsvDesc.Texture2DArray.MipSlice = m_attachment[ii].mip; + dsvDesc.Texture2DArray.FirstArraySlice = at.layer; + dsvDesc.Texture2DArray.MipSlice = at.mip; } dsvDesc.Flags = 0; DX_CHECK(s_renderD3D11->m_device->CreateDepthStencilView(texture.m_ptr, &dsvDesc, &m_dsv) ); @@ -4756,7 +4755,7 @@ namespace bgfx { namespace d3d11 break; } } - else + else if (Access::Write == at.access) { D3D11_RENDER_TARGET_VIEW_DESC desc; desc.Format = texture.getSrvFormat(); @@ -4769,7 +4768,7 @@ namespace bgfx { namespace d3d11 if (1 < texture.m_depth) { desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY; - desc.Texture2DMSArray.FirstArraySlice = m_attachment[ii].layer; + desc.Texture2DMSArray.FirstArraySlice = at.layer; desc.Texture2DMSArray.ArraySize = 1; } else @@ -4782,14 +4781,14 @@ namespace bgfx { namespace d3d11 if (1 < texture.m_depth) { desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DARRAY; - desc.Texture2DArray.FirstArraySlice = m_attachment[ii].layer; + desc.Texture2DArray.FirstArraySlice = at.layer; desc.Texture2DArray.ArraySize = 1; - desc.Texture2DArray.MipSlice = m_attachment[ii].mip; + desc.Texture2DArray.MipSlice = at.mip; } else { desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D; - desc.Texture2D.MipSlice = m_attachment[ii].mip; + desc.Texture2D.MipSlice = at.mip; } } @@ -4805,23 +4804,23 @@ namespace bgfx { namespace d3d11 { desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY; desc.Texture2DMSArray.ArraySize = 1; - desc.Texture2DMSArray.FirstArraySlice = m_attachment[ii].layer; + desc.Texture2DMSArray.FirstArraySlice = at.layer; } else { desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DARRAY; desc.Texture2DArray.ArraySize = 1; - desc.Texture2DArray.FirstArraySlice = m_attachment[ii].layer; - desc.Texture2DArray.MipSlice = m_attachment[ii].mip; + desc.Texture2DArray.FirstArraySlice = at.layer; + desc.Texture2DArray.MipSlice = at.mip; } DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView(texture.m_ptr, &desc, &m_rtv[m_num]) ); break; case TextureD3D11::Texture3D: desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE3D; - desc.Texture3D.MipSlice = m_attachment[ii].mip; + desc.Texture3D.MipSlice = at.mip; desc.Texture3D.WSize = 1; - desc.Texture3D.FirstWSlice = m_attachment[ii].layer; + desc.Texture3D.FirstWSlice = at.layer; DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView(texture.m_ptr, &desc, &m_rtv[m_num]) ); break; } @@ -4829,6 +4828,10 @@ namespace bgfx { namespace d3d11 DX_CHECK(s_renderD3D11->m_device->CreateShaderResourceView(texture.m_ptr, NULL, &m_srv[m_num]) ); m_num++; } + else + { + BX_CHECK(false, ""); + } } } } @@ -4841,6 +4844,7 @@ namespace bgfx { namespace d3d11 for (uint32_t ii = 0; ii < m_numTh; ++ii) { const Attachment& at = m_attachment[ii]; + if (isValid(at.handle) ) { const TextureD3D11& texture = s_renderD3D11->m_textures[at.handle.idx]; @@ -5487,35 +5491,39 @@ namespace bgfx { namespace d3d11 } BX_UNUSED(programChanged); ID3D11UnorderedAccessView* uav[BGFX_MAX_COMPUTE_BINDINGS] = {}; - ID3D11ShaderResourceView* srv[BGFX_MAX_COMPUTE_BINDINGS] = {}; - ID3D11SamplerState* sampler[BGFX_MAX_COMPUTE_BINDINGS] = {}; - for (uint32_t ii = 0; ii < maxComputeBindings; ++ii) + for (uint8_t stage = 0; stage < maxComputeBindings; ++stage) { - const Binding& bind = renderBind.m_bind[ii]; + const Binding& bind = renderBind.m_bind[stage]; if (kInvalidHandle != bind.m_idx) { switch (bind.m_type) { case Binding::Image: - case Binding::Texture: { TextureD3D11& texture = m_textures[bind.m_idx]; - if (Access::Read != bind.m_un.m_compute.m_access) + if (Access::Read != bind.m_access) { - uav[ii] = 0 == bind.m_un.m_compute.m_mip + uav[stage] = 0 == bind.m_mip ? texture.m_uav - : s_renderD3D11->getCachedUav(texture.getHandle(), bind.m_un.m_compute.m_mip) + : s_renderD3D11->getCachedUav(texture.getHandle(), bind.m_mip) ; } else { - srv[ii] = s_renderD3D11->getCachedSrv(texture.getHandle(), bind.m_un.m_compute.m_mip, true); - sampler[ii] = s_renderD3D11->getSamplerState(uint32_t(texture.m_flags), NULL); + m_textureStage.m_srv[stage] = s_renderD3D11->getCachedSrv(texture.getHandle(), bind.m_mip, true); + m_textureStage.m_sampler[stage] = s_renderD3D11->getSamplerState(uint32_t(texture.m_flags), NULL); } } break; + case Binding::Texture: + { + TextureD3D11& texture = m_textures[bind.m_idx]; + texture.commit(stage, bind.m_samplerFlags, _render->m_colorPalette); + } + break; + case Binding::IndexBuffer: case Binding::VertexBuffer: { @@ -5523,13 +5531,13 @@ namespace bgfx { namespace d3d11 ? m_indexBuffers[bind.m_idx] : m_vertexBuffers[bind.m_idx] ; - if (Access::Read != bind.m_un.m_compute.m_access) + if (Access::Read != bind.m_access) { - uav[ii] = buffer.m_uav; + uav[stage] = buffer.m_uav; } else { - srv[ii] = buffer.m_srv; + m_textureStage.m_srv[stage] = buffer.m_srv; } } break; @@ -5544,8 +5552,8 @@ namespace bgfx { namespace d3d11 } deviceCtx->CSSetUnorderedAccessViews(0, maxComputeBindings, uav, NULL); - deviceCtx->CSSetShaderResources(0, maxTextureSamplers, srv); - deviceCtx->CSSetSamplers(0, maxTextureSamplers, sampler); + deviceCtx->CSSetShaderResources(0, maxTextureSamplers, m_textureStage.m_srv); + deviceCtx->CSSetSamplers(0, maxTextureSamplers, m_textureStage.m_sampler); if (isValid(compute.m_indirectBuffer) ) { @@ -5809,9 +5817,9 @@ namespace bgfx { namespace d3d11 { const Binding& bind = renderBind.m_bind[stage]; Binding& current = currentBind.m_bind[stage]; - if (current.m_idx != bind.m_idx - || current.m_type != bind.m_type - || current.m_un.m_draw.m_textureFlags != bind.m_un.m_draw.m_textureFlags + if (current.m_idx != bind.m_idx + || current.m_type != bind.m_type + || current.m_samplerFlags != bind.m_samplerFlags || programChanged) { if (kInvalidHandle != bind.m_idx) @@ -5821,7 +5829,7 @@ namespace bgfx { namespace d3d11 case Binding::Texture: { TextureD3D11& texture = m_textures[bind.m_idx]; - texture.commit(stage, bind.m_un.m_draw.m_textureFlags, _render->m_colorPalette); + texture.commit(stage, bind.m_samplerFlags, _render->m_colorPalette); } break; diff --git a/3rdparty/bgfx/src/renderer_d3d12.cpp b/3rdparty/bgfx/src/renderer_d3d12.cpp index 235e443704..d577e63b60 100644 --- a/3rdparty/bgfx/src/renderer_d3d12.cpp +++ b/3rdparty/bgfx/src/renderer_d3d12.cpp @@ -374,23 +374,41 @@ namespace bgfx { namespace d3d12 BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG("-Wunused-const-variable"); BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG("-Wunneeded-internal-declaration"); - static const GUID IID_ID3D12CommandAllocator = { 0x6102dee4, 0xaf59, 0x4b09, { 0xb9, 0x99, 0xb4, 0x4d, 0x73, 0xf0, 0x9b, 0x24 } }; - static const GUID IID_ID3D12CommandQueue = { 0x0ec870a6, 0x5d7e, 0x4c22, { 0x8c, 0xfc, 0x5b, 0xaa, 0xe0, 0x76, 0x16, 0xed } }; - static const GUID IID_ID3D12CommandSignature = { 0xc36a797c, 0xec80, 0x4f0a, { 0x89, 0x85, 0xa7, 0xb2, 0x47, 0x50, 0x82, 0xd1 } }; - static const GUID IID_ID3D12Debug = { 0x344488b7, 0x6846, 0x474b, { 0xb9, 0x89, 0xf0, 0x27, 0x44, 0x82, 0x45, 0xe0 } }; - static const GUID IID_ID3D12Debug1 = { 0xaffaa4ca, 0x63fe, 0x4d8e, { 0xb8, 0xad, 0x15, 0x90, 0x00, 0xaf, 0x43, 0x04 } }; - static const GUID IID_ID3D12DescriptorHeap = { 0x8efb471d, 0x616c, 0x4f49, { 0x90, 0xf7, 0x12, 0x7b, 0xb7, 0x63, 0xfa, 0x51 } }; - static const GUID IID_ID3D12Device = { 0x189819f1, 0x1db6, 0x4b57, { 0xbe, 0x54, 0x18, 0x21, 0x33, 0x9b, 0x85, 0xf7 } }; - static const GUID IID_ID3D12Fence = { 0x0a753dcf, 0xc4d8, 0x4b91, { 0xad, 0xf6, 0xbe, 0x5a, 0x60, 0xd9, 0x5a, 0x76 } }; - static const GUID IID_ID3D12GraphicsCommandList = { 0x5b160d0f, 0xac1b, 0x4185, { 0x8b, 0xa8, 0xb3, 0xae, 0x42, 0xa5, 0xa4, 0x55 } }; - static const GUID IID_ID3D12InfoQueue = { 0x0742a90b, 0xc387, 0x483f, { 0xb9, 0x46, 0x30, 0xa7, 0xe4, 0xe6, 0x14, 0x58 } }; - static const GUID IID_ID3D12PipelineState = { 0x765a30f3, 0xf624, 0x4c6f, { 0xa8, 0x28, 0xac, 0xe9, 0x48, 0x62, 0x24, 0x45 } }; - static const GUID IID_ID3D12Resource = { 0x696442be, 0xa72e, 0x4059, { 0xbc, 0x79, 0x5b, 0x5c, 0x98, 0x04, 0x0f, 0xad } }; - static const GUID IID_ID3D12RootSignature = { 0xc54a6b66, 0x72df, 0x4ee8, { 0x8b, 0xe5, 0xa9, 0x46, 0xa1, 0x42, 0x92, 0x14 } }; - static const GUID IID_ID3D12QueryHeap = { 0x0d9658ae, 0xed45, 0x469e, { 0xa6, 0x1d, 0x97, 0x0e, 0xc5, 0x83, 0xca, 0xb4 } }; + static const GUID IID_ID3D12CommandAllocator = { 0x6102dee4, 0xaf59, 0x4b09, { 0xb9, 0x99, 0xb4, 0x4d, 0x73, 0xf0, 0x9b, 0x24 } }; + static const GUID IID_ID3D12CommandQueue = { 0x0ec870a6, 0x5d7e, 0x4c22, { 0x8c, 0xfc, 0x5b, 0xaa, 0xe0, 0x76, 0x16, 0xed } }; + static const GUID IID_ID3D12CommandSignature = { 0xc36a797c, 0xec80, 0x4f0a, { 0x89, 0x85, 0xa7, 0xb2, 0x47, 0x50, 0x82, 0xd1 } }; + static const GUID IID_ID3D12Debug = { 0x344488b7, 0x6846, 0x474b, { 0xb9, 0x89, 0xf0, 0x27, 0x44, 0x82, 0x45, 0xe0 } }; + static const GUID IID_ID3D12Debug1 = { 0xaffaa4ca, 0x63fe, 0x4d8e, { 0xb8, 0xad, 0x15, 0x90, 0x00, 0xaf, 0x43, 0x04 } }; + static const GUID IID_ID3D12DescriptorHeap = { 0x8efb471d, 0x616c, 0x4f49, { 0x90, 0xf7, 0x12, 0x7b, 0xb7, 0x63, 0xfa, 0x51 } }; + static const GUID IID_ID3D12Device = { 0x189819f1, 0x1db6, 0x4b57, { 0xbe, 0x54, 0x18, 0x21, 0x33, 0x9b, 0x85, 0xf7 } }; + static const GUID IID_ID3D12Device1 = { 0x77acce80, 0x638e, 0x4e65, { 0x88, 0x95, 0xc1, 0xf2, 0x33, 0x86, 0x86, 0x3e } }; + static const GUID IID_ID3D12Device2 = { 0x30baa41e, 0xb15b, 0x475c, { 0xa0, 0xbb, 0x1a, 0xf5, 0xc5, 0xb6, 0x43, 0x28 } }; + static const GUID IID_ID3D12Device3 = { 0x81dadc15, 0x2bad, 0x4392, { 0x93, 0xc5, 0x10, 0x13, 0x45, 0xc4, 0xaa, 0x98 } }; + static const GUID IID_ID3D12Device4 = { 0xe865df17, 0xa9ee, 0x46f9, { 0xa4, 0x63, 0x30, 0x98, 0x31, 0x5a, 0xa2, 0xe5 } }; + static const GUID IID_ID3D12Device5 = { 0x8b4f173b, 0x2fea, 0x4b80, { 0x8f, 0x58, 0x43, 0x07, 0x19, 0x1a, 0xb9, 0x5d } }; + static const GUID IID_ID3D12Fence = { 0x0a753dcf, 0xc4d8, 0x4b91, { 0xad, 0xf6, 0xbe, 0x5a, 0x60, 0xd9, 0x5a, 0x76 } }; + static const GUID IID_ID3D12GraphicsCommandList = { 0x5b160d0f, 0xac1b, 0x4185, { 0x8b, 0xa8, 0xb3, 0xae, 0x42, 0xa5, 0xa4, 0x55 } }; + static const GUID IID_ID3D12GraphicsCommandList1 = { 0x553103fb, 0x1fe7, 0x4557, { 0xbb, 0x38, 0x94, 0x6d, 0x7d, 0x0e, 0x7c, 0xa7 } }; + static const GUID IID_ID3D12GraphicsCommandList2 = { 0x38C3E585, 0xFF17, 0x412C, { 0x91, 0x50, 0x4F, 0xC6, 0xF9, 0xD7, 0x2A, 0x28 } }; + static const GUID IID_ID3D12GraphicsCommandList3 = { 0x6FDA83A7, 0xB84C, 0x4E38, { 0x9A, 0xC8, 0xC7, 0xBD, 0x22, 0x01, 0x6B, 0x3D } }; + static const GUID IID_ID3D12GraphicsCommandList4 = { 0x8754318e, 0xd3a9, 0x4541, { 0x98, 0xcf, 0x64, 0x5b, 0x50, 0xdc, 0x48, 0x74 } }; + static const GUID IID_ID3D12InfoQueue = { 0x0742a90b, 0xc387, 0x483f, { 0xb9, 0x46, 0x30, 0xa7, 0xe4, 0xe6, 0x14, 0x58 } }; + static const GUID IID_ID3D12PipelineState = { 0x765a30f3, 0xf624, 0x4c6f, { 0xa8, 0x28, 0xac, 0xe9, 0x48, 0x62, 0x24, 0x45 } }; + static const GUID IID_ID3D12Resource = { 0x696442be, 0xa72e, 0x4059, { 0xbc, 0x79, 0x5b, 0x5c, 0x98, 0x04, 0x0f, 0xad } }; + static const GUID IID_ID3D12RootSignature = { 0xc54a6b66, 0x72df, 0x4ee8, { 0x8b, 0xe5, 0xa9, 0x46, 0xa1, 0x42, 0x92, 0x14 } }; + static const GUID IID_ID3D12QueryHeap = { 0x0d9658ae, 0xed45, 0x469e, { 0xa6, 0x1d, 0x97, 0x0e, 0xc5, 0x83, 0xca, 0xb4 } }; BX_PRAGMA_DIAGNOSTIC_POP(); + static const GUID s_d3dDeviceIIDs[] = + { + IID_ID3D12Device5, + IID_ID3D12Device4, + IID_ID3D12Device3, + IID_ID3D12Device2, + IID_ID3D12Device1, + }; + struct HeapProperty { enum Enum @@ -833,6 +851,21 @@ namespace bgfx { namespace d3d12 m_dxgi.update(m_device); + { + m_deviceInterfaceVersion = 0; + for (uint32_t ii = 0; ii < BX_COUNTOF(s_d3dDeviceIIDs); ++ii) + { + ID3D12Device* device; + hr = m_device->QueryInterface(s_d3dDeviceIIDs[ii], (void**)&device); + if (SUCCEEDED(hr) ) + { + device->Release(); // BK - ignore ref count. + m_deviceInterfaceVersion = BX_COUNTOF(s_d3dDeviceIIDs) - ii; + break; + } + } + } + #if BX_PLATFORM_XBOXONE m_device->SetDebugErrorFilterX(0x73EC9EAF, D3D12XBOX_DEBUG_FILTER_FLAG_DISABLE_BREAKS); m_device->SetDebugErrorFilterX(0x8EC9B15C, D3D12XBOX_DEBUG_FILTER_FLAG_DISABLE_OUTPUT); @@ -3207,6 +3240,8 @@ namespace bgfx { namespace d3d12 TimerQueryD3D12 m_gpuTimer; OcclusionQueryD3D12 m_occlusionQuery; + uint32_t m_deviceInterfaceVersion; + ID3D12DescriptorHeap* m_rtvDescriptorHeap; ID3D12DescriptorHeap* m_dsvDescriptorHeap; D3D12_CPU_DESCRIPTOR_HANDLE m_rtvHandle; @@ -4319,7 +4354,7 @@ namespace bgfx { namespace d3d12 , _state ); - bx::xchg(m_state, _state); + bx::swap(m_state, _state); } return _state; @@ -4920,7 +4955,7 @@ namespace bgfx { namespace d3d12 , _state ); - bx::xchg(m_state, _state); + bx::swap(m_state, _state); } return _state; @@ -5035,10 +5070,11 @@ namespace bgfx { namespace d3d12 m_num = 0; for (uint32_t ii = 0; ii < m_numTh; ++ii) { - TextureHandle handle = m_attachment[ii].handle; - if (isValid(handle) ) + const Attachment& at = m_attachment[ii]; + + if (isValid(at.handle) ) { - const TextureD3D12& texture = s_renderD3D12->m_textures[handle.idx]; + const TextureD3D12& texture = s_renderD3D12->m_textures[at.handle.idx]; if (0 == m_width) { @@ -5050,7 +5086,7 @@ namespace bgfx { namespace d3d12 if (bimg::isDepth(bimg::TextureFormat::Enum(texture.m_textureFormat) ) ) { BX_CHECK(!isValid(m_depth), ""); - m_depth = handle; + m_depth = at.handle; D3D12_CPU_DESCRIPTOR_HANDLE dsvDescriptor = getCPUHandleHeapStart(s_renderD3D12->m_dsvDescriptorHeap); uint32_t dsvDescriptorSize = device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_DSV); dsvDescriptor.ptr += (1 + fbhIdx) * dsvDescriptorSize; @@ -5081,9 +5117,9 @@ namespace bgfx { namespace d3d12 , NULL ); } - else + else if (Access::Write == at.access) { - m_texture[m_num] = handle; + m_texture[m_num] = at.handle; D3D12_CPU_DESCRIPTOR_HANDLE rtv = { rtvDescriptor.ptr + m_num * rtvDescriptorSize }; D3D12_RENDER_TARGET_VIEW_DESC desc; @@ -5100,7 +5136,7 @@ namespace bgfx { namespace d3d12 // else { desc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2D; - desc.Texture2D.MipSlice = m_attachment[ii].mip; + desc.Texture2D.MipSlice = at.mip; desc.Texture2D.PlaneSlice = 0; } break; @@ -5110,23 +5146,23 @@ namespace bgfx { namespace d3d12 // { // desc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY; // desc.Texture2DMSArray.ArraySize = 1; -// desc.Texture2DMSArray.FirstArraySlice = m_attachment[ii].layer; +// desc.Texture2DMSArray.FirstArraySlice = at.layer; // } // else { desc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2DARRAY; desc.Texture2DArray.ArraySize = 1; - desc.Texture2DArray.FirstArraySlice = m_attachment[ii].layer; - desc.Texture2DArray.MipSlice = m_attachment[ii].mip; + desc.Texture2DArray.FirstArraySlice = at.layer; + desc.Texture2DArray.MipSlice = at.mip; desc.Texture2DArray.PlaneSlice = 0; } break; case TextureD3D12::Texture3D: desc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE3D; - desc.Texture3D.MipSlice = m_attachment[ii].mip; + desc.Texture3D.MipSlice = at.mip; desc.Texture3D.WSize = 1; - desc.Texture3D.FirstWSlice = m_attachment[ii].layer; + desc.Texture3D.FirstWSlice = at.layer; break; } @@ -5145,6 +5181,10 @@ namespace bgfx { namespace d3d12 m_num++; } + else + { + BX_CHECK(false, ""); + } } } } @@ -5157,6 +5197,7 @@ namespace bgfx { namespace d3d12 for (uint32_t ii = 0; ii < m_numTh; ++ii) { const Attachment& at = m_attachment[ii]; + if (isValid(at.handle) ) { const TextureD3D12& texture = s_renderD3D12->m_textures[at.handle.idx]; @@ -5252,7 +5293,7 @@ namespace bgfx { namespace d3d12 DX_RELEASE(colorBuffer, 0); - bx::xchg(m_state, _state); + bx::swap(m_state, _state); } return _state; @@ -5842,32 +5883,44 @@ namespace bgfx { namespace d3d12 D3D12_GPU_DESCRIPTOR_HANDLE srvHandle[BGFX_MAX_COMPUTE_BINDINGS] = {}; uint32_t samplerFlags[BGFX_MAX_COMPUTE_BINDINGS] = {}; - for (uint32_t ii = 0; ii < maxComputeBindings; ++ii) + for (uint8_t stage = 0; stage < maxComputeBindings; ++stage) { - const Binding& bind = renderBind.m_bind[ii]; + const Binding& bind = renderBind.m_bind[stage]; if (kInvalidHandle != bind.m_idx) { switch (bind.m_type) { case Binding::Image: - case Binding::Texture: { TextureD3D12& texture = m_textures[bind.m_idx]; - if (Access::Read != bind.m_un.m_compute.m_access) + if (Access::Read != bind.m_access) { texture.setState(m_commandList, D3D12_RESOURCE_STATE_UNORDERED_ACCESS); - scratchBuffer.allocUav(srvHandle[ii], texture, bind.m_un.m_compute.m_mip); + scratchBuffer.allocUav(srvHandle[stage], texture, bind.m_mip); } else { texture.setState(m_commandList, D3D12_RESOURCE_STATE_GENERIC_READ); - scratchBuffer.allocSrv(srvHandle[ii], texture, bind.m_un.m_compute.m_mip); - samplerFlags[ii] = uint32_t(texture.m_flags); + scratchBuffer.allocSrv(srvHandle[stage], texture, bind.m_mip); + samplerFlags[stage] = uint32_t(texture.m_flags); } } break; + case Binding::Texture: + { + TextureD3D12& texture = m_textures[bind.m_idx]; + texture.setState(m_commandList, D3D12_RESOURCE_STATE_GENERIC_READ); + scratchBuffer.allocSrv(srvHandle[stage], texture); + samplerFlags[stage] = (0 == (BGFX_SAMPLER_INTERNAL_DEFAULT & bind.m_samplerFlags) + ? bind.m_samplerFlags + : texture.m_flags + ) & (BGFX_SAMPLER_BITS_MASK | BGFX_SAMPLER_BORDER_COLOR_MASK | BGFX_SAMPLER_COMPARE_MASK) + ; + } + break; + case Binding::IndexBuffer: case Binding::VertexBuffer: { @@ -5876,15 +5929,15 @@ namespace bgfx { namespace d3d12 : m_vertexBuffers[bind.m_idx] ; - if (Access::Read != bind.m_un.m_compute.m_access) + if (Access::Read != bind.m_access) { buffer.setState(m_commandList, D3D12_RESOURCE_STATE_UNORDERED_ACCESS); - scratchBuffer.allocUav(srvHandle[ii], buffer); + scratchBuffer.allocUav(srvHandle[stage], buffer); } else { buffer.setState(m_commandList, D3D12_RESOURCE_STATE_GENERIC_READ); - scratchBuffer.allocSrv(srvHandle[ii], buffer); + scratchBuffer.allocSrv(srvHandle[stage], buffer); } } break; @@ -5892,8 +5945,8 @@ namespace bgfx { namespace d3d12 } else { - samplerFlags[ii] = 0; - scratchBuffer.allocEmpty(srvHandle[ii]); + samplerFlags[stage] = 0; + scratchBuffer.allocEmpty(srvHandle[stage]); } } @@ -6164,8 +6217,8 @@ namespace bgfx { namespace d3d12 TextureD3D12& texture = m_textures[bind.m_idx]; texture.setState(m_commandList, D3D12_RESOURCE_STATE_GENERIC_READ); scratchBuffer.allocSrv(srvHandle[stage], texture); - samplerFlags[stage] = (0 == (BGFX_SAMPLER_INTERNAL_DEFAULT & bind.m_un.m_draw.m_textureFlags) - ? bind.m_un.m_draw.m_textureFlags + samplerFlags[stage] = (0 == (BGFX_SAMPLER_INTERNAL_DEFAULT & bind.m_samplerFlags) + ? bind.m_samplerFlags : texture.m_flags ) & (BGFX_SAMPLER_BITS_MASK | BGFX_SAMPLER_BORDER_COLOR_MASK | BGFX_SAMPLER_COMPARE_MASK) ; @@ -6184,7 +6237,7 @@ namespace bgfx { namespace d3d12 : m_vertexBuffers[bind.m_idx] ; - if (Access::Read != bind.m_un.m_compute.m_access) + if (Access::Read != bind.m_access) { buffer.setState(m_commandList, D3D12_RESOURCE_STATE_UNORDERED_ACCESS); scratchBuffer.allocUav(srvHandle[stage], buffer); @@ -6476,8 +6529,9 @@ namespace bgfx { namespace d3d12 tvm.clear(); uint16_t pos = 0; tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x8c : 0x8f - , " %s (FL %d.%d) / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " " + , " %s.%d (FL %d.%d) / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " " , getRendererName() + , m_deviceInterfaceVersion , (m_featureLevel >> 12) & 0xf , (m_featureLevel >> 8) & 0xf ); diff --git a/3rdparty/bgfx/src/renderer_d3d9.cpp b/3rdparty/bgfx/src/renderer_d3d9.cpp index 0106d90cdf..21dbef68ff 100644 --- a/3rdparty/bgfx/src/renderer_d3d9.cpp +++ b/3rdparty/bgfx/src/renderer_d3d9.cpp @@ -3197,10 +3197,11 @@ namespace bgfx { namespace d3d9 for (uint32_t ii = 0; ii < _num; ++ii) { - TextureHandle handle = m_attachment[ii].handle; - if (isValid(handle) ) + const Attachment& at = m_attachment[ii]; + + if (isValid(at.handle) ) { - const TextureD3D9& texture = s_renderD3D9->m_textures[handle.idx]; + const TextureD3D9& texture = s_renderD3D9->m_textures[at.handle.idx]; if (NULL != texture.m_surface) { @@ -3209,7 +3210,7 @@ namespace bgfx { namespace d3d9 } else { - m_surface[ii] = texture.getSurface(uint8_t(m_attachment[ii].layer), uint8_t(m_attachment[ii].mip) ); + m_surface[ii] = texture.getSurface(uint8_t(at.layer), uint8_t(at.mip) ); } if (0 == m_num) @@ -3386,19 +3387,24 @@ namespace bgfx { namespace d3d9 { for (uint32_t ii = 0, num = m_numTh; ii < num; ++ii) { - TextureHandle th = m_attachment[ii].handle; + const Attachment& at = m_attachment[ii]; - if (isValid(th) ) + if (isValid(at.handle) ) { - TextureD3D9& texture = s_renderD3D9->m_textures[th.idx]; + TextureD3D9& texture = s_renderD3D9->m_textures[at.handle.idx]; + if (NULL != texture.m_surface) { m_surface[ii] = texture.m_surface; m_surface[ii]->AddRef(); } + else if (Access::Write == at.access) + { + m_surface[ii] = texture.getSurface(uint8_t(at.layer), uint8_t(at.mip) ); + } else { - m_surface[ii] = texture.getSurface(uint8_t(m_attachment[ii].layer), uint8_t(m_attachment[ii].mip) ); + BX_CHECK(false, ""); } } } @@ -4162,13 +4168,13 @@ namespace bgfx { namespace d3d9 const Binding& bind = renderBind.m_bind[stage]; Binding& current = currentBind.m_bind[stage]; - if (current.m_idx != bind.m_idx - || current.m_un.m_draw.m_textureFlags != bind.m_un.m_draw.m_textureFlags + if (current.m_idx != bind.m_idx + || current.m_samplerFlags != bind.m_samplerFlags || programChanged) { if (kInvalidHandle != bind.m_idx) { - m_textures[bind.m_idx].commit(stage, bind.m_un.m_draw.m_textureFlags, _render->m_colorPalette); + m_textures[bind.m_idx].commit(stage, bind.m_samplerFlags, _render->m_colorPalette); } else { diff --git a/3rdparty/bgfx/src/renderer_gl.cpp b/3rdparty/bgfx/src/renderer_gl.cpp index fa42985f12..1bfa5d490e 100644 --- a/3rdparty/bgfx/src/renderer_gl.cpp +++ b/3rdparty/bgfx/src/renderer_gl.cpp @@ -2276,7 +2276,8 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); : 0 ; - if (NULL == glPolygonMode) + if (BX_ENABLED(BX_PLATFORM_EMSCRIPTEN) + || NULL == glPolygonMode) { glPolygonMode = stubPolygonMode; } @@ -2337,12 +2338,12 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); ); } - // if (s_extension[Extension::ARB_clip_control].m_supported) - // { - // GL_CHECK(glClipControl(GL_LOWER_LEFT, GL_ZERO_TO_ONE) ); - // g_caps.originBottomLeft = true; - // } - // else +// if (s_extension[Extension::ARB_clip_control].m_supported) +// { +// GL_CHECK(glClipControl(GL_LOWER_LEFT, GL_ZERO_TO_ONE) ); +// g_caps.originBottomLeft = true; +// } +// else { g_caps.homogeneousDepth = true; g_caps.originBottomLeft = true; @@ -5305,6 +5306,8 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); char* temp = (char*)alloca(tempLen); bx::StaticMemoryBlockWriter writer(temp, tempLen); + bx::Error err; + if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES) && BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES < 30) ) { @@ -5445,7 +5448,7 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); } } - bx::writePrintf(&writer, "precision %s float;\n" + bx::write(&writer, &err, "precision %s float;\n" , m_type == GL_FRAGMENT_SHADER ? "mediump" : "highp" ); @@ -5514,7 +5517,7 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); if (0 != version) { - bx::writePrintf(&writer, "#version %d\n", version); + bx::write(&writer, &err, "#version %d\n", version); } if (usesTextureLod) @@ -5606,7 +5609,7 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); if (0 != fragData) { - bx::writePrintf(&writer, "out vec4 bgfx_FragData[%d];\n", fragData); + bx::write(&writer, &err, "out vec4 bgfx_FragData[%d];\n", fragData); bx::write(&writer, "#define gl_FragData bgfx_FragData\n"); } else @@ -5654,7 +5657,7 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); { if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 30) ) { - bx::writePrintf(&writer + bx::write(&writer, &err , "#version 300 es\n" "precision %s float;\n" , m_type == GL_FRAGMENT_SHADER ? "mediump" : "highp" @@ -5729,7 +5732,7 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); if (0 != fragData) { - bx::writePrintf(&writer, "out vec4 bgfx_FragData[%d];\n", fragData); + bx::write(&writer, &err, "out vec4 bgfx_FragData[%d];\n", fragData); bx::write(&writer, "#define gl_FragData bgfx_FragData\n"); } else @@ -5872,15 +5875,16 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); uint32_t colorIdx = 0; for (uint32_t ii = 0; ii < m_numTh; ++ii) { - TextureHandle handle = m_attachment[ii].handle; - if (isValid(handle) ) + const Attachment& at = m_attachment[ii]; + + if (isValid(at.handle) ) { - const TextureGL& texture = s_renderGL->m_textures[handle.idx]; + const TextureGL& texture = s_renderGL->m_textures[at.handle.idx]; if (0 == colorIdx) { - m_width = bx::uint32_max(texture.m_width >> m_attachment[ii].mip, 1); - m_height = bx::uint32_max(texture.m_height >> m_attachment[ii].mip, 1); + m_width = bx::uint32_max(texture.m_width >> at.mip, 1); + m_height = bx::uint32_max(texture.m_height >> at.mip, 1); } GLenum attachment = GL_COLOR_ATTACHMENT0 + colorIdx; @@ -5925,13 +5929,15 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); } else #endif + { GL_CHECK(glFramebufferRenderbuffer(GL_FRAMEBUFFER , attachment , GL_RENDERBUFFER , texture.m_rbo ) ); + } } - else + else if (Access::Write == at.access) { if (1 < texture.m_depth && !texture.isCubeMap()) @@ -5939,14 +5945,14 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); GL_CHECK(glFramebufferTextureLayer(GL_FRAMEBUFFER , attachment , texture.m_id - , m_attachment[ii].mip - , m_attachment[ii].layer - ) ); + , at.mip + , at.layer + ) ); } else { GLenum target = texture.isCubeMap() - ? GL_TEXTURE_CUBE_MAP_POSITIVE_X + m_attachment[ii].layer + ? GL_TEXTURE_CUBE_MAP_POSITIVE_X + at.layer : texture.m_target ; @@ -5954,10 +5960,14 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); , attachment , target , texture.m_id - , m_attachment[ii].mip - ) ); + , at.mip + ) ); } } + else + { + BX_CHECK(false, ""); + } needResolve |= (0 != texture.m_rbo) && (0 != texture.m_id); } @@ -5995,10 +6005,11 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); colorIdx = 0; for (uint32_t ii = 0; ii < m_numTh; ++ii) { - TextureHandle handle = m_attachment[ii].handle; - if (isValid(handle) ) + const Attachment& at = m_attachment[ii]; + + if (isValid(at.handle) ) { - const TextureGL& texture = s_renderGL->m_textures[handle.idx]; + const TextureGL& texture = s_renderGL->m_textures[at.handle.idx]; if (0 != texture.m_id) { @@ -6008,7 +6019,7 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); ++colorIdx; GLenum target = texture.isCubeMap() - ? GL_TEXTURE_CUBE_MAP_POSITIVE_X + m_attachment[ii].layer + ? GL_TEXTURE_CUBE_MAP_POSITIVE_X + at.layer : texture.m_target ; @@ -6016,7 +6027,7 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); , attachment , target , texture.m_id - , m_attachment[ii].mip + , at.mip ) ); } } @@ -6071,10 +6082,11 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); uint32_t colorIdx = 0; for (uint32_t ii = 0; ii < m_numTh; ++ii) { - TextureHandle handle = m_attachment[ii].handle; - if (isValid(handle) ) + const Attachment& at = m_attachment[ii]; + + if (isValid(at.handle) ) { - const TextureGL& texture = s_renderGL->m_textures[handle.idx]; + const TextureGL& texture = s_renderGL->m_textures[at.handle.idx]; bimg::TextureFormat::Enum format = bimg::TextureFormat::Enum(texture.m_textureFormat); if (!bimg::isDepth(format) ) @@ -6107,6 +6119,7 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); for (uint32_t ii = 0; ii < m_numTh; ++ii) { const Attachment& at = m_attachment[ii]; + if (isValid(at.handle) ) { const TextureGL& texture = s_renderGL->m_textures[at.handle.idx]; @@ -6549,13 +6562,13 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); case Binding::Texture: { TextureGL& texture = m_textures[bind.m_idx]; - texture.commit(ii, bind.m_un.m_draw.m_textureFlags, _render->m_colorPalette); + texture.commit(ii, bind.m_samplerFlags, _render->m_colorPalette); } break; case Binding::Image: { - if (Access::Read == bind.m_un.m_compute.m_access) + if (Access::Read == bind.m_access) { TextureGL& texture = m_textures[bind.m_idx]; texture.commit(ii, uint32_t(texture.m_flags), _render->m_colorPalette); @@ -6565,11 +6578,11 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); const TextureGL& texture = m_textures[bind.m_idx]; GL_CHECK(glBindImageTexture(ii , texture.m_id - , bind.m_un.m_compute.m_mip + , bind.m_mip , texture.isCubeMap() ? GL_TRUE : GL_FALSE , 0 - , s_access[bind.m_un.m_compute.m_access] - , s_imageFormat[bind.m_un.m_compute.m_format]) + , s_access[bind.m_access] + , s_imageFormat[bind.m_format]) ); barrier |= GL_SHADER_IMAGE_ACCESS_BARRIER_BIT; } @@ -7058,9 +7071,9 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); { const Binding& bind = renderBind.m_bind[stage]; Binding& current = currentBind.m_bind[stage]; - if (current.m_idx != bind.m_idx - || current.m_type != bind.m_type - || current.m_un.m_draw.m_textureFlags != bind.m_un.m_draw.m_textureFlags + if (current.m_idx != bind.m_idx + || current.m_type != bind.m_type + || current.m_samplerFlags != bind.m_samplerFlags || programChanged) { if (kInvalidHandle != bind.m_idx) @@ -7070,7 +7083,7 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) ); case Binding::Texture: { TextureGL& texture = m_textures[bind.m_idx]; - texture.commit(stage, bind.m_un.m_draw.m_textureFlags, _render->m_colorPalette); + texture.commit(stage, bind.m_samplerFlags, _render->m_colorPalette); } break; diff --git a/3rdparty/bgfx/src/renderer_mtl.mm b/3rdparty/bgfx/src/renderer_mtl.mm index 9afc4d8faf..6532059516 100644 --- a/3rdparty/bgfx/src/renderer_mtl.mm +++ b/3rdparty/bgfx/src/renderer_mtl.mm @@ -3951,8 +3951,8 @@ static void setTimestamp(void* _data) const Binding& bind = renderBind.m_bind[stage]; Binding& current = currentBind.m_bind[stage]; - if (current.m_idx != bind.m_idx - || current.m_un.m_draw.m_textureFlags != bind.m_un.m_draw.m_textureFlags + if (current.m_idx != bind.m_idx + || current.m_samplerFlags != bind.m_samplerFlags || programChanged) { if (kInvalidHandle != bind.m_idx) @@ -3961,7 +3961,7 @@ static void setTimestamp(void* _data) texture.commit(samplerInfo.m_index , !samplerInfo.m_fragment , samplerInfo.m_fragment - , bind.m_un.m_draw.m_textureFlags + , bind.m_samplerFlags ); } } diff --git a/3rdparty/bgfx/src/renderer_vk.cpp b/3rdparty/bgfx/src/renderer_vk.cpp index 0fb4881ccf..b3843e0304 100644 --- a/3rdparty/bgfx/src/renderer_vk.cpp +++ b/3rdparty/bgfx/src/renderer_vk.cpp @@ -3908,15 +3908,15 @@ BX_UNUSED(currentSamplerStateIdx); // { // TextureD3D12& texture = m_textures[bind.m_idx]; // -// if (Access::Read != bind.m_un.m_compute.m_access) +// if (Access::Read != bind.m_access) // { // texture.setState(m_commandList, D3D12_RESOURCE_STATE_UNORDERED_ACCESS); -// scratchBuffer.allocUav(srvHandle[ii], texture, bind.m_un.m_compute.m_mip); +// scratchBuffer.allocUav(srvHandle[ii], texture, bind.m_mip); // } // else // { // texture.setState(m_commandList, D3D12_RESOURCE_STATE_GENERIC_READ); -// scratchBuffer.allocSrv(srvHandle[ii], texture, bind.m_un.m_compute.m_mip); +// scratchBuffer.allocSrv(srvHandle[ii], texture, bind.m_mip); // samplerFlags[ii] = texture.m_flags; // } // } @@ -3930,7 +3930,7 @@ BX_UNUSED(currentSamplerStateIdx); // : m_vertexBuffers[bind.m_idx] // ; // -// if (Access::Read != bind.m_un.m_compute.m_access) +// if (Access::Read != bind.m_access) // { // buffer.setState(m_commandList, D3D12_RESOURCE_STATE_UNORDERED_ACCESS); // scratchBuffer.allocUav(srvHandle[ii], buffer); @@ -4158,8 +4158,8 @@ BX_UNUSED(currentSamplerStateIdx); // TextureD3D12& texture = m_textures[bind.m_idx]; // texture.setState(m_commandList, D3D12_RESOURCE_STATE_GENERIC_READ); // scratchBuffer.allocSrv(srvHandle[stage], texture); -// samplerFlags[stage] = (0 == (BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER & bind.m_un.m_draw.m_textureFlags) -// ? bind.m_un.m_draw.m_textureFlags +// samplerFlags[stage] = (0 == (BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER & bind.m_textureFlags) +// ? bind.m_textureFlags // : texture.m_flags // ) & (BGFX_TEXTURE_SAMPLER_BITS_MASK|BGFX_TEXTURE_BORDER_COLOR_MASK) // ; diff --git a/3rdparty/bgfx/src/topology.cpp b/3rdparty/bgfx/src/topology.cpp index 52dd572ec5..1a3e8b6f6a 100644 --- a/3rdparty/bgfx/src/topology.cpp +++ b/3rdparty/bgfx/src/topology.cpp @@ -78,9 +78,9 @@ namespace bgfx const IndexT* tri = &_indices[ii]; IndexT i0 = tri[0], i1 = tri[1], i2 = tri[2]; - if (i0 > i1) { bx::xchg(i0, i1); } - if (i1 > i2) { bx::xchg(i1, i2); } - if (i0 > i1) { bx::xchg(i0, i1); } + if (i0 > i1) { bx::swap(i0, i1); } + if (i1 > i2) { bx::swap(i1, i2); } + if (i0 > i1) { bx::swap(i0, i1); } BX_CHECK(i0 < i1 && i1 < i2, ""); dst[1] = i0; dst[0] = i1; diff --git a/3rdparty/bimg/.appveyor.yml b/3rdparty/bimg/.appveyor.yml index b72256f290..4d54558e36 100644 --- a/3rdparty/bimg/.appveyor.yml +++ b/3rdparty/bimg/.appveyor.yml @@ -5,7 +5,6 @@ os: environment: matrix: - - TOOLSET: vs2015 - TOOLSET: vs2017 configuration: diff --git a/3rdparty/bimg/makefile b/3rdparty/bimg/makefile index d6491a157a..cd11a89f7b 100644 --- a/3rdparty/bimg/makefile +++ b/3rdparty/bimg/makefile @@ -39,9 +39,6 @@ clean: ## Clean all intermediate files. @mkdir .build projgen: ## Generate project files for all configurations. - $(GENIE) --with-tools vs2012 - $(GENIE) --with-tools vs2013 - $(GENIE) --with-tools vs2015 $(GENIE) --with-tools vs2017 $(GENIE) --with-tools --gcc=mingw-gcc gmake $(GENIE) --with-tools --gcc=linux-gcc gmake @@ -135,42 +132,6 @@ mingw-clang-release64: .build/projects/gmake-mingw-clang ## Build - MinGW Clang $(MAKE) -R -C .build/projects/gmake-mingw-clang config=release64 mingw-clang: mingw-clang-debug32 mingw-clang-release32 mingw-clang-debug64 mingw-clang-release64 ## Build - MinGW Clang x86/x64 Debug and Release -.build/projects/vs2012: - $(GENIE) --with-tools vs2012 -vs2012-debug32: .build/projects/vs2012 ## Build - VS2012 x86 Debug - devenv .build/projects/vs2012/bimg.sln /Build "Debug|Win32" -vs2012-release32: .build/projects/vs2012 ## Build - VS2012 x86 Release - devenv .build/projects/vs2012/bimg.sln /Build "Release|Win32" -vs2012-debug64: .build/projects/vs2012 ## Build - VS2012 x64 Debug - devenv .build/projects/vs2012/bimg.sln /Build "Debug|x64" -vs2012-release64: .build/projects/vs2012 ## Build - VS2012 x64 Release - devenv .build/projects/vs2012/bimg.sln /Build "Release|x64" -vs2012: vs2012-debug32 vs2012-release32 vs2012-debug64 vs2012-release64 ## Build - VS2012 x86/x64 Debug and Release - -.build/projects/vs2013: - $(GENIE) --with-tools vs2013 -vs2013-debug32: .build/projects/vs2013 ## Build - VS2013 x86 Debug - devenv .build/projects/vs2013/bimg.sln /Build "Debug|Win32" -vs2013-release32: .build/projects/vs2013 ## Build - VS2013 x86 Release - devenv .build/projects/vs2013/bimg.sln /Build "Release|Win32" -vs2013-debug64: .build/projects/vs2013 ## Build - VS2013 x64 Debug - devenv .build/projects/vs2013/bimg.sln /Build "Debug|x64" -vs2013-release64: .build/projects/vs2013 ## Build - VS2013 x64 Release - devenv .build/projects/vs2013/bimg.sln /Build "Release|x64" -vs2013: vs2013-debug32 vs2013-release32 vs2013-debug64 vs2013-release64 ## Build - VS2013 x86/x64 Debug and Release - -.build/projects/vs2015: - $(GENIE) --with-tools vs2015 -vs2015-debug32: .build/projects/vs2015 ## Build - VS2015 x86 Debug - devenv .build/projects/vs2015/bimg.sln /Build "Debug|Win32" -vs2015-release32: .build/projects/vs2015 ## Build - VS2015 x86 Release - devenv .build/projects/vs2015/bimg.sln /Build "Release|Win32" -vs2015-debug64: .build/projects/vs2015 ## Build - VS2015 x64 Debug - devenv .build/projects/vs2015/bimg.sln /Build "Debug|x64" -vs2015-release64: .build/projects/vs2015 ## Build - VS2015 x64 Release - devenv .build/projects/vs2015/bimg.sln /Build "Release|x64" -vs2015: vs2015-debug32 vs2015-release32 vs2015-debug64 vs2015-release64 ## Build - VS2015 x86/x64 Debug and Release - .build/projects/vs2017: $(GENIE) --with-tools vs2017 vs2017-debug32: .build/projects/vs2017 ## Build - vs2017 x86 Debug diff --git a/3rdparty/bimg/src/image.cpp b/3rdparty/bimg/src/image.cpp index 05ed59cb9d..8f1ed909b7 100644 --- a/3rdparty/bimg/src/image.cpp +++ b/3rdparty/bimg/src/image.cpp @@ -928,7 +928,7 @@ namespace bimg xyz[1] += rgba1[5]; xyz[2] += rgba1[6]; - bx::vec3Norm( (float*)dst, xyz); + bx::store(dst, bx::normalize(bx::load(xyz) ) ); } } } @@ -2429,9 +2429,9 @@ namespace bimg switch (rotationMode) { - case 1: bx::xchg(aa, rr); break; - case 2: bx::xchg(aa, gg); break; - case 3: bx::xchg(aa, bb); break; + case 1: bx::swap(aa, rr); break; + case 2: bx::swap(aa, gg); break; + case 3: bx::swap(aa, bb); break; default: break; }; @@ -5207,7 +5207,7 @@ namespace bimg total += bx::write(_writer, "FORMAT=32-bit_rle_rgbe\n" , _err); total += bx::write(_writer, '\n' , _err); - total += bx::writePrintf(_writer, "%cY %d +X %d\n", _yflip ? '+' : '-', _height, _width); + total += bx::write(_writer, _err, "%cY %d +X %d\n", _yflip ? '+' : '-', _height, _width); UnpackFn unpack = getUnpack(_format); const uint32_t bpp = getBitsPerPixel(_format); diff --git a/3rdparty/bimg/src/image_cubemap_filter.cpp b/3rdparty/bimg/src/image_cubemap_filter.cpp index 37a44d1f02..ff1e8991e2 100644 --- a/3rdparty/bimg/src/image_cubemap_filter.cpp +++ b/3rdparty/bimg/src/image_cubemap_filter.cpp @@ -77,7 +77,7 @@ namespace bimg uint8_t m_faceEdge; }; - float uv[3][3]; + bx::Vec3 uv[3]; }; static const CubeMapFace s_cubeMapFace[] = @@ -155,42 +155,42 @@ namespace bimg }; /// _u and _v should be center addressing and in [-1.0+invSize..1.0-invSize] range. - void texelUvToDir(float* _outDir, uint8_t _side, float _u, float _v) + bx::Vec3 texelUvToDir(uint8_t _side, float _u, float _v) { const CubeMapFace& face = s_cubeMapFace[_side]; - float tmp[3]; - tmp[0] = face.uv[0][0] * _u + face.uv[1][0] * _v + face.uv[2][0]; - tmp[1] = face.uv[0][1] * _u + face.uv[1][1] * _v + face.uv[2][1]; - tmp[2] = face.uv[0][2] * _u + face.uv[1][2] * _v + face.uv[2][2]; - bx::vec3Norm(_outDir, tmp); + const bx::Vec3 tmp = + { + face.uv[0].x * _u + face.uv[1].x * _v + face.uv[2].x, + face.uv[0].y * _u + face.uv[1].y * _v + face.uv[2].y, + face.uv[0].z * _u + face.uv[1].z * _v + face.uv[2].z, + }; + + return bx::normalize(tmp); } - void dirToTexelUv(float& _outU, float& _outV, uint8_t& _outSide, const float* _dir) + void dirToTexelUv(float& _outU, float& _outV, uint8_t& _outSide, const bx::Vec3& _dir) { - float absVec[3]; - bx::vec3Abs(absVec, _dir); + const bx::Vec3 absVec = bx::abs(_dir); + const float max = bx::max(absVec.x, absVec.y, absVec.z); - const float max = bx::max(absVec[0], absVec[1], absVec[2]); - - if (max == absVec[0]) + if (max == absVec.x) { - _outSide = (_dir[0] >= 0.0f) ? uint8_t(CubeMapFace::PositiveX) : uint8_t(CubeMapFace::NegativeX); + _outSide = _dir.x >= 0.0f ? uint8_t(CubeMapFace::PositiveX) : uint8_t(CubeMapFace::NegativeX); } - else if (max == absVec[1]) + else if (max == absVec.y) { - _outSide = (_dir[1] >= 0.0f) ? uint8_t(CubeMapFace::PositiveY) : uint8_t(CubeMapFace::NegativeY); + _outSide = _dir.y >= 0.0f ? uint8_t(CubeMapFace::PositiveY) : uint8_t(CubeMapFace::NegativeY); } else { - _outSide = (_dir[2] >= 0.0f) ? uint8_t(CubeMapFace::PositiveZ) : uint8_t(CubeMapFace::NegativeZ); + _outSide = _dir.z >= 0.0f ? uint8_t(CubeMapFace::PositiveZ) : uint8_t(CubeMapFace::NegativeZ); } - float faceVec[3]; - bx::vec3Mul(faceVec, _dir, 1.0f/max); + const bx::Vec3 faceVec = bx::mul(_dir, 1.0f/max); - _outU = (bx::vec3Dot(s_cubeMapFace[_outSide].uv[0], faceVec) + 1.0f) * 0.5f; - _outV = (bx::vec3Dot(s_cubeMapFace[_outSide].uv[1], faceVec) + 1.0f) * 0.5f; + _outU = (bx::dot(s_cubeMapFace[_outSide].uv[0], faceVec) + 1.0f) * 0.5f; + _outV = (bx::dot(s_cubeMapFace[_outSide].uv[1], faceVec) + 1.0f) * 0.5f; } ImageContainer* imageCubemapFromLatLongRgba32F(bx::AllocatorI* _allocator, const ImageContainer& _input, bool _useBilinearInterpolation, bx::Error* _err) @@ -239,11 +239,10 @@ namespace bimg const float uu = 2.0f*xx*invDstWidth - 1.0f; const float vv = 2.0f*yy*invDstWidth - 1.0f; - float dir[3]; - texelUvToDir(dir, side, uu, vv); + const bx::Vec3 dir = texelUvToDir(side, uu, vv); float srcU, srcV; - bx::vec3ToLatLong(&srcU, &srcV, dir); + bx::toLatLong(&srcU, &srcV, dir); srcU *= srcWidthMinusOne; srcV *= srcHeightMinusOne; @@ -392,7 +391,7 @@ namespace bimg const float uu = float(xx)*texelSize*2.0f - 1.0f; const float vv = float(yy)*texelSize*2.0f - 1.0f; - texelUvToDir(dstData, side, uu, vv); + bx::store(dstData, texelUvToDir(side, uu, vv) ); dstData[3] = texelSolidAngle(uu, vv, texelSize); } } @@ -441,7 +440,7 @@ namespace bimg float m_max[2]; }; - void calcFilterArea(Aabb* _outFilterArea, const float* _dir, float _filterSize) + void calcFilterArea(Aabb* _outFilterArea, const bx::Vec3& _dir, float _filterSize) { /// ______ /// | | @@ -690,7 +689,7 @@ namespace bimg unpack(_rgba, texel); } - void sampleCubeMap(float* _rgba, const ImageContainer& _image, const float* _dir, float _lod) + void sampleCubeMap(float* _rgba, const ImageContainer& _image, const bx::Vec3& _dir, float _lod) { float uu, vv; uint8_t side; @@ -762,7 +761,7 @@ namespace bimg _rgba[3] = bx::lerp(rgbaA[3], rgbaB[3], fl); } - void importanceSampleGgx(float* _result, float _u, float _v, float _roughness, const float* _normal, const float* _tangentX, const float* _tangentY) + bx::Vec3 importanceSampleGgx(float _u, float _v, float _roughness, const bx::Vec3& _normal, const bx::Vec3& _tangentX, const bx::Vec3& _tangentY) { const float aa = bx::square(_roughness); const float phi = bx::kPi2 * _u; @@ -776,9 +775,12 @@ namespace bimg cosTheta, }; - _result[0] = _tangentX[0] * hh[0] + _tangentY[0] * hh[1] + _normal[0] * hh[2]; - _result[1] = _tangentX[1] * hh[0] + _tangentY[1] * hh[1] + _normal[1] * hh[2]; - _result[2] = _tangentX[2] * hh[0] + _tangentY[2] * hh[1] + _normal[2] * hh[2]; + return + { + _tangentX.x * hh[0] + _tangentY.x * hh[1] + _normal.x * hh[2], + _tangentX.y * hh[0] + _tangentY.y * hh[1] + _normal.y * hh[2], + _tangentX.z * hh[0] + _tangentY.z * hh[1] + _normal.z * hh[2], + }; } float normalDistributionGgx(float _ndoth, float _roughness) @@ -794,7 +796,7 @@ namespace bimg float* _result , const ImageContainer& _image , uint8_t _lod - , const float* _dir + , const bx::Vec3& _dir , float _roughness ) { @@ -821,30 +823,24 @@ namespace bimg const float kGoldenSection = 0.61803398875f; float offset = kGoldenSection; - float tangentX[3]; - float tangentY[3]; - bx::vec3TangentFrame(_dir, tangentX, tangentY); + bx::Vec3 tangentX; + bx::Vec3 tangentY; + bx::calcTangentFrame(tangentX, tangentY, _dir); for (uint32_t ii = 0; ii < kNumSamples; ++ii) { offset += kGoldenSection; const float vv = ii/float(kNumSamples); - float hh[3]; - importanceSampleGgx(hh, offset, vv, _roughness, _dir, tangentX, tangentY); - - const float ddoth2 = 2.0f * bx::vec3Dot(_dir, hh); - - float ll[3]; - ll[0] = ddoth2 * hh[0] - _dir[0]; - ll[1] = ddoth2 * hh[1] - _dir[1]; - ll[2] = ddoth2 * hh[2] - _dir[2]; + const bx::Vec3 hh = importanceSampleGgx(offset, vv, _roughness, _dir, tangentX, tangentY); + const float ddoth2 = 2.0f * bx::dot(_dir, hh); + const bx::Vec3 ll = bx::sub(bx::mul(hh, ddoth2), _dir); - const float ndotl = bx::clamp(bx::vec3Dot(_dir, ll), 0.0f, 1.0f); + const float ndotl = bx::clamp(bx::dot(_dir, ll), 0.0f, 1.0f); if (ndotl > 0.0f) { - const float ndoth = bx::clamp(bx::vec3Dot(_dir, hh), 0.0f, 1.0f); + const float ndoth = bx::clamp(bx::dot(_dir, hh), 0.0f, 1.0f); const float vdoth = ndoth; // Chapter 20. GPU-Based Importance Sampling @@ -914,7 +910,7 @@ namespace bimg , const ImageContainer& _nsa , uint8_t _lod , const Aabb* _aabb - , const float* _dir + , const bx::Vec3& _dir , float _specularPower , float _specularAngle ) @@ -958,7 +954,7 @@ namespace bimg { const float* normal = (const float*)&nsaMip.m_data[(yy*nsaMip.m_width+xx)*(nsaMip.m_bpp/8)]; const float solidAngle = normal[3]; - const float ndotl = bx::clamp(bx::vec3Dot(normal, _dir), 0.0f, 1.0f); + const float ndotl = bx::clamp(bx::dot(bx::load(normal), _dir), 0.0f, 1.0f); if (ndotl >= _specularAngle) { @@ -1177,8 +1173,7 @@ namespace bimg const float uu = float(xx)*texelSize*2.0f - 1.0f; const float vv = float(yy)*texelSize*2.0f - 1.0f; - float dir[3]; - texelUvToDir(dir, side, uu, vv); + bx::Vec3 dir = texelUvToDir(side, uu, vv); if (LightingModel::Ggx == _lightingModel) { diff --git a/3rdparty/bimg/src/image_encode.cpp b/3rdparty/bimg/src/image_encode.cpp index 13da73b7b1..09586fe510 100644 --- a/3rdparty/bimg/src/image_encode.cpp +++ b/3rdparty/bimg/src/image_encode.cpp @@ -98,7 +98,7 @@ namespace bimg for (uint32_t ii = 0; ii < 16; ++ii) { // BGRx bx::memCopy(&block[ii*4], &ptr[(ii%4)*srcPitch + (ii&~3)], 4); - bx::xchg(block[ii*4+0], block[ii*4+2]); + bx::swap(block[ii*4+0], block[ii*4+2]); } *dstBlock++ = ProcessRGB_ETC2(block); diff --git a/3rdparty/bx/.appveyor.yml b/3rdparty/bx/.appveyor.yml index 96ec072ce8..001d04317b 100644 --- a/3rdparty/bx/.appveyor.yml +++ b/3rdparty/bx/.appveyor.yml @@ -5,7 +5,6 @@ os: environment: matrix: - - TOOLSET: vs2015 - TOOLSET: vs2017 configuration: diff --git a/3rdparty/bx/include/bx/bx.h b/3rdparty/bx/include/bx/bx.h index 4f5d1aa8f7..7c2d06162a 100644 --- a/3rdparty/bx/include/bx/bx.h +++ b/3rdparty/bx/include/bx/bx.h @@ -17,7 +17,7 @@ #include "macros.h" /// -#define BX_COUNTOF(_x) sizeof(bx::COUNTOF_REQUIRES_ARRAY_ARGUMENT(_x) ) +#define BX_COUNTOF(_x) sizeof(bx::CountOfRequireArrayArgumentT(_x) ) /// #define BX_IGNORE_C4127(_x) bx::ignoreC4127(!!(_x) ) @@ -27,8 +27,8 @@ namespace bx { - const int32_t kExitSuccess = 0; - const int32_t kExitFailure = 1; + constexpr int32_t kExitSuccess = 0; + constexpr int32_t kExitFailure = 1; /// Template for avoiding MSVC: C4127: conditional expression is constant template @@ -38,12 +38,12 @@ namespace bx template constexpr bool isTriviallyCopyable(); - /// Exchange two values. + /// Swap two values. template - void xchg(Ty& _a, Ty& _b); + void swap(Ty& _a, Ty& _b); - /// Exchange memory. - void xchg(void* _a, void* _b, size_t _numBytes); + /// Swap memory. + void swap(void* _a, void* _b, size_t _numBytes); /// Returns minimum of two values. template @@ -73,10 +73,6 @@ namespace bx template constexpr bool isPowerOf2(Ty _a); - // http://cnicholson.net/2011/01/stupid-c-tricks-a-better-sizeof_array/ - template - char (&COUNTOF_REQUIRES_ARRAY_ARGUMENT(const T(&)[N]) )[N]; - /// void memCopy(void* _dst, const void* _src, size_t _numBytes); diff --git a/3rdparty/bx/include/bx/filepath.h b/3rdparty/bx/include/bx/filepath.h index e539728bfd..605f79190e 100644 --- a/3rdparty/bx/include/bx/filepath.h +++ b/3rdparty/bx/include/bx/filepath.h @@ -14,7 +14,7 @@ BX_ERROR_RESULT(BX_ERROR_NOT_DIRECTORY, BX_MAKEFOURCC('b', 'x', 0, 1) ); namespace bx { - const int32_t kMaxFilePath = 1024; + constexpr int32_t kMaxFilePath = 1024; /// Special predefined OS directories. /// diff --git a/3rdparty/bx/include/bx/inline/bx.inl b/3rdparty/bx/include/bx/inline/bx.inl index 37a00da77a..34c8948fd6 100644 --- a/3rdparty/bx/include/bx/inline/bx.inl +++ b/3rdparty/bx/include/bx/inline/bx.inl @@ -9,6 +9,11 @@ namespace bx { + // Reference: + // https://web.archive.org/web/20181115035420/http://cnicholson.net/2011/01/stupid-c-tricks-a-better-sizeof_array/ + template + char(&CountOfRequireArrayArgumentT(const Ty(&)[Num]))[Num]; + template inline constexpr bool isEnabled() { @@ -33,7 +38,7 @@ namespace bx } template - inline void xchg(Ty& _a, Ty& _b) + inline void swap(Ty& _a, Ty& _b) { Ty tmp = _a; _a = _b; _b = tmp; } diff --git a/3rdparty/bx/include/bx/inline/math.inl b/3rdparty/bx/include/bx/inline/math.inl index 3b39d79caa..060b8bbe88 100644 --- a/3rdparty/bx/include/bx/inline/math.inl +++ b/3rdparty/bx/include/bx/inline/math.inl @@ -23,25 +23,25 @@ namespace bx return _rad * 180.0f / kPi; } - inline BX_CONST_FUNC uint32_t floatToBits(float _a) + inline constexpr BX_CONST_FUNC uint32_t floatToBits(float _a) { union { float f; uint32_t ui; } u = { _a }; return u.ui; } - inline BX_CONST_FUNC float bitsToFloat(uint32_t _a) + inline constexpr BX_CONST_FUNC float bitsToFloat(uint32_t _a) { union { uint32_t ui; float f; } u = { _a }; return u.f; } - inline BX_CONST_FUNC uint64_t doubleToBits(double _a) + inline constexpr BX_CONST_FUNC uint64_t doubleToBits(double _a) { union { double f; uint64_t ui; } u = { _a }; return u.ui; } - inline BX_CONST_FUNC double bitsToDouble(uint64_t _a) + inline constexpr BX_CONST_FUNC double bitsToDouble(uint64_t _a) { union { uint64_t ui; double f; } u = { _a }; return u.f; @@ -58,37 +58,37 @@ namespace bx return result; } - inline BX_CONST_FUNC bool isNan(float _f) + inline constexpr BX_CONST_FUNC bool isNan(float _f) { const uint32_t tmp = floatToBits(_f) & INT32_MAX; return tmp > UINT32_C(0x7f800000); } - inline BX_CONST_FUNC bool isNan(double _f) + inline constexpr BX_CONST_FUNC bool isNan(double _f) { const uint64_t tmp = doubleToBits(_f) & INT64_MAX; return tmp > UINT64_C(0x7ff0000000000000); } - inline BX_CONST_FUNC bool isFinite(float _f) + inline constexpr BX_CONST_FUNC bool isFinite(float _f) { const uint32_t tmp = floatToBits(_f) & INT32_MAX; return tmp < UINT32_C(0x7f800000); } - inline BX_CONST_FUNC bool isFinite(double _f) + inline constexpr BX_CONST_FUNC bool isFinite(double _f) { const uint64_t tmp = doubleToBits(_f) & INT64_MAX; return tmp < UINT64_C(0x7ff0000000000000); } - inline BX_CONST_FUNC bool isInfinite(float _f) + inline constexpr BX_CONST_FUNC bool isInfinite(float _f) { const uint32_t tmp = floatToBits(_f) & INT32_MAX; return tmp == UINT32_C(0x7f800000); } - inline BX_CONST_FUNC bool isInfinite(double _f) + inline constexpr BX_CONST_FUNC bool isInfinite(double _f) { const uint64_t tmp = doubleToBits(_f) & INT64_MAX; return tmp == UINT64_C(0x7ff0000000000000); @@ -104,22 +104,22 @@ namespace bx return -floor(-_a); } - inline BX_CONST_FUNC float lerp(float _a, float _b, float _t) + inline constexpr BX_CONST_FUNC float lerp(float _a, float _b, float _t) { return _a + (_b - _a) * _t; } - inline BX_CONST_FUNC float abs(float _a) + inline constexpr BX_CONST_FUNC float sign(float _a) { - return _a < 0.0f ? -_a : _a; + return _a < 0.0f ? -1.0f : 1.0f; } - inline BX_CONST_FUNC float sign(float _a) + inline constexpr BX_CONST_FUNC float abs(float _a) { - return _a < 0.0f ? -1.0f : 1.0f; + return _a < 0.0f ? -_a : _a; } - inline BX_CONST_FUNC float square(float _a) + inline constexpr BX_CONST_FUNC float square(float _a) { return _a * _a; } @@ -237,17 +237,17 @@ namespace bx #endif // BX_CONFIG_SUPPORTS_SIMD } - inline BX_CONST_FUNC float trunc(float _a) + inline constexpr BX_CONST_FUNC float trunc(float _a) { return float(int(_a) ); } - inline BX_CONST_FUNC float fract(float _a) + inline constexpr BX_CONST_FUNC float fract(float _a) { return _a - trunc(_a); } - inline BX_CONST_FUNC float mad(float _a, float _b, float _c) + inline constexpr BX_CONST_FUNC float mad(float _a, float _b, float _c) { return _a * _b + _c; } @@ -257,7 +257,7 @@ namespace bx return _a - _b * floor(_a / _b); } - inline BX_CONST_FUNC bool equal(float _a, float _b, float _epsilon) + inline constexpr BX_CONST_FUNC bool equal(float _a, float _b, float _epsilon) { // Reference: // https://web.archive.org/web/20181103180318/http://realtimecollisiondetection.net/blog/?p=89 @@ -283,27 +283,27 @@ namespace bx return result; } - inline BX_CONST_FUNC float step(float _edge, float _a) + inline constexpr BX_CONST_FUNC float step(float _edge, float _a) { return _a < _edge ? 0.0f : 1.0f; } - inline BX_CONST_FUNC float pulse(float _a, float _start, float _end) + inline constexpr BX_CONST_FUNC float pulse(float _a, float _start, float _end) { return step(_a, _start) - step(_a, _end); } - inline BX_CONST_FUNC float smoothStep(float _a) + inline constexpr BX_CONST_FUNC float smoothStep(float _a) { return square(_a)*(3.0f - 2.0f*_a); } - inline BX_CONST_FUNC float bias(float _time, float _bias) + inline constexpr BX_CONST_FUNC float bias(float _time, float _bias) { return _time / ( ( (1.0f/_bias - 2.0f)*(1.0f - _time) ) + 1.0f); } - inline BX_CONST_FUNC float gain(float _time, float _gain) + inline constexpr BX_CONST_FUNC float gain(float _time, float _gain) { if (_time < 0.5f) { @@ -324,11 +324,249 @@ namespace bx return _a + angleDiff(_a, _b) * _t; } - inline void vec3Move(float* _result, const float* _a) + inline Vec3 load(const void* _ptr) { - _result[0] = _a[0]; - _result[1] = _a[1]; - _result[2] = _a[2]; + const float* ptr = reinterpret_cast(_ptr); + return + { + ptr[0], + ptr[1], + ptr[2], + }; + } + + inline void store(void* _ptr, const Vec3& _a) + { + float* ptr = reinterpret_cast(_ptr); + ptr[0] = _a.x; + ptr[1] = _a.y; + ptr[2] = _a.z; + } + + inline constexpr BX_CONST_FUNC Vec3 abs(const Vec3& _a) + { + return + { + abs(_a.x), + abs(_a.y), + abs(_a.z), + }; + } + + inline constexpr BX_CONST_FUNC Vec3 neg(const Vec3& _a) + { + return + { + -_a.x, + -_a.y, + -_a.z, + }; + } + + inline constexpr BX_CONST_FUNC Vec3 add(const Vec3& _a, const Vec3& _b) + { + return + { + _a.x + _b.x, + _a.y + _b.y, + _a.z + _b.z, + }; + } + + inline constexpr BX_CONST_FUNC Vec3 add(const Vec3& _a, float _b) + { + return + { + _a.x + _b, + _a.y + _b, + _a.z + _b, + }; + } + + inline constexpr BX_CONST_FUNC Vec3 sub(const Vec3& _a, const Vec3& _b) + { + return + { + _a.x - _b.x, + _a.y - _b.y, + _a.z - _b.z, + }; + } + + inline constexpr BX_CONST_FUNC Vec3 sub(const Vec3& _a, float _b) + { + return + { + _a.x - _b, + _a.y - _b, + _a.z - _b, + }; + } + + inline constexpr BX_CONST_FUNC Vec3 mul(const Vec3& _a, const Vec3& _b) + { + return + { + _a.x * _b.x, + _a.y * _b.y, + _a.z * _b.z, + }; + } + + inline constexpr BX_CONST_FUNC Vec3 mul(const Vec3& _a, float _b) + { + return + { + _a.x * _b, + _a.y * _b, + _a.z * _b, + }; + } + + inline constexpr BX_CONST_FUNC Vec3 mad(const Vec3& _a, const Vec3& _b, const Vec3& _c) + { + return add(mul(_a, _b), _c); + } + + inline constexpr BX_CONST_FUNC float dot(const Vec3& _a, const Vec3& _b) + { + return _a.x*_b.x + _a.y*_b.y + _a.z*_b.z; + } + + inline constexpr BX_CONST_FUNC Vec3 cross(const Vec3& _a, const Vec3& _b) + { + return + { + _a.y*_b.z - _a.z*_b.y, + _a.z*_b.x - _a.x*_b.z, + _a.x*_b.y - _a.y*_b.x, + }; + } + + inline BX_CONST_FUNC float length(const Vec3& _a) + { + return sqrt(dot(_a, _a) ); + } + + inline constexpr BX_CONST_FUNC Vec3 lerp(const Vec3& _a, const Vec3& _b, float _t) + { + return + { + lerp(_a.x, _b.x, _t), + lerp(_a.y, _b.y, _t), + lerp(_a.z, _b.z, _t), + }; + } + + inline constexpr BX_CONST_FUNC Vec3 lerp(const Vec3& _a, const Vec3& _b, const Vec3& _t) + { + return + { + lerp(_a.x, _b.x, _t.x), + lerp(_a.y, _b.y, _t.y), + lerp(_a.z, _b.z, _t.z), + }; + } + + inline BX_CONST_FUNC Vec3 normalize(const Vec3& _a) + { + const float invLen = 1.0f/length(_a); + const Vec3 result = mul(_a, invLen); + return result; + } + + inline constexpr BX_CONST_FUNC Vec3 min(const Vec3& _a, const Vec3& _b) + { + return + { + min(_a.x, _b.x), + min(_a.y, _b.y), + min(_a.z, _b.z), + }; + } + + inline constexpr BX_CONST_FUNC Vec3 max(const Vec3& _a, const Vec3& _b) + { + return + { + max(_a.x, _b.x), + max(_a.y, _b.y), + max(_a.z, _b.z), + }; + } + + inline constexpr BX_CONST_FUNC Vec3 rcp(const Vec3& _a) + { + return + { + 1.0f / _a.x, + 1.0f / _a.y, + 1.0f / _a.z, + }; + } + + inline void calcTangentFrame(Vec3& _outT, Vec3& _outB, const Vec3& _n) + { + const float nx = _n.x; + const float ny = _n.y; + const float nz = _n.z; + + if (abs(nx) > abs(nz) ) + { + float invLen = 1.0f / sqrt(nx*nx + nz*nz); + _outT.x = -nz * invLen; + _outT.y = 0.0f; + _outT.z = nx * invLen; + } + else + { + float invLen = 1.0f / sqrt(ny*ny + nz*nz); + _outT.x = 0.0f; + _outT.y = nz * invLen; + _outT.z = -ny * invLen; + } + + _outB = cross(_n, _outT); + } + + inline void calcTangentFrame(Vec3& _outT, Vec3& _outB, const Vec3& _n, float _angle) + { + calcTangentFrame(_outT, _outB, _n); + + const float sa = sin(_angle); + const float ca = cos(_angle); + + _outT.x = -sa * _outB.x + ca * _outT.x; + _outT.y = -sa * _outB.y + ca * _outT.y; + _outT.z = -sa * _outB.z + ca * _outT.z; + + _outB = cross(_n, _outT); + } + + inline BX_CONST_FUNC Vec3 fromLatLong(float _u, float _v) + { + Vec3 result; + const float phi = _u * kPi2; + const float theta = _v * kPi; + + const float st = sin(theta); + const float sp = sin(phi); + const float ct = cos(theta); + const float cp = cos(phi); + + result.x = -st*sp; + result.y = ct; + result.z = -st*cp; + return result; + } + + inline void toLatLong(float* _outU, float* _outV, const Vec3& _dir) + { + const float phi = atan2(_dir.x, _dir.z); + const float theta = acos(_dir.y); + + *_outU = (bx::kPi + phi)/bx::kPi2; + *_outV = theta*bx::kInvPi; } inline void vec3Abs(float* _result, const float* _a) @@ -338,13 +576,6 @@ namespace bx _result[2] = abs(_a[2]); } - inline void vec3Neg(float* _result, const float* _a) - { - _result[0] = -_a[0]; - _result[1] = -_a[1]; - _result[2] = -_a[2]; - } - inline void vec3Add(float* _result, const float* _a, const float* _b) { _result[0] = _a[0] + _b[0]; @@ -428,27 +659,6 @@ namespace bx return len; } - inline void vec3Min(float* _result, const float* _a, const float* _b) - { - _result[0] = min(_a[0], _b[0]); - _result[1] = min(_a[1], _b[1]); - _result[2] = min(_a[2], _b[2]); - } - - inline void vec3Max(float* _result, const float* _a, const float* _b) - { - _result[0] = max(_a[0], _b[0]); - _result[1] = max(_a[1], _b[1]); - _result[2] = max(_a[2], _b[2]); - } - - inline void vec3Rcp(float* _result, const float* _a) - { - _result[0] = 1.0f / _a[0]; - _result[1] = 1.0f / _a[1]; - _result[2] = 1.0f / _a[2]; - } - inline void vec3TangentFrame(const float* _n, float* _t, float* _b) { const float nx = _n[0]; @@ -798,6 +1008,42 @@ namespace bx mtxQuatTranslation(_result, quat, _translation); } + inline Vec3 mul(const Vec3& _vec, const float* _mat) + { + Vec3 result; + result.x = _vec.x * _mat[0] + _vec.y * _mat[4] + _vec.z * _mat[ 8] + _mat[12]; + result.y = _vec.x * _mat[1] + _vec.y * _mat[5] + _vec.z * _mat[ 9] + _mat[13]; + result.z = _vec.x * _mat[2] + _vec.y * _mat[6] + _vec.z * _mat[10] + _mat[14]; + return result; + } + + inline Vec3 mulXyz0(const Vec3& _vec, const float* _mat) + { + Vec3 result; + result.x = _vec.x * _mat[0] + _vec.y * _mat[4] + _vec.z * _mat[ 8]; + result.y = _vec.x * _mat[1] + _vec.y * _mat[5] + _vec.z * _mat[ 9]; + result.z = _vec.x * _mat[2] + _vec.y * _mat[6] + _vec.z * _mat[10]; + return result; + } + + inline Vec3 mulH(const Vec3& _vec, const float* _mat) + { + const float xx = _vec.x * _mat[0] + _vec.y * _mat[4] + _vec.z * _mat[ 8] + _mat[12]; + const float yy = _vec.x * _mat[1] + _vec.y * _mat[5] + _vec.z * _mat[ 9] + _mat[13]; + const float zz = _vec.x * _mat[2] + _vec.y * _mat[6] + _vec.z * _mat[10] + _mat[14]; + const float ww = _vec.x * _mat[3] + _vec.y * _mat[7] + _vec.z * _mat[11] + _mat[15]; + const float invW = sign(ww) / ww; + + Vec3 result = + { + xx * invW, + yy * invW, + zz * invW, + }; + + return result; + } + inline void vec3MulMtx(float* _result, const float* _vec, const float* _mat) { _result[0] = _vec[0] * _mat[ 0] + _vec[1] * _mat[4] + _vec[2] * _mat[ 8] + _mat[12]; @@ -936,11 +1182,15 @@ namespace bx { float normal[3]; calcNormal(normal, _va, _vb, _vc); + calcPlane(_result, normal, _va); + } - _result[0] = normal[0]; - _result[1] = normal[1]; - _result[2] = normal[2]; - _result[3] = -vec3Dot(normal, _va); + inline void calcPlane(float _result[4], const float _normal[3], const float _pos[3]) + { + _result[0] = _normal[0]; + _result[1] = _normal[1]; + _result[2] = _normal[2]; + _result[3] = -vec3Dot(_normal, _pos); } inline BX_CONST_FUNC float toLinear(float _a) diff --git a/3rdparty/bx/include/bx/inline/readerwriter.inl b/3rdparty/bx/include/bx/inline/readerwriter.inl index 9708253f8d..9a365dcee6 100644 --- a/3rdparty/bx/include/bx/inline/readerwriter.inl +++ b/3rdparty/bx/include/bx/inline/readerwriter.inl @@ -356,43 +356,6 @@ namespace bx return result; } - inline int32_t writePrintfVargs(WriterI* _writer, const char* _format, va_list _argList) - { - va_list argListCopy; - va_copy(argListCopy, _argList); - - char temp[2048]; - char* out = temp; - int32_t max = sizeof(temp); - int32_t len = vsnprintf(out, max, _format, argListCopy); - - va_end(argListCopy); - - if (len > max) - { - va_copy(argListCopy, _argList); - - out = (char*)alloca(len); - len = vsnprintf(out, len, _format, argListCopy); - - va_end(argListCopy); - } - - int32_t size = write(_writer, out, len); - - return size; - } - - inline int32_t writePrintf(WriterI* _writer, const char* _format, ...) - { - va_list argList; - va_start(argList, _format); - int32_t size = writePrintfVargs(_writer, _format, argList); - va_end(argList); - - return size; - } - inline int64_t skip(SeekerI* _seeker, int64_t _offset) { return _seeker->seek(_offset, Whence::Current); diff --git a/3rdparty/bx/include/bx/inline/rng.inl b/3rdparty/bx/include/bx/inline/rng.inl index 8261a759c5..9577bb09aa 100644 --- a/3rdparty/bx/include/bx/inline/rng.inl +++ b/3rdparty/bx/include/bx/inline/rng.inl @@ -60,48 +60,45 @@ namespace bx } template - inline void randUnitCircle(float _result[3], Rng* _rng) + inline bx::Vec3 randUnitCircle(Rng* _rng) { const float angle = frnd(_rng) * kPi2; - _result[0] = cos(angle); - _result[1] = 0.0f; - _result[2] = sin(angle); + return + { + cos(angle), + 0.0f, + sin(angle), + }; } template - inline void randUnitSphere(float _result[3], Rng* _rng) + inline bx::Vec3 randUnitSphere(Rng* _rng) { const float rand0 = frnd(_rng) * 2.0f - 1.0f; const float rand1 = frnd(_rng) * kPi2; const float sqrtf1 = sqrt(1.0f - rand0*rand0); - _result[0] = sqrtf1 * cos(rand1); - _result[1] = sqrtf1 * sin(rand1); - _result[2] = rand0; + return + { + sqrtf1 * cos(rand1), + sqrtf1 * sin(rand1), + rand0, + }; } template - inline void randUnitHemisphere(float _result[3], Ty* _rng, const float _normal[3]) + inline bx::Vec3 randUnitHemisphere(Ty* _rng, const bx::Vec3& _normal) { - float dir[3]; - randUnitSphere(dir, _rng); - - float DdotN = dir[0]*_normal[0] - + dir[1]*_normal[1] - + dir[2]*_normal[2] - ; + const bx::Vec3 dir = randUnitSphere(_rng); + const float ddotn = bx::dot(dir, _normal); - if (0.0f > DdotN) + if (0.0f > ddotn) { - dir[0] = -dir[0]; - dir[1] = -dir[1]; - dir[2] = -dir[2]; + return bx::neg(dir); } - _result[0] = dir[0]; - _result[1] = dir[1]; - _result[2] = dir[2]; + return dir; } inline void generateSphereHammersley(void* _data, uint32_t _stride, uint32_t _num, float _scale) @@ -141,7 +138,7 @@ namespace bx for (uint32_t ii = 0, num = _num-1; ii < num; ++ii) { uint32_t jj = ii + 1 + _rng->gen() % (num - ii); - bx::xchg(_array[ii], _array[jj]); + bx::swap(_array[ii], _array[jj]); } } diff --git a/3rdparty/bx/include/bx/math.h b/3rdparty/bx/include/bx/math.h index 17d68c00f5..9e635950c3 100644 --- a/3rdparty/bx/include/bx/math.h +++ b/3rdparty/bx/include/bx/math.h @@ -13,21 +13,21 @@ namespace bx { - extern const float kPi; - extern const float kPi2; - extern const float kInvPi; - extern const float kPiHalf; - extern const float kPiQuarter; - extern const float kSqrt2; - extern const float kLogNat10; - extern const float kInvLogNat2; - extern const float kLogNat2Hi; - extern const float kLogNat2Lo; - extern const float kE; - extern const float kNearZero; + constexpr float kPi = 3.1415926535897932384626433832795f; + constexpr float kPi2 = 6.2831853071795864769252867665590f; + constexpr float kInvPi = 1.0f/kPi; + constexpr float kPiHalf = 1.5707963267948966192313216916398f; + constexpr float kPiQuarter = 0.7853981633974483096156608458199f; + constexpr float kSqrt2 = 1.4142135623730950488016887242097f; + constexpr float kLogNat10 = 2.3025850929940456840179914546844f; + constexpr float kInvLogNat2 = 1.4426950408889634073599246810019f; + constexpr float kLogNat2Hi = 0.6931471805599453094172321214582f; + constexpr float kLogNat2Lo = 1.90821492927058770002e-10f; + constexpr float kE = 2.7182818284590452353602874713527f; + constexpr float kNearZero = 1.0f/float(1 << 28); + constexpr float kFloatMin = 1.175494e-38f; + constexpr float kFloatMax = 3.402823e+38f; extern const float kInfinity; - extern const float kFloatMin; - extern const float kFloatMax; /// typedef float (*LerpFn)(float _a, float _b, float _t); @@ -52,6 +52,12 @@ namespace bx }; }; + /// + struct Vec3 + { + float x, y, z; + }; + /// Returns converted the argument _deg to radians. /// BX_CONST_FUNC float toRad(float _deg); @@ -62,19 +68,19 @@ namespace bx /// Reinterprets the bit pattern of _a as uint32_t. /// - BX_CONST_FUNC uint32_t floatToBits(float _a); + constexpr BX_CONST_FUNC uint32_t floatToBits(float _a); /// Reinterprets the bit pattern of _a as float. /// - BX_CONST_FUNC float bitsToFloat(uint32_t _a); + constexpr BX_CONST_FUNC float bitsToFloat(uint32_t _a); /// Reinterprets the bit pattern of _a as uint64_t. /// - BX_CONST_FUNC uint64_t doubleToBits(double _a); + constexpr BX_CONST_FUNC uint64_t doubleToBits(double _a); /// Reinterprets the bit pattern of _a as double. /// - BX_CONST_FUNC double bitsToDouble(uint64_t _a); + constexpr BX_CONST_FUNC double bitsToDouble(uint64_t _a); /// Returns sortable floating point value. /// @@ -82,27 +88,27 @@ namespace bx /// Returns true if _f is a number that is NaN. /// - BX_CONST_FUNC bool isNan(float _f); + constexpr BX_CONST_FUNC bool isNan(float _f); /// Returns true if _f is a number that is NaN. /// - BX_CONST_FUNC bool isNan(double _f); + constexpr BX_CONST_FUNC bool isNan(double _f); /// Returns true if _f is not infinite and is not a NaN. /// - BX_CONST_FUNC bool isFinite(float _f); + constexpr BX_CONST_FUNC bool isFinite(float _f); /// Returns true if _f is not infinite and is not a NaN. /// - BX_CONST_FUNC bool isFinite(double _f); + constexpr BX_CONST_FUNC bool isFinite(double _f); /// Returns true if _f is infinite and is not a NaN. /// - BX_CONST_FUNC bool isInfinite(float _f); + constexpr BX_CONST_FUNC bool isInfinite(float _f); /// Returns true if _f is infinite and is not a NaN. /// - BX_CONST_FUNC bool isInfinite(double _f); + constexpr BX_CONST_FUNC bool isInfinite(double _f); /// Returns the largest integer value not greater than _f. /// @@ -118,19 +124,19 @@ namespace bx /// Returns linear interpolation between two values _a and _b. /// - BX_CONST_FUNC float lerp(float _a, float _b, float _t); + constexpr BX_CONST_FUNC float lerp(float _a, float _b, float _t); /// Returns the sign of _a. /// - BX_CONST_FUNC float sign(float _a); + constexpr BX_CONST_FUNC float sign(float _a); /// Returns the absolute of _a. /// - BX_CONST_FUNC float abs(float _a); + constexpr BX_CONST_FUNC float abs(float _a); /// Returns the square of _a. /// - BX_CONST_FUNC float square(float _a); + constexpr BX_CONST_FUNC float square(float _a); /// Returns the cosine of the argument _a. /// @@ -211,23 +217,23 @@ namespace bx /// Returns the nearest integer not greater in magnitude than _a. /// - BX_CONST_FUNC float trunc(float _a); + constexpr BX_CONST_FUNC float trunc(float _a); /// Returns the fractional (or decimal) part of _a, which is greater than or equal to 0 /// and less than 1. /// - BX_CONST_FUNC float fract(float _a); + constexpr BX_CONST_FUNC float fract(float _a); /// Returns result of multipla and add (_a * _b + _c). /// - BX_CONST_FUNC float mad(float _a, float _b, float _c); + constexpr BX_CONST_FUNC float mad(float _a, float _b, float _c); /// Returns the floating-point remainder of the division operation _a/_b. /// BX_CONST_FUNC float mod(float _a, float _b); /// - BX_CONST_FUNC bool equal(float _a, float _b, float _epsilon); + constexpr BX_CONST_FUNC bool equal(float _a, float _b, float _epsilon); /// BX_CONST_FUNC bool equal(const float* _a, const float* _b, uint32_t _num, float _epsilon); @@ -236,23 +242,23 @@ namespace bx BX_CONST_FUNC float wrap(float _a, float _wrap); /// - BX_CONST_FUNC float step(float _edge, float _a); + constexpr BX_CONST_FUNC float step(float _edge, float _a); /// - BX_CONST_FUNC float pulse(float _a, float _start, float _end); + constexpr BX_CONST_FUNC float pulse(float _a, float _start, float _end); /// - BX_CONST_FUNC float smoothStep(float _a); + constexpr BX_CONST_FUNC float smoothStep(float _a); // References: // - Bias And Gain Are Your Friend // http://blog.demofox.org/2012/09/24/bias-and-gain-are-your-friend/ // - http://demofox.org/biasgain.html /// - BX_CONST_FUNC float bias(float _time, float _bias); + constexpr BX_CONST_FUNC float bias(float _time, float _bias); /// - BX_CONST_FUNC float gain(float _time, float _gain); + constexpr BX_CONST_FUNC float gain(float _time, float _gain); /// BX_CONST_FUNC float angleDiff(float _a, float _b); @@ -262,13 +268,79 @@ namespace bx BX_CONST_FUNC float angleLerp(float _a, float _b, float _t); /// - void vec3Move(float* _result, const float* _a); + Vec3 load(const void* _ptr); /// - void vec3Abs(float* _result, const float* _a); + void store(void* _ptr, const Vec3& _a); + + /// + constexpr BX_CONST_FUNC Vec3 abs(const Vec3& _a); + + /// + constexpr BX_CONST_FUNC Vec3 neg(const Vec3& _a); + + /// + constexpr BX_CONST_FUNC Vec3 add(const Vec3& _a, const Vec3& _b); + + /// + constexpr BX_CONST_FUNC Vec3 add(const Vec3& _a, float _b); + + /// + constexpr BX_CONST_FUNC Vec3 sub(const Vec3& _a, const Vec3& _b); + + /// + constexpr BX_CONST_FUNC Vec3 sub(const Vec3& _a, float _b); + + /// + constexpr BX_CONST_FUNC Vec3 mul(const Vec3& _a, const Vec3& _b); + + /// + constexpr BX_CONST_FUNC Vec3 mul(const Vec3& _a, float _b); + + /// + constexpr BX_CONST_FUNC Vec3 mad(const Vec3& _a, const Vec3& _b, const Vec3& _c); + + /// + constexpr BX_CONST_FUNC float dot(const Vec3& _a, const Vec3& _b); + + /// + constexpr BX_CONST_FUNC Vec3 cross(const Vec3& _a, const Vec3& _b); + + /// + BX_CONST_FUNC float length(const Vec3& _a); /// - void vec3Neg(float* _result, const float* _a); + constexpr BX_CONST_FUNC Vec3 lerp(const Vec3& _a, const Vec3& _b, float _t); + + /// + constexpr BX_CONST_FUNC Vec3 lerp(const Vec3& _a, const Vec3& _b, const Vec3& _t); + + /// + BX_CONST_FUNC Vec3 normalize(const Vec3& _a); + + /// + constexpr BX_CONST_FUNC Vec3 min(const Vec3& _a, const Vec3& _b); + + /// + constexpr BX_CONST_FUNC Vec3 max(const Vec3& _a, const Vec3& _b); + + /// + constexpr BX_CONST_FUNC Vec3 rcp(const Vec3& _a); + + /// + void calcTangentFrame(Vec3& _outT, Vec3& _outB, const Vec3& _n); + + /// + void calcTangentFrame(Vec3& _outT, Vec3& _outB, const Vec3& _n, float _angle); + + /// + BX_CONST_FUNC Vec3 fromLatLong(float _u, float _v); + + /// + void toLatLong(float* _outU, float* _outV, const Vec3& _dir); + + /// + void vec3Abs(float* _result, const float* _a); /// void vec3Add(float* _result, const float* _a, const float* _b); @@ -306,15 +378,6 @@ namespace bx /// float vec3Norm(float* _result, const float* _a); - /// - void vec3Min(float* _result, const float* _a, const float* _b); - - /// - void vec3Max(float* _result, const float* _a, const float* _b); - - /// - void vec3Rcp(float* _result, const float* _a); - /// Calculate tangent frame from normal. /// void vec3TangentFrame(const float* _n, float* _t, float* _b); @@ -401,13 +464,13 @@ namespace bx void mtxQuatTranslationHMD(float* _result, const float* _quat, const float* _translation); /// - void mtxLookAtLh(float* _result, const float* _eye, const float* _at, const float* _up = NULL); + void mtxLookAtLh(float* _result, const Vec3& _eye, const Vec3& _at, const Vec3& _up = { 0.0f, 1.0f, 0.0f }); /// - void mtxLookAtRh(float* _result, const float* _eye, const float* _at, const float* _up = NULL); + void mtxLookAtRh(float* _result, const Vec3& _eye, const Vec3& _at, const Vec3& _up = { 0.0f, 1.0f, 0.0f }); /// - void mtxLookAt(float* _result, const float* _eye, const float* _at, const float* _up = NULL); + void mtxLookAt(float* _result, const Vec3& _eye, const Vec3& _at, const Vec3& _up = { 0.0f, 1.0f, 0.0f }); /// void mtxProj(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, float _far, bool _oglNdc); @@ -555,6 +618,9 @@ namespace bx /// void calcPlane(float _result[4], const float _va[3], const float _vb[3], const float _vc[3]); + /// + void calcPlane(float _result[4], const float _normal[3], const float _pos[3]); + /// void calcLinearFit2D(float _result[2], const void* _points, uint32_t _stride, uint32_t _numPoints); diff --git a/3rdparty/bx/include/bx/os.h b/3rdparty/bx/include/bx/os.h index 09097a168f..72589707f4 100644 --- a/3rdparty/bx/include/bx/os.h +++ b/3rdparty/bx/include/bx/os.h @@ -7,6 +7,7 @@ #define BX_OS_H_HEADER_GUARD #include "debug.h" +#include "filepath.h" #if BX_PLATFORM_OSX # define BX_DL_EXT "dylib" @@ -31,7 +32,7 @@ namespace bx size_t getProcessMemoryUsed(); /// - void* dlopen(const char* _filePath); + void* dlopen(const FilePath& _filePath); /// void dlclose(void* _handle); @@ -40,13 +41,10 @@ namespace bx void* dlsym(void* _handle, const char* _symbol); /// - bool getenv(const char* _name, char* _out, uint32_t* _inOutSize); + bool getEnv(const char* _name, char* _out, uint32_t* _inOutSize); /// - void setenv(const char* _name, const char* _value); - - /// - void unsetenv(const char* _name); + void setEnv(const char* _name, const char* _value); /// int chdir(const char* _path); diff --git a/3rdparty/bx/include/bx/platform.h b/3rdparty/bx/include/bx/platform.h index 37a77ad661..e0031ec2c3 100644 --- a/3rdparty/bx/include/bx/platform.h +++ b/3rdparty/bx/include/bx/platform.h @@ -11,10 +11,10 @@ #define BX_ARCH_64BIT 0 // Compiler -#define BX_COMPILER_CLANG 0 -#define BX_COMPILER_CLANG_ANALYZER 0 -#define BX_COMPILER_GCC 0 -#define BX_COMPILER_MSVC 0 +#define BX_COMPILER_CLANG 0 +#define BX_COMPILER_CLANG_ANALYZER 0 +#define BX_COMPILER_GCC 0 +#define BX_COMPILER_MSVC 0 // Endianess #define BX_CPU_ENDIAN_BIG 0 @@ -80,34 +80,34 @@ #endif // // http://sourceforge.net/apps/mediawiki/predef/index.php?title=Architectures -#if defined(__arm__) || \ - defined(__aarch64__) || \ - defined(_M_ARM) +#if defined(__arm__) \ + || defined(__aarch64__) \ + || defined(_M_ARM) # undef BX_CPU_ARM # define BX_CPU_ARM 1 # define BX_CACHE_LINE_SIZE 64 -#elif defined(__MIPSEL__) || \ - defined(__mips_isa_rev) || \ - defined(__mips64) +#elif defined(__MIPSEL__) \ + || defined(__mips_isa_rev) \ + || defined(__mips64) # undef BX_CPU_MIPS # define BX_CPU_MIPS 1 # define BX_CACHE_LINE_SIZE 64 -#elif defined(_M_PPC) || \ - defined(__powerpc__) || \ - defined(__powerpc64__) +#elif defined(_M_PPC) \ + || defined(__powerpc__) \ + || defined(__powerpc64__) # undef BX_CPU_PPC # define BX_CPU_PPC 1 # define BX_CACHE_LINE_SIZE 128 -#elif defined(__riscv) || \ - defined(__riscv__) || \ - defined(RISCVEL) +#elif defined(__riscv) \ + || defined(__riscv__) \ + || defined(RISCVEL) # undef BX_CPU_RISCV # define BX_CPU_RISCV 1 # define BX_CACHE_LINE_SIZE 64 -#elif defined(_M_IX86) || \ - defined(_M_X64) || \ - defined(__i386__) || \ - defined(__x86_64__) +#elif defined(_M_IX86) \ + || defined(_M_X64) \ + || defined(__i386__) \ + || defined(__x86_64__) # undef BX_CPU_X86 # define BX_CPU_X86 1 # define BX_CACHE_LINE_SIZE 64 @@ -117,14 +117,14 @@ # define BX_CACHE_LINE_SIZE 64 #endif // -#if defined(__x86_64__) || \ - defined(_M_X64) || \ - defined(__aarch64__) || \ - defined(__64BIT__) || \ - defined(__mips64) || \ - defined(__powerpc64__) || \ - defined(__ppc64__) || \ - defined(__LP64__) +#if defined(__x86_64__) \ + || defined(_M_X64) \ + || defined(__aarch64__) \ + || defined(__64BIT__) \ + || defined(__mips64) \ + || defined(__powerpc64__) \ + || defined(__ppc64__) \ + || defined(__LP64__) # undef BX_ARCH_64BIT # define BX_ARCH_64BIT 64 #else @@ -211,8 +211,8 @@ # undef BX_PLATFORM_HURD # define BX_PLATFORM_HURD 1 #elif defined(__NX__) -# undef BX_PLATFORM_NX -# define BX_PLATFORM_NX 1 +# undef BX_PLATFORM_NX +# define BX_PLATFORM_NX 1 #endif // #if !BX_CRT_NONE @@ -246,47 +246,47 @@ # endif // BX_CRT_* #endif // !BX_CRT_NONE -#define BX_PLATFORM_POSIX (0 \ - || BX_PLATFORM_ANDROID \ - || BX_PLATFORM_BSD \ - || BX_PLATFORM_EMSCRIPTEN \ - || BX_PLATFORM_HURD \ - || BX_PLATFORM_IOS \ - || BX_PLATFORM_LINUX \ - || BX_PLATFORM_NX \ - || BX_PLATFORM_OSX \ - || BX_PLATFORM_PS4 \ - || BX_PLATFORM_RPI \ - || BX_PLATFORM_STEAMLINK \ - ) +#define BX_PLATFORM_POSIX (0 \ + || BX_PLATFORM_ANDROID \ + || BX_PLATFORM_BSD \ + || BX_PLATFORM_EMSCRIPTEN \ + || BX_PLATFORM_HURD \ + || BX_PLATFORM_IOS \ + || BX_PLATFORM_LINUX \ + || BX_PLATFORM_NX \ + || BX_PLATFORM_OSX \ + || BX_PLATFORM_PS4 \ + || BX_PLATFORM_RPI \ + || BX_PLATFORM_STEAMLINK \ + ) -#define BX_PLATFORM_NONE !(0 \ - || BX_PLATFORM_ANDROID \ - || BX_PLATFORM_BSD \ - || BX_PLATFORM_EMSCRIPTEN \ - || BX_PLATFORM_HURD \ - || BX_PLATFORM_IOS \ - || BX_PLATFORM_LINUX \ - || BX_PLATFORM_NX \ - || BX_PLATFORM_OSX \ - || BX_PLATFORM_PS4 \ - || BX_PLATFORM_RPI \ - || BX_PLATFORM_STEAMLINK \ - || BX_PLATFORM_WINDOWS \ - || BX_PLATFORM_WINRT \ - || BX_PLATFORM_XBOXONE \ - ) +#define BX_PLATFORM_NONE !(0 \ + || BX_PLATFORM_ANDROID \ + || BX_PLATFORM_BSD \ + || BX_PLATFORM_EMSCRIPTEN \ + || BX_PLATFORM_HURD \ + || BX_PLATFORM_IOS \ + || BX_PLATFORM_LINUX \ + || BX_PLATFORM_NX \ + || BX_PLATFORM_OSX \ + || BX_PLATFORM_PS4 \ + || BX_PLATFORM_RPI \ + || BX_PLATFORM_STEAMLINK \ + || BX_PLATFORM_WINDOWS \ + || BX_PLATFORM_WINRT \ + || BX_PLATFORM_XBOXONE \ + ) #if BX_COMPILER_GCC -# define BX_COMPILER_NAME "GCC " \ - BX_STRINGIZE(__GNUC__) "." \ - BX_STRINGIZE(__GNUC_MINOR__) "." \ - BX_STRINGIZE(__GNUC_PATCHLEVEL__) +# define BX_COMPILER_NAME "GCC " \ + BX_STRINGIZE(__GNUC__) "." \ + BX_STRINGIZE(__GNUC_MINOR__) "." \ + BX_STRINGIZE(__GNUC_PATCHLEVEL__) #elif BX_COMPILER_CLANG -# define BX_COMPILER_NAME "Clang " \ - BX_STRINGIZE(__clang_major__) "." \ - BX_STRINGIZE(__clang_minor__) "." \ - BX_STRINGIZE(__clang_patchlevel__) +# define BX_COMPILER_NAME "Clang " \ + BX_STRINGIZE(__clang_major__) "." \ + BX_STRINGIZE(__clang_minor__) "." \ + BX_STRINGIZE(__clang_patchlevel__) #elif BX_COMPILER_MSVC # if BX_COMPILER_MSVC >= 1910 // Visual Studio 2017 # define BX_COMPILER_NAME "MSVC 15.0" @@ -311,10 +311,10 @@ #elif BX_PLATFORM_BSD # define BX_PLATFORM_NAME "BSD" #elif BX_PLATFORM_EMSCRIPTEN -# define BX_PLATFORM_NAME "asm.js " \ - BX_STRINGIZE(__EMSCRIPTEN_major__) "." \ - BX_STRINGIZE(__EMSCRIPTEN_minor__) "." \ - BX_STRINGIZE(__EMSCRIPTEN_tiny__) +# define BX_PLATFORM_NAME "asm.js " \ + BX_STRINGIZE(__EMSCRIPTEN_major__) "." \ + BX_STRINGIZE(__EMSCRIPTEN_minor__) "." \ + BX_STRINGIZE(__EMSCRIPTEN_tiny__) #elif BX_PLATFORM_HURD # define BX_PLATFORM_NAME "Hurd" #elif BX_PLATFORM_IOS diff --git a/3rdparty/bx/include/bx/readerwriter.h b/3rdparty/bx/include/bx/readerwriter.h index c5f2fd474a..0d8e13545a 100644 --- a/3rdparty/bx/include/bx/readerwriter.h +++ b/3rdparty/bx/include/bx/readerwriter.h @@ -262,7 +262,13 @@ namespace bx /// Write string view. int32_t write(WriterI* _writer, const StringView& _str, Error* _err = NULL); - /// + /// Write formated string. + int32_t write(WriterI* _writer, const StringView& _format, va_list _argList, Error* _err); + + /// Write formated string. + int32_t write(WriterI* _writer, Error* _err, const StringView* _format, ...); + + /// Write formated string. int32_t write(WriterI* _writer, Error* _err, const char* _format, ...); /// Write repeat the same value. @@ -280,12 +286,6 @@ namespace bx template int32_t writeBE(WriterI* _writer, const Ty& _value, Error* _err = NULL); - /// Write formated string. - int32_t writePrintfVargs(WriterI* _writer, const char* _format, va_list _argList); - - /// Write formated string. - int32_t writePrintf(WriterI* _writer, const char* _format, ...); - /// Skip _offset bytes forward. int64_t skip(SeekerI* _seeker, int64_t _offset); diff --git a/3rdparty/bx/include/bx/rng.h b/3rdparty/bx/include/bx/rng.h index e558615268..87ba511e51 100644 --- a/3rdparty/bx/include/bx/rng.h +++ b/3rdparty/bx/include/bx/rng.h @@ -57,15 +57,15 @@ namespace bx /// Generate random point on unit circle. template - void randUnitCircle(float _result[3], Rng* _rng); + bx::Vec3 randUnitCircle(Rng* _rng); /// Generate random point on unit sphere. template - void randUnitSphere(float _result[3], Rng* _rng); + bx::Vec3 randUnitSphere(Rng* _rng); /// Generate random point on unit hemisphere. template - void randUnitHemisphere(float _result[3], Ty* _rng, const float _normal[3]); + bx::Vec3 randUnitHemisphere(Ty* _rng, const bx::Vec3& _normal); /// Sampling with Hammersley and Halton Points /// http://www.cse.cuhk.edu.hk/~ttwong/papers/udpoint/udpoints.html diff --git a/3rdparty/bx/makefile b/3rdparty/bx/makefile index a22063d474..65e55a7715 100644 --- a/3rdparty/bx/makefile +++ b/3rdparty/bx/makefile @@ -6,8 +6,7 @@ GENIE=../bx/tools/bin/$(OS)/genie all: - $(GENIE) vs2012 - $(GENIE) vs2013 + $(GENIE) vs2017 $(GENIE) --gcc=android-arm gmake $(GENIE) --gcc=android-mips gmake $(GENIE) --gcc=android-x86 gmake @@ -75,11 +74,8 @@ mingw-clang-release64: .build/projects/gmake-mingw-clang make -R -C .build/projects/gmake-mingw-clang config=release64 mingw-clang: mingw-clang-debug32 mingw-clang-release32 mingw-clang-debug64 mingw-clang-release64 -.build/projects/vs2012: - $(GENIE) vs2012 - -.build/projects/vs2013: - $(GENIE) vs2013 +.build/projects/vs2017: + $(GENIE) vs2017 .build/projects/gmake-osx: $(GENIE) --gcc=osx gmake diff --git a/3rdparty/bx/scripts/toolchain.lua b/3rdparty/bx/scripts/toolchain.lua index af8f7a3f48..03f97089b7 100644 --- a/3rdparty/bx/scripts/toolchain.lua +++ b/3rdparty/bx/scripts/toolchain.lua @@ -50,7 +50,6 @@ function toolchain(_buildDir, _libDir) description = "Choose GCC flavor", allowed = { { "android-arm", "Android - ARM" }, - { "android-mips", "Android - MIPS" }, { "android-x86", "Android - x86" }, { "asmjs", "Emscripten/asm.js" }, { "freebsd", "FreeBSD" }, @@ -219,25 +218,12 @@ function toolchain(_buildDir, _libDir) premake.gcc.llvm = true location (path.join(_buildDir, "projects", _ACTION .. "-android-arm")) - elseif "android-mips" == _OPTIONS["gcc"] then - - if not os.getenv("ANDROID_NDK_MIPS") - or not os.getenv("ANDROID_NDK_CLANG") - or not os.getenv("ANDROID_NDK_ROOT") then - print("Set ANDROID_NDK_CLANG, ANDROID_NDK_ARM, and ANDROID_NDK_ROOT environment variables.") - end - - premake.gcc.cc = "$(ANDROID_NDK_CLANG)/bin/clang" - premake.gcc.cxx = "$(ANDROID_NDK_CLANG)/bin/clang++" - premake.gcc.llvm = true - location (path.join(_buildDir, "projects", _ACTION .. "-android-mips")) - elseif "android-x86" == _OPTIONS["gcc"] then if not os.getenv("ANDROID_NDK_X86") or not os.getenv("ANDROID_NDK_CLANG") or not os.getenv("ANDROID_NDK_ROOT") then - print("Set ANDROID_NDK_CLANG, ANDROID_NDK_ARM, and ANDROID_NDK_ROOT environment variables.") + print("Set ANDROID_NDK_CLANG, ANDROID_NDK_X86, and ANDROID_NDK_ROOT environment variables.") end premake.gcc.cc = "$(ANDROID_NDK_CLANG)/bin/clang" @@ -648,7 +634,7 @@ function toolchain(_buildDir, _libDir) "-Wundef", } buildoptions_cpp { - "-std=c++11", + "-std=c++14", } linkoptions { "-Wl,--gc-sections", @@ -737,7 +723,7 @@ function toolchain(_buildDir, _libDir) -- "-Wuseless-cast", } buildoptions_cpp { - "-std=c++11", + "-std=c++14", } links { "rt", @@ -794,7 +780,7 @@ function toolchain(_buildDir, _libDir) "-Wundef", } buildoptions_cpp { - "-std=c++11", + "-std=c++14", } links { "rt", @@ -813,7 +799,7 @@ function toolchain(_buildDir, _libDir) "-Wundef", } buildoptions_cpp { - "-std=c++11", + "-std=c++14", } links { "rt", @@ -830,6 +816,7 @@ function toolchain(_buildDir, _libDir) } includedirs { "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/include", + "${ANDROID_NDK_ROOT}/sysroot/usr/include", "$(ANDROID_NDK_ROOT)/sources/android/native_app_glue", } linkoptions { @@ -841,7 +828,7 @@ function toolchain(_buildDir, _libDir) "m", "android", "log", - "c++", + "c++_shared", "gcc", } buildoptions { @@ -854,7 +841,7 @@ function toolchain(_buildDir, _libDir) "-Wundef", } buildoptions_cpp { - "-std=c++11", + "-std=c++14", } linkoptions { "-no-canonical-prefixes", @@ -873,7 +860,7 @@ function toolchain(_buildDir, _libDir) "__STEAMLINK__=1", -- There is no special prefedined compiler symbol to detect SteamLink, faking it. } buildoptions { - "-std=c++11", + "-std=c++14", "-Wfatal-errors", "-Wunused-value", "-Wundef", @@ -892,12 +879,10 @@ function toolchain(_buildDir, _libDir) targetdir (path.join(_buildDir, "android-arm/bin")) objdir (path.join(_buildDir, "android-arm/obj")) libdirs { - path.join(_libDir, "lib/android-arm"), "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a", } includedirs { - "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/include", - "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/include", + "$(ANDROID_NDK_ROOT)/sysroot/usr/include/arm-linux-androideabi", } buildoptions { "-gcc-toolchain $(ANDROID_NDK_ARM)", @@ -920,42 +905,14 @@ function toolchain(_buildDir, _libDir) "-Wl,--fix-cortex-a8", } - configuration { "android-mips" } - targetdir (path.join(_buildDir, "android-mips/bin")) - objdir (path.join(_buildDir, "android-mips/obj")) - libdirs { - path.join(_libDir, "lib/android-mips"), - "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/mips", - } - includedirs { - "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/mips/include", - } - buildoptions { - "-gcc-toolchain $(ANDROID_NDK_MIPS)", - "--sysroot=" .. path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-mips"), - "-target mipsel-none-linux-android", - "-mips32", - "-Wunused-value", - "-Wundef", - } - linkoptions { - "-gcc-toolchain $(ANDROID_NDK_MIPS)", - "--sysroot=" .. path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-mips"), - path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-mips/usr/lib/crtbegin_so.o"), - path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-mips/usr/lib/crtend_so.o"), - "-target mipsel-none-linux-android", - "-mips32", - } - configuration { "android-x86" } targetdir (path.join(_buildDir, "android-x86/bin")) objdir (path.join(_buildDir, "android-x86/obj")) libdirs { - path.join(_libDir, "lib/android-x86"), "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/x86", } includedirs { - "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/x86/include", + "$(ANDROID_NDK_ROOT)/sysroot/usr/include/x86_64-linux-android", } buildoptions { "-gcc-toolchain $(ANDROID_NDK_X86)", @@ -989,7 +946,7 @@ function toolchain(_buildDir, _libDir) "-Wundef", } buildoptions_cpp { - "-std=c++11", + "-std=c++14", } configuration { "freebsd" } @@ -1049,10 +1006,10 @@ function toolchain(_buildDir, _libDir) configuration { "osx" } buildoptions_cpp { - "-std=c++11", + "-std=c++14", } buildoptions_objcpp { - "-std=c++11", + "-std=c++14", } buildoptions { "-Wfatal-errors", @@ -1067,10 +1024,10 @@ function toolchain(_buildDir, _libDir) "-lc++", } buildoptions_cpp { - "-std=c++11", + "-std=c++14", } buildoptions_objcpp { - "-std=c++11", + "-std=c++14", } buildoptions { "-Wfatal-errors", @@ -1215,7 +1172,7 @@ function toolchain(_buildDir, _libDir) "$(SCE_ORBIS_SDK_DIR)/target/include_common", } buildoptions_cpp { - "-std=c++11", + "-std=c++14", } configuration { "rpi" } @@ -1234,7 +1191,7 @@ function toolchain(_buildDir, _libDir) "-Wundef", } buildoptions_cpp { - "-std=c++11", + "-std=c++14", } includedirs { "/opt/vc/include", @@ -1266,7 +1223,7 @@ function toolchain(_buildDir, _libDir) "--sysroot=$(FREEDOM_E_SDK)/work/build/riscv-gnu-toolchain/riscv64-unknown-elf/prefix/riscv64-unknown-elf", } buildoptions_cpp { - "-std=c++11", + "-std=c++14", } configuration {} -- reset configuration @@ -1282,12 +1239,6 @@ function strip() "$(SILENT) $(ANDROID_NDK_ARM)/bin/arm-linux-androideabi-strip -s \"$(TARGET)\"" } - configuration { "android-mips", "Release" } - postbuildcommands { - "$(SILENT) echo Stripping symbols.", - "$(SILENT) $(ANDROID_NDK_MIPS)/bin/mipsel-linux-android-strip -s \"$(TARGET)\"" - } - configuration { "android-x86", "Release" } postbuildcommands { "$(SILENT) echo Stripping symbols.", diff --git a/3rdparty/bx/src/bx.cpp b/3rdparty/bx/src/bx.cpp index 16868df8d0..659cb5917c 100644 --- a/3rdparty/bx/src/bx.cpp +++ b/3rdparty/bx/src/bx.cpp @@ -13,14 +13,14 @@ namespace bx { - void xchg(void* _a, void* _b, size_t _numBytes) + void swap(void* _a, void* _b, size_t _numBytes) { uint8_t* lhs = (uint8_t*)_a; uint8_t* rhs = (uint8_t*)_b; const uint8_t* end = rhs + _numBytes; while (rhs != end) { - xchg(*lhs++, *rhs++); + swap(*lhs++, *rhs++); } } diff --git a/3rdparty/bx/src/crtnone.cpp b/3rdparty/bx/src/crtnone.cpp index c5c91277e7..93579515c7 100644 --- a/3rdparty/bx/src/crtnone.cpp +++ b/3rdparty/bx/src/crtnone.cpp @@ -304,7 +304,8 @@ extern "C" int printf(const char* _format, ...) va_list argList; va_start(argList, _format); bx::WriterI* writer = bx::getStdOut(); - int32_t len = bx::writePrintfVargs(writer, _format, argList); + bx::Error err; + int32_t len = bx::write(writer, &err, _format, argList); va_end(argList); return len; } diff --git a/3rdparty/bx/src/dtoa.cpp b/3rdparty/bx/src/dtoa.cpp index 37d74076db..3c23ea516e 100644 --- a/3rdparty/bx/src/dtoa.cpp +++ b/3rdparty/bx/src/dtoa.cpp @@ -467,7 +467,7 @@ namespace bx { for (int32_t ii = 0, jj = _len - 1; ii < jj; ++ii, --jj) { - xchg(_dst[ii], _dst[jj]); + swap(_dst[ii], _dst[jj]); } } diff --git a/3rdparty/bx/src/file.cpp b/3rdparty/bx/src/file.cpp index ab29663468..8a282cab91 100644 --- a/3rdparty/bx/src/file.cpp +++ b/3rdparty/bx/src/file.cpp @@ -51,8 +51,8 @@ namespace bx virtual int32_t write(const void* _data, int32_t _size, Error* _err) override { - BX_UNUSED(_data, _size, _err); - return 0; + BX_UNUSED(_data, _err); + return _size; } }; diff --git a/3rdparty/bx/src/filepath.cpp b/3rdparty/bx/src/filepath.cpp index e09ed59aee..f3a5431dd5 100644 --- a/3rdparty/bx/src/filepath.cpp +++ b/3rdparty/bx/src/filepath.cpp @@ -158,7 +158,7 @@ namespace bx uint32_t len = *_inOutSize; *_out = '\0'; - if (getenv(_name, _out, &len) ) + if (getEnv(_name, _out, &len) ) { FileInfo fi; if (stat(_out, fi) @@ -190,9 +190,13 @@ namespace bx static bool getCurrentPath(char* _out, uint32_t* _inOutSize) { uint32_t len = *_inOutSize; - pwd(_out, len); - *_inOutSize = strLen(_out); - return true; + if (NULL != pwd(_out, len)) + { + *_inOutSize = strLen(_out); + return true; + } + + return false; } static bool getHomePath(char* _out, uint32_t* _inOutSize) diff --git a/3rdparty/bx/src/math.cpp b/3rdparty/bx/src/math.cpp index cffe8c6e22..ba0676e96b 100644 --- a/3rdparty/bx/src/math.cpp +++ b/3rdparty/bx/src/math.cpp @@ -9,35 +9,21 @@ namespace bx { - const float kPi = 3.1415926535897932384626433832795f; - const float kPi2 = 6.2831853071795864769252867665590f; - const float kInvPi = 1.0f/kPi; - const float kPiHalf = 1.5707963267948966192313216916398f; - const float kPiQuarter = 0.7853981633974483096156608458199f; - const float kSqrt2 = 1.4142135623730950488016887242097f; - const float kLogNat10 = 2.3025850929940456840179914546844f; - const float kInvLogNat2 = 1.4426950408889634073599246810019f; - const float kLogNat2Hi = 0.6931471805599453094172321214582f; - const float kLogNat2Lo = 1.90821492927058770002e-10f; - const float kE = 2.7182818284590452353602874713527f; - const float kNearZero = 1.0f/float(1 << 28); - const float kFloatMin = 1.175494e-38f; - const float kFloatMax = 3.402823e+38f; - const float kInfinity = bitsToFloat(UINT32_C(0x7f800000) ); + const float kInfinity = bitsToFloat(UINT32_C(0x7f800000) ); namespace { - static const float kSinC2 = -0.16666667163372039794921875f; - static const float kSinC4 = 8.333347737789154052734375e-3f; - static const float kSinC6 = -1.9842604524455964565277099609375e-4f; - static const float kSinC8 = 2.760012648650445044040679931640625e-6f; - static const float kSinC10 = -2.50293279435709337121807038784027099609375e-8f; + constexpr float kSinC2 = -0.16666667163372039794921875f; + constexpr float kSinC4 = 8.333347737789154052734375e-3f; + constexpr float kSinC6 = -1.9842604524455964565277099609375e-4f; + constexpr float kSinC8 = 2.760012648650445044040679931640625e-6f; + constexpr float kSinC10 = -2.50293279435709337121807038784027099609375e-8f; - static const float kCosC2 = -0.5f; - static const float kCosC4 = 4.166664183139801025390625e-2f; - static const float kCosC6 = -1.388833043165504932403564453125e-3f; - static const float kCosC8 = 2.47562347794882953166961669921875e-5f; - static const float kCosC10 = -2.59630184018533327616751194000244140625e-7f; + constexpr float kCosC2 = -0.5f; + constexpr float kCosC4 = 4.166664183139801025390625e-2f; + constexpr float kCosC6 = -1.388833043165504932403564453125e-3f; + constexpr float kCosC8 = 2.47562347794882953166961669921875e-5f; + constexpr float kCosC10 = -2.59630184018533327616751194000244140625e-7f; } // namespace @@ -86,10 +72,10 @@ namespace bx namespace { - static const float kAcosC0 = 1.5707288f; - static const float kAcosC1 = -0.2121144f; - static const float kAcosC2 = 0.0742610f; - static const float kAcosC3 = -0.0187293f; + constexpr float kAcosC0 = 1.5707288f; + constexpr float kAcosC1 = -0.2121144f; + constexpr float kAcosC2 = 0.0742610f; + constexpr float kAcosC3 = -0.0187293f; } // namespace @@ -109,12 +95,12 @@ namespace bx namespace { - static const float kAtan2C0 = -0.013480470f; - static const float kAtan2C1 = 0.057477314f; - static const float kAtan2C2 = -0.121239071f; - static const float kAtan2C3 = 0.195635925f; - static const float kAtan2C4 = -0.332994597f; - static const float kAtan2C5 = 0.999995630f; + constexpr float kAtan2C0 = -0.013480470f; + constexpr float kAtan2C1 = 0.057477314f; + constexpr float kAtan2C2 = -0.121239071f; + constexpr float kAtan2C3 = 0.195635925f; + constexpr float kAtan2C4 = -0.332994597f; + constexpr float kAtan2C5 = 0.999995630f; } // namespace @@ -175,11 +161,11 @@ namespace bx namespace { - static const float kExpC0 = 1.66666666666666019037e-01f; - static const float kExpC1 = -2.77777777770155933842e-03f; - static const float kExpC2 = 6.61375632143793436117e-05f; - static const float kExpC3 = -1.65339022054652515390e-06f; - static const float kExpC4 = 4.13813679705723846039e-08f; + constexpr float kExpC0 = 1.66666666666666019037e-01f; + constexpr float kExpC1 = -2.77777777770155933842e-03f; + constexpr float kExpC2 = 6.61375632143793436117e-05f; + constexpr float kExpC3 = -1.65339022054652515390e-06f; + constexpr float kExpC4 = 4.13813679705723846039e-08f; } // namespace @@ -209,13 +195,13 @@ namespace bx namespace { - static const float kLogC0 = 6.666666666666735130e-01f; - static const float kLogC1 = 3.999999999940941908e-01f; - static const float kLogC2 = 2.857142874366239149e-01f; - static const float kLogC3 = 2.222219843214978396e-01f; - static const float kLogC4 = 1.818357216161805012e-01f; - static const float kLogC5 = 1.531383769920937332e-01f; - static const float kLogC6 = 1.479819860511658591e-01f; + constexpr float kLogC0 = 6.666666666666735130e-01f; + constexpr float kLogC1 = 3.999999999940941908e-01f; + constexpr float kLogC2 = 2.857142874366239149e-01f; + constexpr float kLogC3 = 2.222219843214978396e-01f; + constexpr float kLogC4 = 1.818357216161805012e-01f; + constexpr float kLogC5 = 1.531383769920937332e-01f; + constexpr float kLogC6 = 1.479819860511658591e-01f; } // namespace @@ -269,66 +255,48 @@ namespace bx return _a - fract(_a); } - void mtxLookAtImpl(float* _result, const float* _eye, const float* _view, const float* _up) + static void mtxLookAtImpl(float* _result, const Vec3& _eye, const Vec3& _view, const Vec3& _up) { - float up[3] = { 0.0f, 1.0f, 0.0f }; - if (NULL != _up) - { - up[0] = _up[0]; - up[1] = _up[1]; - up[2] = _up[2]; - } - - float tmp[4]; - vec3Cross(tmp, up, _view); - - float right[4]; - vec3Norm(right, tmp); - - vec3Cross(up, _view, right); + const Vec3 uxv = cross(_up, _view); + const Vec3 right = normalize(uxv); + const Vec3 up = cross(_view, right); memSet(_result, 0, sizeof(float)*16); - _result[ 0] = right[0]; - _result[ 1] = up[0]; - _result[ 2] = _view[0]; + _result[ 0] = right.x; + _result[ 1] = up.x; + _result[ 2] = _view.x; - _result[ 4] = right[1]; - _result[ 5] = up[1]; - _result[ 6] = _view[1]; + _result[ 4] = right.y; + _result[ 5] = up.y; + _result[ 6] = _view.y; - _result[ 8] = right[2]; - _result[ 9] = up[2]; - _result[10] = _view[2]; + _result[ 8] = right.z; + _result[ 9] = up.z; + _result[10] = _view.z; - _result[12] = -vec3Dot(right, _eye); - _result[13] = -vec3Dot(up, _eye); - _result[14] = -vec3Dot(_view, _eye); + _result[12] = -dot(right, _eye); + _result[13] = -dot(up, _eye); + _result[14] = -dot(_view, _eye); _result[15] = 1.0f; } - void mtxLookAtLh(float* _result, const float* _eye, const float* _at, const float* _up) + void mtxLookAtLh(float* _result, const Vec3& _eye, const Vec3& _at, const Vec3& _up) { - float tmp[4]; - vec3Sub(tmp, _at, _eye); - - float view[4]; - vec3Norm(view, tmp); + const Vec3 tmp = sub(_at, _eye); + const Vec3 view = normalize(tmp); mtxLookAtImpl(_result, _eye, view, _up); } - void mtxLookAtRh(float* _result, const float* _eye, const float* _at, const float* _up) + void mtxLookAtRh(float* _result, const Vec3& _eye, const Vec3& _at, const Vec3& _up) { - float tmp[4]; - vec3Sub(tmp, _eye, _at); - - float view[4]; - vec3Norm(view, tmp); + const Vec3 tmp = sub(_eye, _at); + const Vec3 view = normalize(tmp); mtxLookAtImpl(_result, _eye, view, _up); } - void mtxLookAt(float* _result, const float* _eye, const float* _at, const float* _up) + void mtxLookAt(float* _result, const Vec3& _eye, const Vec3& _at, const Vec3& _up) { mtxLookAtLh(_result, _eye, _at, _up); } diff --git a/3rdparty/bx/src/os.cpp b/3rdparty/bx/src/os.cpp index b90eae4dfe..0051d69389 100644 --- a/3rdparty/bx/src/os.cpp +++ b/3rdparty/bx/src/os.cpp @@ -171,10 +171,10 @@ namespace bx #endif // BX_PLATFORM_* } - void* dlopen(const char* _filePath) + void* dlopen(const FilePath& _filePath) { #if BX_PLATFORM_WINDOWS - return (void*)::LoadLibraryA(_filePath); + return (void*)::LoadLibraryA(_filePath.get() ); #elif BX_PLATFORM_EMSCRIPTEN \ || BX_PLATFORM_PS4 \ || BX_PLATFORM_XBOXONE \ @@ -183,7 +183,7 @@ namespace bx BX_UNUSED(_filePath); return NULL; #else - return ::dlopen(_filePath, RTLD_LOCAL|RTLD_LAZY); + return ::dlopen(_filePath.get(), RTLD_LOCAL|RTLD_LAZY); #endif // BX_PLATFORM_ } @@ -218,7 +218,7 @@ namespace bx #endif // BX_PLATFORM_ } - bool getenv(const char* _name, char* _out, uint32_t* _inOutSize) + bool getEnv(const char* _name, char* _out, uint32_t* _inOutSize) { #if BX_PLATFORM_WINDOWS DWORD len = ::GetEnvironmentVariableA(_name, _out, *_inOutSize); @@ -251,7 +251,7 @@ namespace bx #endif // BX_PLATFORM_ } - void setenv(const char* _name, const char* _value) + void setEnv(const char* _name, const char* _value) { #if BX_PLATFORM_WINDOWS ::SetEnvironmentVariableA(_name, _value); @@ -261,21 +261,14 @@ namespace bx || BX_CRT_NONE BX_UNUSED(_name, _value); #else - ::setenv(_name, _value, 1); -#endif // BX_PLATFORM_ - } - - void unsetenv(const char* _name) - { -#if BX_PLATFORM_WINDOWS - ::SetEnvironmentVariableA(_name, NULL); -#elif BX_PLATFORM_PS4 \ - || BX_PLATFORM_XBOXONE \ - || BX_PLATFORM_WINRT \ - || BX_CRT_NONE - BX_UNUSED(_name); -#else - ::unsetenv(_name); + if (NULL != _value) + { + ::setenv(_name, _value, 1); + } + else + { + ::unsetenv(_name); + } #endif // BX_PLATFORM_ } diff --git a/3rdparty/bx/src/sort.cpp b/3rdparty/bx/src/sort.cpp index 2dd3fa6df8..515b33f24f 100644 --- a/3rdparty/bx/src/sort.cpp +++ b/3rdparty/bx/src/sort.cpp @@ -27,12 +27,12 @@ namespace bx int32_t result = _fn(&data[ii*_stride], _pivot); if (0 > result) { - xchg(&data[ll*_stride], &data[ii*_stride], _stride); + swap(&data[ll*_stride], &data[ii*_stride], _stride); ++ll; } else if (0 == result) { - xchg(&data[gg*_stride], &data[ii*_stride], _stride); + swap(&data[gg*_stride], &data[ii*_stride], _stride); ++gg; ++ii; } diff --git a/3rdparty/bx/src/string.cpp b/3rdparty/bx/src/string.cpp index 3a25456fdf..e6b7179b60 100644 --- a/3rdparty/bx/src/string.cpp +++ b/3rdparty/bx/src/string.cpp @@ -9,10 +9,6 @@ #include #include -#if !BX_CRT_NONE -# include // vsnprintf -#endif // !BX_CRT_NONE - namespace bx { inline bool isInRange(char _ch, char _from, char _to) @@ -891,9 +887,9 @@ namespace bx } } // anonymous namespace - int32_t write(WriterI* _writer, const char* _format, va_list _argList, Error* _err) + int32_t write(WriterI* _writer, const StringView& _format, va_list _argList, Error* _err) { - MemoryReader reader(_format, uint32_t(strLen(_format) ) ); + MemoryReader reader(_format.getPtr(), _format.getLength() ); int32_t size = 0; @@ -1103,11 +1099,18 @@ namespace bx } } - size += write(_writer, '\0', _err); - return size; } + int32_t write(WriterI* _writer, Error* _err, const StringView* _format, ...) + { + va_list argList; + va_start(argList, _format); + int32_t total = write(_writer, *_format, argList, _err); + va_end(argList); + return total; + } + int32_t write(WriterI* _writer, Error* _err, const char* _format, ...) { va_list argList; @@ -1117,7 +1120,7 @@ namespace bx return total; } - int32_t vsnprintfRef(char* _out, int32_t _max, const char* _format, va_list _argList) + int32_t vsnprintf(char* _out, int32_t _max, const char* _format, va_list _argList) { if (1 < _max) { @@ -1132,6 +1135,7 @@ namespace bx if (err.isOk() ) { + size += write(&writer, '\0', &err); return size - 1 /* size without '\0' terminator */; } } @@ -1143,31 +1147,7 @@ namespace bx int32_t size = write(&sizer, _format, argListCopy, &err); va_end(argListCopy); - return size - 1 /* size without '\0' terminator */; - } - - int32_t vsnprintf(char* _out, int32_t _max, const char* _format, va_list _argList) - { - va_list argList; - va_copy(argList, _argList); - int32_t total = 0; -#if BX_CRT_NONE - total = vsnprintfRef(_out, _max, _format, argList); -#elif BX_CRT_MSVC - int32_t len = -1; - if (NULL != _out) - { - va_list argListCopy; - va_copy(argListCopy, _argList); - len = ::vsnprintf_s(_out, _max, size_t(-1), _format, argListCopy); - va_end(argListCopy); - } - total = -1 == len ? ::_vscprintf(_format, argList) : len; -#else - total = ::vsnprintf(_out, _max, _format, argList); -#endif // BX_COMPILER_MSVC - va_end(argList); - return total; + return size; } int32_t snprintf(char* _out, int32_t _max, const char* _format, ...) diff --git a/3rdparty/bx/tests/easing_test.cpp b/3rdparty/bx/tests/easing_test.cpp index 2107b71666..06944547f4 100644 --- a/3rdparty/bx/tests/easing_test.cpp +++ b/3rdparty/bx/tests/easing_test.cpp @@ -11,24 +11,25 @@ TEST_CASE("easing", "") { bx::WriterI* writer = bx::getNullOut(); + bx::Error err; for (uint32_t ee = 0; ee < bx::Easing::Count; ++ee) { - bx::writePrintf(writer, "\n\n%d\n", ee); + bx::write(writer, &err, "\n\n%d\n", ee); const bx::EaseFn easing = bx::getEaseFunc(bx::Easing::Enum(ee) ); const int32_t nx = 64; const int32_t ny = 10; - bx::writePrintf(writer, "\t/// ^\n"); + bx::write(writer, &err, "\t/// ^\n"); for (int32_t yy = ny+4; yy >= -5; --yy) { const float ys = float(yy )/float(ny); const float ye = float(yy+1.0)/float(ny); - bx::writePrintf(writer, "\t/// %c", yy != 0 ? '|' : '+'); + bx::write(writer, &err, "\t/// %c", yy != 0 ? '|' : '+'); for (int32_t xx = 0; xx < nx; ++xx) { @@ -41,18 +42,18 @@ TEST_CASE("easing", "") if (vv >= ys && vv < ye) { - bx::writePrintf(writer, "*"); + bx::write(writer, "*"); break; } } if (jj == 10) { - bx::writePrintf(writer, "%c", yy != 0 ? ' ' : '-'); + bx::write(writer, &err, "%c", yy != 0 ? ' ' : '-'); } } - bx::writePrintf(writer, "%s\n", yy != 0 ? "" : ">"); + bx::write(writer, &err, "%s\n", yy != 0 ? "" : ">"); } } } diff --git a/3rdparty/bx/tests/math_bench.cpp b/3rdparty/bx/tests/math_bench.cpp index 195b5f5461..50a8b3d230 100644 --- a/3rdparty/bx/tests/math_bench.cpp +++ b/3rdparty/bx/tests/math_bench.cpp @@ -25,8 +25,10 @@ float mathTest(const char* _name) result += mfn(xx); } + bx::Error err; + elapsed += bx::getHPCounter(); - bx::writePrintf(writer, "%-20s: %15f\n", _name, double(elapsed) ); + bx::write(writer, &err, "%-20s: %15f\n", _name, double(elapsed) ); return result; } @@ -39,40 +41,41 @@ float rsqrt(float _a) void math_bench() { bx::WriterI* writer = bx::getStdOut(); - bx::writePrintf(writer, "Math bench\n\n"); + bx::Error err; + bx::write(writer, &err, "Math bench\n\n"); mathTest< ::sqrtf >(" ::sqrtf"); mathTest("bx::sqrtRef"); mathTest("bx::sqrtSimd"); mathTest("bx::sqrt"); - bx::writePrintf(writer, "\n"); + bx::write(writer, &err, "\n"); mathTest< ::rsqrt >(" ::rsqrtf"); mathTest("bx::rsqrtRef"); mathTest("bx::rsqrtSimd"); mathTest("bx::rsqrt"); - bx::writePrintf(writer, "\n"); + bx::write(writer, &err, "\n"); mathTest< ::sinf >(" ::sinf"); mathTest("bx::sin"); - bx::writePrintf(writer, "\n"); + bx::write(writer, &err, "\n"); mathTest< ::asinf>(" ::asinf"); mathTest("bx::asin"); - bx::writePrintf(writer, "\n"); + bx::write(writer, &err, "\n"); mathTest< ::cosf >(" ::cosf"); mathTest("bx::cos"); - bx::writePrintf(writer, "\n"); + bx::write(writer, &err, "\n"); mathTest< ::acosf>(" ::acosf"); mathTest("bx::acos"); - bx::writePrintf(writer, "\n"); + bx::write(writer, &err, "\n"); mathTest< ::tanf >(" ::tanf"); mathTest("bx::tan"); - bx::writePrintf(writer, "\n"); + bx::write(writer, &err, "\n"); mathTest< ::atanf>(" ::atanf"); mathTest("bx::atan"); } diff --git a/3rdparty/bx/tests/math_test.cpp b/3rdparty/bx/tests/math_test.cpp index f6ef5c755a..2eeac28628 100644 --- a/3rdparty/bx/tests/math_test.cpp +++ b/3rdparty/bx/tests/math_test.cpp @@ -55,84 +55,98 @@ TEST_CASE("libm", "") REQUIRE(bx::equal( 0.89f, bx::fract( 13.89f), 0.000001f) ); REQUIRE(bx::equal(-0.89f, bx::fract(-13.89f), 0.000001f) ); + bx::Error err; + for (int32_t yy = -10; yy < 10; ++yy) { for (float xx = -100.0f; xx < 100.0f; xx += 0.1f) { - bx::writePrintf(writer, "ldexp(%f, %d) == %f (expected: %f)\n", xx, yy, bx::ldexp(xx, yy), ::ldexpf(xx, yy) ); + bx::write(writer, &err, "ldexp(%f, %d) == %f (expected: %f)\n", xx, yy, bx::ldexp(xx, yy), ::ldexpf(xx, yy) ); REQUIRE(bx::equal(bx::ldexp(xx, yy), ::ldexpf(xx, yy), 0.00001f) ); } } for (float xx = -80.0f; xx < 80.0f; xx += 0.1f) { - bx::writePrintf(writer, "exp(%f) == %f (expected: %f)\n", xx, bx::exp(xx), ::expf(xx) ); + bx::write(writer, &err, "exp(%f) == %f (expected: %f)\n", xx, bx::exp(xx), ::expf(xx) ); + REQUIRE(err.isOk() ); REQUIRE(bx::equal(bx::exp(xx), ::expf(xx), 0.00001f) ); } for (float xx = 0.0f; xx < 100.0f; xx += 0.1f) { - bx::writePrintf(writer, "rsqrt(%f) == %f (expected: %f)\n", xx, bx::rsqrt(xx), 1.0f/::sqrtf(xx) ); + bx::write(writer, &err, "rsqrt(%f) == %f (expected: %f)\n", xx, bx::rsqrt(xx), 1.0f/::sqrtf(xx) ); + REQUIRE(err.isOk() ); REQUIRE(bx::equal(bx::rsqrt(xx), 1.0f/::sqrtf(xx), 0.00001f) ); } for (float xx = 0.0f; xx < 100.0f; xx += 0.1f) { - bx::writePrintf(writer, "sqrt(%f) == %f (expected: %f)\n", xx, bx::sqrt(xx), ::sqrtf(xx) ); + bx::write(writer, &err, "sqrt(%f) == %f (expected: %f)\n", xx, bx::sqrt(xx), ::sqrtf(xx) ); + REQUIRE(err.isOk() ); REQUIRE(bx::equal(bx::sqrt(xx), ::sqrtf(xx), 0.00001f) ); } for (float xx = -100.0f; xx < 100.0f; xx += 0.1f) { - bx::writePrintf(writer, "pow(1.389f, %f) == %f (expected: %f)\n", xx, bx::pow(1.389f, xx), ::powf(1.389f, xx) ); + bx::write(writer, &err, "pow(1.389f, %f) == %f (expected: %f)\n", xx, bx::pow(1.389f, xx), ::powf(1.389f, xx) ); + REQUIRE(err.isOk() ); REQUIRE(bx::equal(bx::pow(1.389f, xx), ::powf(1.389f, xx), 0.00001f) ); } for (float xx = -1.0f; xx < 1.0f; xx += 0.001f) { - bx::writePrintf(writer, "asin(%f) == %f (expected: %f)\n", xx, bx::asin(xx), ::asinf(xx) ); + bx::write(writer, &err, "asin(%f) == %f (expected: %f)\n", xx, bx::asin(xx), ::asinf(xx) ); + REQUIRE(err.isOk() ); REQUIRE(bx::equal(bx::asin(xx), ::asinf(xx), 0.0001f) ); } for (float xx = -100.0f; xx < 100.0f; xx += 0.1f) { - bx::writePrintf(writer, "sin(%f) == %f (expected: %f)\n", xx, bx::sin(xx), ::sinf(xx) ); + bx::write(writer, &err, "sin(%f) == %f (expected: %f)\n", xx, bx::sin(xx), ::sinf(xx) ); + REQUIRE(err.isOk() ); REQUIRE(bx::equal(bx::sin(xx), ::sinf(xx), 0.00001f) ); } for (float xx = -1.0f; xx < 1.0f; xx += 0.1f) { - bx::writePrintf(writer, "sinh(%f) == %f (expected: %f)\n", xx, bx::sinh(xx), ::sinhf(xx) ); + bx::write(writer, &err, "sinh(%f) == %f (expected: %f)\n", xx, bx::sinh(xx), ::sinhf(xx) ); + REQUIRE(err.isOk() ); REQUIRE(bx::equal(bx::sinh(xx), ::sinhf(xx), 0.00001f) ); } for (float xx = -1.0f; xx < 1.0f; xx += 0.001f) { - bx::writePrintf(writer, "acos(%f) == %f (expected: %f\n)", xx, bx::acos(xx), ::acosf(xx) ); + bx::write(writer, &err, "acos(%f) == %f (expected: %f\n)", xx, bx::acos(xx), ::acosf(xx) ); + REQUIRE(err.isOk() ); REQUIRE(bx::equal(bx::acos(xx), ::acosf(xx), 0.0001f) ); } for (float xx = -100.0f; xx < 100.0f; xx += 0.1f) { - bx::writePrintf(writer, "cos(%f) == %f (expected: %f)\n", xx, bx::cos(xx), ::cosf(xx) ); + bx::write(writer, &err, "cos(%f) == %f (expected: %f)\n", xx, bx::cos(xx), ::cosf(xx) ); + REQUIRE(err.isOk() ); REQUIRE(bx::equal(bx::cos(xx), ::cosf(xx), 0.00001f) ); } for (float xx = -100.0f; xx < 100.0f; xx += 0.1f) { - bx::writePrintf(writer, "tan(%f) == %f (expected: %f)\n", xx, bx::tan(xx), ::tanf(xx) ); + bx::write(writer, &err, "tan(%f) == %f (expected: %f)\n", xx, bx::tan(xx), ::tanf(xx) ); + REQUIRE(err.isOk() ); REQUIRE(bx::equal(bx::tan(xx), ::tanf(xx), 0.001f) ); } for (float xx = -1.0f; xx < 1.0f; xx += 0.1f) { - bx::writePrintf(writer, "tanh(%f) == %f (expected: %f\n", xx, bx::tanh(xx), ::tanhf(xx) ); + bx::write(writer, &err, "tanh(%f) == %f (expected: %f\n", xx, bx::tanh(xx), ::tanhf(xx) ); + REQUIRE(err.isOk() ); REQUIRE(bx::equal(bx::tanh(xx), ::tanhf(xx), 0.00001f) ); } for (float xx = -100.0f; xx < 100.0f; xx += 0.1f) { - bx::writePrintf(writer, "atan(%f) == %f (expected: %f)\n", xx, bx::atan(xx), ::atanf(xx) ); + bx::write(writer, &err, "atan(%f) == %f (expected: %f)\n", xx, bx::atan(xx), ::atanf(xx) ); + REQUIRE(err.isOk() ); REQUIRE(bx::equal(bx::atan(xx), ::atanf(xx), 0.00001f) ); } @@ -140,7 +154,8 @@ TEST_CASE("libm", "") { for (float xx = -100.0f; xx < 100.0f; xx += 0.1f) { - bx::writePrintf(writer, "atan2(%f, %f) == %f (expected: %f)\n", yy, xx, bx::atan2(yy, xx), ::atan2f(yy, xx) ); + bx::write(writer, &err, "atan2(%f, %f) == %f (expected: %f)\n", yy, xx, bx::atan2(yy, xx), ::atan2f(yy, xx) ); + REQUIRE(err.isOk() ); REQUIRE(bx::equal(bx::atan2(yy, xx), ::atan2f(yy, xx), 0.00001f) ); } } diff --git a/3rdparty/bx/tests/rng_test.cpp b/3rdparty/bx/tests/rng_test.cpp index d8bb85fd9f..b5161f7167 100644 --- a/3rdparty/bx/tests/rng_test.cpp +++ b/3rdparty/bx/tests/rng_test.cpp @@ -41,38 +41,40 @@ void testRng(const char* _name, Ty* _rng) } bx::WriterI* writer = bx::getNullOut(); - bx::writePrintf(writer, "%s\n", _name); + bx::Error err; + + bx::write(writer, &err, "%s\n", _name); { - bx::writePrintf(writer, "\tbits histogram:\n"); + bx::write(writer, &err, "\tbits histogram:\n"); uint32_t min = UINT32_MAX; uint32_t max = 0; for (uint32_t ii = 0; ii < BX_COUNTOF(histBits); ++ii) { - bx::writePrintf(writer, "\t\t%3d: %d\n", ii, histBits[ii]); + bx::write(writer, &err, "\t\t%3d: %d\n", ii, histBits[ii]); min = bx::min(min, histBits[ii]); max = bx::max(max, histBits[ii]); } - bx::writePrintf(writer, "\tmin: %d, max: %d (diff: %d)\n", min, max, max-min); + bx::write(writer, &err, "\tmin: %d, max: %d (diff: %d)\n", min, max, max-min); REQUIRE(max-min < 8000); } { - bx::writePrintf(writer, "\tuint8_t histogram:\n"); + bx::write(writer, &err, "\tuint8_t histogram:\n"); uint32_t min = UINT32_MAX; uint32_t max = 0; for (uint32_t ii = 0; ii < BX_COUNTOF(histUint8); ++ii) { - bx::writePrintf(writer, "\t\t%3d: %d\n", ii, histUint8[ii]); + bx::write(writer, &err, "\t\t%3d: %d\n", ii, histUint8[ii]); min = bx::min(min, histUint8[ii]); max = bx::max(max, histUint8[ii]); } - bx::writePrintf(writer, "\tmin: %d, max: %d (diff: %d)\n", min, max, max-min); + bx::write(writer, &err, "\tmin: %d, max: %d (diff: %d)\n", min, max, max-min); REQUIRE(max-min < 8000); } diff --git a/3rdparty/bx/tests/simd_bench.cpp b/3rdparty/bx/tests/simd_bench.cpp index 38ba40773b..66e26297aa 100644 --- a/3rdparty/bx/tests/simd_bench.cpp +++ b/3rdparty/bx/tests/simd_bench.cpp @@ -111,7 +111,7 @@ void simd_bench() for (uint32_t ii = 0; ii < numVertices; ++ii) { float* ptr = (float*)&src[ii]; - randUnitSphere(ptr, &rng); + bx::store(ptr, bx::randUnitSphere(&rng) ); ptr[3] = 1.0f; } diff --git a/3rdparty/bx/tests/string_test.cpp b/3rdparty/bx/tests/string_test.cpp index 180d5ea4e5..b7c4ed8ab5 100644 --- a/3rdparty/bx/tests/string_test.cpp +++ b/3rdparty/bx/tests/string_test.cpp @@ -318,15 +318,16 @@ TEST_CASE("toString double", "") REQUIRE(testToString(-79.39773355813419, "-79.39773355813419") ); } -static bool testFromString(double _value, const char* _input) +template +static bool testFromString(Ty _value, const char* _input) { char tmp[1024]; bx::toString(tmp, BX_COUNTOF(tmp), _value); - double lhs; + Ty lhs; bx::fromString(&lhs, tmp); - double rhs; + Ty rhs; bx::fromString(&rhs, _input); if (lhs == rhs) @@ -338,33 +339,57 @@ static bool testFromString(double _value, const char* _input) return false; } +TEST_CASE("fromString float", "") +{ + REQUIRE(testFromString(std::numeric_limits::min(), "1.175494351e-38") ); + REQUIRE(testFromString(std::numeric_limits::lowest(), "-3.402823466e+38") ); + REQUIRE(testFromString(std::numeric_limits::max(), "3.402823466e+38") ); +} + TEST_CASE("fromString double", "") { - REQUIRE(testFromString(0.0, "0.0") ); - REQUIRE(testFromString(-0.0, "-0.0") ); - REQUIRE(testFromString(1.0, "1.0") ); - REQUIRE(testFromString(-1.0, "-1.0") ); - REQUIRE(testFromString(1.2345, "1.2345") ); - REQUIRE(testFromString(1.2345678, "1.2345678") ); - REQUIRE(testFromString(0.123456789012, "0.123456789012") ); - REQUIRE(testFromString(1234567.8, "1234567.8") ); - REQUIRE(testFromString(-79.39773355813419, "-79.39773355813419") ); - REQUIRE(testFromString(0.000001, "0.000001") ); - REQUIRE(testFromString(0.0000001, "1e-7") ); - REQUIRE(testFromString(1e30, "1e30") ); - REQUIRE(testFromString(1.234567890123456e30, "1.234567890123456e30") ); - REQUIRE(testFromString(-5e-324, "-5e-324") ); - REQUIRE(testFromString(2.225073858507201e-308, "2.225073858507201e-308") ); - REQUIRE(testFromString(2.2250738585072014e-308, "2.2250738585072014e-308") ); - REQUIRE(testFromString(1.7976931348623157e308, "1.7976931348623157e308") ); - REQUIRE(testFromString(0.00000123123123, "0.00000123123123") ); - REQUIRE(testFromString(0.000000123123123, "1.23123123e-7") ); - REQUIRE(testFromString(123123.123, "123123.123") ); - REQUIRE(testFromString(1231231.23, "1231231.23") ); - REQUIRE(testFromString(0.000000000123123, "1.23123e-10") ); - REQUIRE(testFromString(0.0000000001, "1e-10") ); - REQUIRE(testFromString(-270.000000, "-270.0") ); - REQUIRE(testFromString(2.2250738585072011e-308, "2.2250738585072011e-308") ); + REQUIRE(testFromString(0.0, "0.0") ); + REQUIRE(testFromString(-0.0, "-0.0") ); + REQUIRE(testFromString(1.0, "1.0") ); + REQUIRE(testFromString(-1.0, "-1.0") ); + REQUIRE(testFromString(1.2345, "1.2345") ); + REQUIRE(testFromString(1.2345678, "1.2345678") ); + REQUIRE(testFromString(0.123456789012, "0.123456789012") ); + REQUIRE(testFromString(123456.789, "123456.789") ); + REQUIRE(testFromString(1234567.8, "1234567.8") ); + REQUIRE(testFromString(-79.39773355813419, "-79.39773355813419") ); + REQUIRE(testFromString(0.000001, "0.000001") ); + REQUIRE(testFromString(0.0000001, "1e-7") ); + REQUIRE(testFromString(1e30, "1e30") ); + REQUIRE(testFromString(1.234567890123456e30, "1.234567890123456e30") ); + REQUIRE(testFromString(-5e-324, "-5e-324") ); + REQUIRE(testFromString(2.225073858507201e-308, "2.225073858507201e-308") ); + REQUIRE(testFromString(2.2250738585072014e-308, "2.2250738585072014e-308") ); + REQUIRE(testFromString(1.7976931348623157e308, "1.7976931348623157e308") ); + REQUIRE(testFromString(0.00000123123123, "0.00000123123123") ); + REQUIRE(testFromString(0.000000123123123, "1.23123123e-7") ); + REQUIRE(testFromString(123123.123, "123123.123") ); + REQUIRE(testFromString(1231231.23, "1231231.23") ); + REQUIRE(testFromString(0.000000000123123, "1.23123e-10") ); + REQUIRE(testFromString(0.0000000001, "1e-10") ); + REQUIRE(testFromString(-270.000000, "-270.0") ); + REQUIRE(testFromString(2.2250738585072011e-308, "2.2250738585072011e-308") ); // https://web.archive.org/web/20181112222123/https://www.exploringbinary.com/php-hangs-on-numeric-value-2-2250738585072011e-308/ + REQUIRE(testFromString(2.2250738585072009e-308, "2.2250738585072009e-308") ); // Max subnormal double + REQUIRE(testFromString(4.9406564584124654e-324, "4.9406564584124654e-324") ); // Min denormal + REQUIRE(testFromString(1.7976931348623157e+308, "1.7976931348623157e+308") ); // Max double + +// warning: magnitude of floating-point constant too small for type 'double'; minimum is 4.9406564584124654E-324 +// REQUIRE(testFromString(1e-10000, "0.0") ); // Must underflow +// integer literal is too large to be represented in any integer type +// REQUIRE(testFromString(18446744073709551616, "18446744073709551616.0") ); // 2^64 (max of uint64_t + 1, force to use double) +// REQUIRE(testFromString(-9223372036854775809, "-9223372036854775809.0") ); // -2^63 - 1(min of int64_t + 1, force to use double) + + REQUIRE(testFromString(0.9868011474609375, "0.9868011474609375") ); // https://github.com/miloyip/rapidjson/issues/120 + REQUIRE(testFromString(123e34, "123e34") ); + REQUIRE(testFromString(45913141877270640000.0, "45913141877270640000.0") ); + REQUIRE(testFromString(std::numeric_limits::min(), "2.2250738585072014e-308") ); + REQUIRE(testFromString(std::numeric_limits::lowest(), "-1.7976931348623158e+308") ); + REQUIRE(testFromString(std::numeric_limits::max(), "1.7976931348623158e+308") ); } static bool testFromString(int32_t _value, const char* _input) @@ -464,6 +489,5 @@ TEST_CASE("strFindBlock", "") const bx::StringView test1(test0, 1); bx::StringView result = bx::strFindBlock(test1, '{', '}'); - printf("%.*s", result.getLength(), result.getPtr() ); REQUIRE(19 == result.getLength() ); } diff --git a/3rdparty/bx/tests/vsnprintf_test.cpp b/3rdparty/bx/tests/vsnprintf_test.cpp index 035c17bec0..4d6480c32e 100644 --- a/3rdparty/bx/tests/vsnprintf_test.cpp +++ b/3rdparty/bx/tests/vsnprintf_test.cpp @@ -5,6 +5,8 @@ #include "test.h" #include +#include + #include #include @@ -173,3 +175,18 @@ TEST_CASE("vsnprintf", "") , world.getLength(), world.getPtr() ) ); } + +TEST_CASE("vsnprintf write") +{ + char tmp[64]; + bx::StaticMemoryBlock mb(tmp, sizeof(tmp)); + bx::MemoryWriter writer(&mb); + + bx::Error err; + int32_t len = bx::write(&writer, &err, "%d", 1389); + REQUIRE(err.isOk()); + REQUIRE(len == 4); + + bx::StringView str(tmp, len); + REQUIRE(0 == bx::strCmp(str, "1389") ); +} diff --git a/3rdparty/bx/tools/bin/darwin/genie b/3rdparty/bx/tools/bin/darwin/genie index b9cf8e1573..530e05ffff 100755 Binary files a/3rdparty/bx/tools/bin/darwin/genie and b/3rdparty/bx/tools/bin/darwin/genie differ diff --git a/3rdparty/bx/tools/bin/linux/genie b/3rdparty/bx/tools/bin/linux/genie index a39cbbcfd8..71169a6fa1 100755 Binary files a/3rdparty/bx/tools/bin/linux/genie and b/3rdparty/bx/tools/bin/linux/genie differ diff --git a/3rdparty/bx/tools/bin/windows/genie.exe b/3rdparty/bx/tools/bin/windows/genie.exe index 1cf18f8042..ce1cbd1996 100644 Binary files a/3rdparty/bx/tools/bin/windows/genie.exe and b/3rdparty/bx/tools/bin/windows/genie.exe differ diff --git a/3rdparty/bx/tools/bin2c/bin2c.cpp b/3rdparty/bx/tools/bin2c/bin2c.cpp index da3d239eca..2c7f48d1de 100644 --- a/3rdparty/bx/tools/bin2c/bin2c.cpp +++ b/3rdparty/bx/tools/bin2c/bin2c.cpp @@ -35,8 +35,11 @@ class Bin2cWriter : public bx::WriterI const char* data = (const char*)m_mb.more(0); uint32_t size = uint32_t(bx::seek(&m_mw) ); - bx::writePrintf( + bx::Error err; + + bx::write( m_writer + , &err , "static const uint8_t %.*s[%d] =\n{\n" , m_name.getLength() , m_name.getPtr() @@ -60,7 +63,7 @@ class Bin2cWriter : public bx::WriterI if (HEX_DUMP_WIDTH == asciiPos) { ascii[asciiPos] = '\0'; - bx::writePrintf(m_writer, "\t" HEX_DUMP_FORMAT "// %s\n", hex, ascii); + bx::write(m_writer, &err, "\t" HEX_DUMP_FORMAT "// %s\n", hex, ascii); data += asciiPos; hexPos = 0; asciiPos = 0; @@ -70,11 +73,11 @@ class Bin2cWriter : public bx::WriterI if (0 != asciiPos) { ascii[asciiPos] = '\0'; - bx::writePrintf(m_writer, "\t" HEX_DUMP_FORMAT "// %s\n", hex, ascii); + bx::write(m_writer, &err, "\t" HEX_DUMP_FORMAT "// %s\n", hex, ascii); } } - bx::writePrintf(m_writer, "};\n"); + bx::write(m_writer, &err, "};\n"); #undef HEX_DUMP_WIDTH #undef HEX_DUMP_SPACE_WIDTH #undef HEX_DUMP_FORMAT @@ -88,19 +91,20 @@ class Bin2cWriter : public bx::WriterI void help(const char* _error = NULL) { bx::WriterI* stdOut = bx::getStdOut(); + bx::Error err; if (NULL != _error) { - bx::writePrintf(stdOut, "Error:\n%s\n\n", _error); + bx::write(stdOut, &err, "Error:\n%s\n\n", _error); } - bx::writePrintf(stdOut + bx::write(stdOut, &err , "bin2c, binary to C\n" "Copyright 2011-2018 Branimir Karadzic. All rights reserved.\n" "License: https://github.com/bkaradzic/bx#license-bsd-2-clause\n\n" ); - bx::writePrintf(stdOut + bx::write(stdOut, &err , "Usage: bin2c -f -o -n \n" "\n" "Options:\n" diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua index a14810e969..87b579ef56 100644 --- a/scripts/toolchain.lua +++ b/scripts/toolchain.lua @@ -139,7 +139,7 @@ function toolchain(build_dir, lib_dir) "-msse2", } buildoptions_cpp { - "-std=c++0x", + "-std=c++14", } links { "dl", @@ -180,7 +180,7 @@ function toolchain(build_dir, lib_dir) "-Wunused-value", } buildoptions_cpp { - "-std=c++0x", + "-std=c++14", } linkoptions { "-no-canonical-prefixes", @@ -227,7 +227,7 @@ function toolchain(build_dir, lib_dir) "-Wundef", } buildoptions_cpp { - "-std=c++0x", + "-std=c++14", } linkoptions { "-Wl,--gc-sections",