Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ae6ff4449e | |||
| f47540b48c | |||
| e12fbae17c | |||
| 2399107fdf | |||
| 97c848c521 | |||
| 7706dcb7cd | |||
| 29791bcacf | |||
| eb6f737895 | |||
| 560b363ad2 | |||
| 1883310ea3 | |||
| 14791630f9 | |||
| b9914a8aab | |||
| 435838e89c | |||
| 19cc11cf91 | |||
| 9820a2a7c3 | |||
| 5641a2ce70 | |||
| d0ec3f33e7 | |||
| 233689a6bc | |||
| 92c17c35ec | |||
| 73a4555c9d | |||
| d9f4b4b600 | |||
| 3d765e26bf | |||
| bb3950804f | |||
| 0b1da09106 |
+1
-1
@@ -12,7 +12,7 @@
|
||||
[submodule "llvm"]
|
||||
path = llvm
|
||||
url = https://github.com/llvm-mirror/llvm
|
||||
branch = release_36
|
||||
branch = release_37
|
||||
[submodule "minidx9"]
|
||||
path = minidx9
|
||||
url = https://github.com/hrydgard/minidx9.git
|
||||
|
||||
@@ -249,7 +249,6 @@ bool fs::is_dir(const std::string& path)
|
||||
{
|
||||
case ERROR_FILE_NOT_FOUND: errno = ENOENT; break;
|
||||
case ERROR_PATH_NOT_FOUND: errno = ENOENT; break;
|
||||
default: throw EXCEPTION("Unknown Win32 error: 0x%x (%s).", error, path);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -687,10 +686,8 @@ u64 fs::file::read(void* buffer, u64 count) const
|
||||
switch (DWORD error = GetLastError())
|
||||
{
|
||||
case ERROR_INVALID_HANDLE: errno = EBADF; break;
|
||||
default: throw EXCEPTION("Unknown Win32 error: 0x%x.", error);
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
return nread;
|
||||
|
||||
@@ -1131,7 +1131,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
||||
// Throw virtual memory access violation exception
|
||||
[[noreturn]] void throw_access_violation(const char* cause, u32 address) // Don't change function definition
|
||||
{
|
||||
throw EXCEPTION("Access violation %s location 0x%08x", cause, address);
|
||||
//throw EXCEPTION("Access violation %s location 0x%08x", cause, address);
|
||||
}
|
||||
|
||||
// Modify context in order to convert hardware exception to C++ exception
|
||||
|
||||
+1
-1
Submodule llvm updated: 19ade095e8...33c352b3ed
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -210,15 +210,19 @@ interface ID2D1GeometryRealization
|
||||
|
||||
#define ID2D1GeometryRealization_QueryInterface(This, riid, ppv) \
|
||||
((This)->lpVtbl->Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
|
||||
#pragma deprecated("ID2D1GeometryRealization_QueryInterface")
|
||||
|
||||
#define ID2D1GeometryRealization_AddRef(This) \
|
||||
((This)->lpVtbl->Base.Base.AddRef((IUnknown *)This))
|
||||
#pragma deprecated("ID2D1GeometryRealization_AddRef")
|
||||
|
||||
#define ID2D1GeometryRealization_Release(This) \
|
||||
((This)->lpVtbl->Base.Base.Release((IUnknown *)This))
|
||||
#pragma deprecated("ID2D1GeometryRealization_Release")
|
||||
|
||||
#define ID2D1GeometryRealization_GetFactory(This, factory) \
|
||||
((This)->lpVtbl->Base.GetFactory((ID2D1Resource *)This, factory))
|
||||
#pragma deprecated("ID2D1GeometryRealization_GetFactory")
|
||||
|
||||
typedef interface ID2D1DeviceContext1 ID2D1DeviceContext1;
|
||||
|
||||
@@ -259,264 +263,351 @@ interface ID2D1DeviceContext1
|
||||
|
||||
#define ID2D1DeviceContext1_QueryInterface(This, riid, ppv) \
|
||||
((This)->lpVtbl->Base.Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
|
||||
#pragma deprecated("ID2D1DeviceContext1_QueryInterface")
|
||||
|
||||
#define ID2D1DeviceContext1_AddRef(This) \
|
||||
((This)->lpVtbl->Base.Base.Base.Base.AddRef((IUnknown *)This))
|
||||
#pragma deprecated("ID2D1DeviceContext1_AddRef")
|
||||
|
||||
#define ID2D1DeviceContext1_Release(This) \
|
||||
((This)->lpVtbl->Base.Base.Base.Base.Release((IUnknown *)This))
|
||||
#pragma deprecated("ID2D1DeviceContext1_Release")
|
||||
|
||||
#define ID2D1DeviceContext1_GetFactory(This, factory) \
|
||||
((This)->lpVtbl->Base.Base.Base.GetFactory((ID2D1Resource *)This, factory))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetFactory")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateSharedBitmap(This, riid, data, bitmapProperties, bitmap) \
|
||||
((This)->lpVtbl->Base.Base.CreateSharedBitmap((ID2D1RenderTarget *)This, riid, data, bitmapProperties, bitmap))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateSharedBitmap")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateSolidColorBrush(This, color, brushProperties, solidColorBrush) \
|
||||
((This)->lpVtbl->Base.Base.CreateSolidColorBrush((ID2D1RenderTarget *)This, color, brushProperties, solidColorBrush))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateSolidColorBrush")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateLinearGradientBrush(This, linearGradientBrushProperties, brushProperties, gradientStopCollection, linearGradientBrush) \
|
||||
((This)->lpVtbl->Base.Base.CreateLinearGradientBrush((ID2D1RenderTarget *)This, linearGradientBrushProperties, brushProperties, gradientStopCollection, linearGradientBrush))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateLinearGradientBrush")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateRadialGradientBrush(This, radialGradientBrushProperties, brushProperties, gradientStopCollection, radialGradientBrush) \
|
||||
((This)->lpVtbl->Base.Base.CreateRadialGradientBrush((ID2D1RenderTarget *)This, radialGradientBrushProperties, brushProperties, gradientStopCollection, radialGradientBrush))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateRadialGradientBrush")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateCompatibleRenderTarget(This, desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget) \
|
||||
((This)->lpVtbl->Base.Base.CreateCompatibleRenderTarget((ID2D1RenderTarget *)This, desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateCompatibleRenderTarget")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateLayer(This, size, layer) \
|
||||
((This)->lpVtbl->Base.Base.CreateLayer((ID2D1RenderTarget *)This, size, layer))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateLayer")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateMesh(This, mesh) \
|
||||
((This)->lpVtbl->Base.Base.CreateMesh((ID2D1RenderTarget *)This, mesh))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateMesh")
|
||||
|
||||
#define ID2D1DeviceContext1_DrawLine(This, point0, point1, brush, strokeWidth, strokeStyle) \
|
||||
((This)->lpVtbl->Base.Base.DrawLine((ID2D1RenderTarget *)This, point0, point1, brush, strokeWidth, strokeStyle))
|
||||
#pragma deprecated("ID2D1DeviceContext1_DrawLine")
|
||||
|
||||
#define ID2D1DeviceContext1_DrawRectangle(This, rect, brush, strokeWidth, strokeStyle) \
|
||||
((This)->lpVtbl->Base.Base.DrawRectangle((ID2D1RenderTarget *)This, rect, brush, strokeWidth, strokeStyle))
|
||||
#pragma deprecated("ID2D1DeviceContext1_DrawRectangle")
|
||||
|
||||
#define ID2D1DeviceContext1_FillRectangle(This, rect, brush) \
|
||||
((This)->lpVtbl->Base.Base.FillRectangle((ID2D1RenderTarget *)This, rect, brush))
|
||||
#pragma deprecated("ID2D1DeviceContext1_FillRectangle")
|
||||
|
||||
#define ID2D1DeviceContext1_DrawRoundedRectangle(This, roundedRect, brush, strokeWidth, strokeStyle) \
|
||||
((This)->lpVtbl->Base.Base.DrawRoundedRectangle((ID2D1RenderTarget *)This, roundedRect, brush, strokeWidth, strokeStyle))
|
||||
#pragma deprecated("ID2D1DeviceContext1_DrawRoundedRectangle")
|
||||
|
||||
#define ID2D1DeviceContext1_FillRoundedRectangle(This, roundedRect, brush) \
|
||||
((This)->lpVtbl->Base.Base.FillRoundedRectangle((ID2D1RenderTarget *)This, roundedRect, brush))
|
||||
#pragma deprecated("ID2D1DeviceContext1_FillRoundedRectangle")
|
||||
|
||||
#define ID2D1DeviceContext1_DrawEllipse(This, ellipse, brush, strokeWidth, strokeStyle) \
|
||||
((This)->lpVtbl->Base.Base.DrawEllipse((ID2D1RenderTarget *)This, ellipse, brush, strokeWidth, strokeStyle))
|
||||
#pragma deprecated("ID2D1DeviceContext1_DrawEllipse")
|
||||
|
||||
#define ID2D1DeviceContext1_FillEllipse(This, ellipse, brush) \
|
||||
((This)->lpVtbl->Base.Base.FillEllipse((ID2D1RenderTarget *)This, ellipse, brush))
|
||||
#pragma deprecated("ID2D1DeviceContext1_FillEllipse")
|
||||
|
||||
#define ID2D1DeviceContext1_DrawGeometry(This, geometry, brush, strokeWidth, strokeStyle) \
|
||||
((This)->lpVtbl->Base.Base.DrawGeometry((ID2D1RenderTarget *)This, geometry, brush, strokeWidth, strokeStyle))
|
||||
#pragma deprecated("ID2D1DeviceContext1_DrawGeometry")
|
||||
|
||||
#define ID2D1DeviceContext1_FillGeometry(This, geometry, brush, opacityBrush) \
|
||||
((This)->lpVtbl->Base.Base.FillGeometry((ID2D1RenderTarget *)This, geometry, brush, opacityBrush))
|
||||
#pragma deprecated("ID2D1DeviceContext1_FillGeometry")
|
||||
|
||||
#define ID2D1DeviceContext1_FillMesh(This, mesh, brush) \
|
||||
((This)->lpVtbl->Base.Base.FillMesh((ID2D1RenderTarget *)This, mesh, brush))
|
||||
#pragma deprecated("ID2D1DeviceContext1_FillMesh")
|
||||
|
||||
#define ID2D1DeviceContext1_DrawText(This, string, stringLength, textFormat, layoutRect, defaultForegroundBrush, options, measuringMode) \
|
||||
((This)->lpVtbl->Base.Base.DrawText((ID2D1RenderTarget *)This, string, stringLength, textFormat, layoutRect, defaultForegroundBrush, options, measuringMode))
|
||||
#pragma deprecated("ID2D1DeviceContext1_DrawText")
|
||||
|
||||
#define ID2D1DeviceContext1_DrawTextLayout(This, origin, textLayout, defaultForegroundBrush, options) \
|
||||
((This)->lpVtbl->Base.Base.DrawTextLayout((ID2D1RenderTarget *)This, origin, textLayout, defaultForegroundBrush, options))
|
||||
#pragma deprecated("ID2D1DeviceContext1_DrawTextLayout")
|
||||
|
||||
#define ID2D1DeviceContext1_SetTransform(This, transform) \
|
||||
((This)->lpVtbl->Base.Base.SetTransform((ID2D1RenderTarget *)This, transform))
|
||||
#pragma deprecated("ID2D1DeviceContext1_SetTransform")
|
||||
|
||||
#define ID2D1DeviceContext1_GetTransform(This, transform) \
|
||||
((This)->lpVtbl->Base.Base.GetTransform((ID2D1RenderTarget *)This, transform))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetTransform")
|
||||
|
||||
#define ID2D1DeviceContext1_SetAntialiasMode(This, antialiasMode) \
|
||||
((This)->lpVtbl->Base.Base.SetAntialiasMode((ID2D1RenderTarget *)This, antialiasMode))
|
||||
#pragma deprecated("ID2D1DeviceContext1_SetAntialiasMode")
|
||||
|
||||
#define ID2D1DeviceContext1_GetAntialiasMode(This) \
|
||||
((This)->lpVtbl->Base.Base.GetAntialiasMode((ID2D1RenderTarget *)This))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetAntialiasMode")
|
||||
|
||||
#define ID2D1DeviceContext1_SetTextAntialiasMode(This, textAntialiasMode) \
|
||||
((This)->lpVtbl->Base.Base.SetTextAntialiasMode((ID2D1RenderTarget *)This, textAntialiasMode))
|
||||
#pragma deprecated("ID2D1DeviceContext1_SetTextAntialiasMode")
|
||||
|
||||
#define ID2D1DeviceContext1_GetTextAntialiasMode(This) \
|
||||
((This)->lpVtbl->Base.Base.GetTextAntialiasMode((ID2D1RenderTarget *)This))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetTextAntialiasMode")
|
||||
|
||||
#define ID2D1DeviceContext1_SetTextRenderingParams(This, textRenderingParams) \
|
||||
((This)->lpVtbl->Base.Base.SetTextRenderingParams((ID2D1RenderTarget *)This, textRenderingParams))
|
||||
#pragma deprecated("ID2D1DeviceContext1_SetTextRenderingParams")
|
||||
|
||||
#define ID2D1DeviceContext1_GetTextRenderingParams(This, textRenderingParams) \
|
||||
((This)->lpVtbl->Base.Base.GetTextRenderingParams((ID2D1RenderTarget *)This, textRenderingParams))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetTextRenderingParams")
|
||||
|
||||
#define ID2D1DeviceContext1_SetTags(This, tag1, tag2) \
|
||||
((This)->lpVtbl->Base.Base.SetTags((ID2D1RenderTarget *)This, tag1, tag2))
|
||||
#pragma deprecated("ID2D1DeviceContext1_SetTags")
|
||||
|
||||
#define ID2D1DeviceContext1_GetTags(This, tag1, tag2) \
|
||||
((This)->lpVtbl->Base.Base.GetTags((ID2D1RenderTarget *)This, tag1, tag2))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetTags")
|
||||
|
||||
#define ID2D1DeviceContext1_PopLayer(This) \
|
||||
((This)->lpVtbl->Base.Base.PopLayer((ID2D1RenderTarget *)This))
|
||||
#pragma deprecated("ID2D1DeviceContext1_PopLayer")
|
||||
|
||||
#define ID2D1DeviceContext1_Flush(This, tag1, tag2) \
|
||||
((This)->lpVtbl->Base.Base.Flush((ID2D1RenderTarget *)This, tag1, tag2))
|
||||
#pragma deprecated("ID2D1DeviceContext1_Flush")
|
||||
|
||||
#define ID2D1DeviceContext1_SaveDrawingState(This, drawingStateBlock) \
|
||||
((This)->lpVtbl->Base.Base.SaveDrawingState((ID2D1RenderTarget *)This, drawingStateBlock))
|
||||
#pragma deprecated("ID2D1DeviceContext1_SaveDrawingState")
|
||||
|
||||
#define ID2D1DeviceContext1_RestoreDrawingState(This, drawingStateBlock) \
|
||||
((This)->lpVtbl->Base.Base.RestoreDrawingState((ID2D1RenderTarget *)This, drawingStateBlock))
|
||||
#pragma deprecated("ID2D1DeviceContext1_RestoreDrawingState")
|
||||
|
||||
#define ID2D1DeviceContext1_PushAxisAlignedClip(This, clipRect, antialiasMode) \
|
||||
((This)->lpVtbl->Base.Base.PushAxisAlignedClip((ID2D1RenderTarget *)This, clipRect, antialiasMode))
|
||||
#pragma deprecated("ID2D1DeviceContext1_PushAxisAlignedClip")
|
||||
|
||||
#define ID2D1DeviceContext1_PopAxisAlignedClip(This) \
|
||||
((This)->lpVtbl->Base.Base.PopAxisAlignedClip((ID2D1RenderTarget *)This))
|
||||
#pragma deprecated("ID2D1DeviceContext1_PopAxisAlignedClip")
|
||||
|
||||
#define ID2D1DeviceContext1_Clear(This, clearColor) \
|
||||
((This)->lpVtbl->Base.Base.Clear((ID2D1RenderTarget *)This, clearColor))
|
||||
#pragma deprecated("ID2D1DeviceContext1_Clear")
|
||||
|
||||
#define ID2D1DeviceContext1_BeginDraw(This) \
|
||||
((This)->lpVtbl->Base.Base.BeginDraw((ID2D1RenderTarget *)This))
|
||||
#pragma deprecated("ID2D1DeviceContext1_BeginDraw")
|
||||
|
||||
#define ID2D1DeviceContext1_EndDraw(This, tag1, tag2) \
|
||||
((This)->lpVtbl->Base.Base.EndDraw((ID2D1RenderTarget *)This, tag1, tag2))
|
||||
#pragma deprecated("ID2D1DeviceContext1_EndDraw")
|
||||
|
||||
#define ID2D1DeviceContext1_GetPixelFormat(This) \
|
||||
((This)->lpVtbl->Base.Base.GetPixelFormat((ID2D1RenderTarget *)This))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetPixelFormat")
|
||||
|
||||
#define ID2D1DeviceContext1_SetDpi(This, dpiX, dpiY) \
|
||||
((This)->lpVtbl->Base.Base.SetDpi((ID2D1RenderTarget *)This, dpiX, dpiY))
|
||||
#pragma deprecated("ID2D1DeviceContext1_SetDpi")
|
||||
|
||||
#define ID2D1DeviceContext1_GetDpi(This, dpiX, dpiY) \
|
||||
((This)->lpVtbl->Base.Base.GetDpi((ID2D1RenderTarget *)This, dpiX, dpiY))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetDpi")
|
||||
|
||||
#define ID2D1DeviceContext1_GetSize(This) \
|
||||
((This)->lpVtbl->Base.Base.GetSize((ID2D1RenderTarget *)This))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetSize")
|
||||
|
||||
#define ID2D1DeviceContext1_GetPixelSize(This) \
|
||||
((This)->lpVtbl->Base.Base.GetPixelSize((ID2D1RenderTarget *)This))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetPixelSize")
|
||||
|
||||
#define ID2D1DeviceContext1_GetMaximumBitmapSize(This) \
|
||||
((This)->lpVtbl->Base.Base.GetMaximumBitmapSize((ID2D1RenderTarget *)This))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetMaximumBitmapSize")
|
||||
|
||||
#define ID2D1DeviceContext1_IsSupported(This, renderTargetProperties) \
|
||||
((This)->lpVtbl->Base.Base.IsSupported((ID2D1RenderTarget *)This, renderTargetProperties))
|
||||
#pragma deprecated("ID2D1DeviceContext1_IsSupported")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateBitmap(This, size, sourceData, pitch, bitmapProperties, bitmap) \
|
||||
((This)->lpVtbl->Base.CreateBitmap((ID2D1DeviceContext *)This, size, sourceData, pitch, bitmapProperties, bitmap))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateBitmap")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateBitmapFromWicBitmap(This, wicBitmapSource, bitmapProperties, bitmap) \
|
||||
((This)->lpVtbl->Base.CreateBitmapFromWicBitmap((ID2D1DeviceContext *)This, wicBitmapSource, bitmapProperties, bitmap))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateBitmapFromWicBitmap")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateColorContext(This, space, profile, profileSize, colorContext) \
|
||||
((This)->lpVtbl->Base.CreateColorContext((ID2D1DeviceContext *)This, space, profile, profileSize, colorContext))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateColorContext")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateColorContextFromFilename(This, filename, colorContext) \
|
||||
((This)->lpVtbl->Base.CreateColorContextFromFilename((ID2D1DeviceContext *)This, filename, colorContext))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateColorContextFromFilename")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateColorContextFromWicColorContext(This, wicColorContext, colorContext) \
|
||||
((This)->lpVtbl->Base.CreateColorContextFromWicColorContext((ID2D1DeviceContext *)This, wicColorContext, colorContext))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateColorContextFromWicColorContext")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateBitmapFromDxgiSurface(This, surface, bitmapProperties, bitmap) \
|
||||
((This)->lpVtbl->Base.CreateBitmapFromDxgiSurface((ID2D1DeviceContext *)This, surface, bitmapProperties, bitmap))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateBitmapFromDxgiSurface")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateEffect(This, effectId, effect) \
|
||||
((This)->lpVtbl->Base.CreateEffect((ID2D1DeviceContext *)This, effectId, effect))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateEffect")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateGradientStopCollection(This, straightAlphaGradientStops, straightAlphaGradientStopsCount, preInterpolationSpace, postInterpolationSpace, bufferPrecision, extendMode, colorInterpolationMode, gradientStopCollection1) \
|
||||
((This)->lpVtbl->Base.CreateGradientStopCollection((ID2D1DeviceContext *)This, straightAlphaGradientStops, straightAlphaGradientStopsCount, preInterpolationSpace, postInterpolationSpace, bufferPrecision, extendMode, colorInterpolationMode, gradientStopCollection1))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateGradientStopCollection")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateImageBrush(This, image, imageBrushProperties, brushProperties, imageBrush) \
|
||||
((This)->lpVtbl->Base.CreateImageBrush((ID2D1DeviceContext *)This, image, imageBrushProperties, brushProperties, imageBrush))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateImageBrush")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateBitmapBrush(This, bitmap, bitmapBrushProperties, brushProperties, bitmapBrush) \
|
||||
((This)->lpVtbl->Base.CreateBitmapBrush((ID2D1DeviceContext *)This, bitmap, bitmapBrushProperties, brushProperties, bitmapBrush))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateBitmapBrush")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateCommandList(This, commandList) \
|
||||
((This)->lpVtbl->Base.CreateCommandList((ID2D1DeviceContext *)This, commandList))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateCommandList")
|
||||
|
||||
#define ID2D1DeviceContext1_IsDxgiFormatSupported(This, format) \
|
||||
((This)->lpVtbl->Base.IsDxgiFormatSupported((ID2D1DeviceContext *)This, format))
|
||||
#pragma deprecated("ID2D1DeviceContext1_IsDxgiFormatSupported")
|
||||
|
||||
#define ID2D1DeviceContext1_IsBufferPrecisionSupported(This, bufferPrecision) \
|
||||
((This)->lpVtbl->Base.IsBufferPrecisionSupported((ID2D1DeviceContext *)This, bufferPrecision))
|
||||
#pragma deprecated("ID2D1DeviceContext1_IsBufferPrecisionSupported")
|
||||
|
||||
#define ID2D1DeviceContext1_GetImageLocalBounds(This, image, localBounds) \
|
||||
((This)->lpVtbl->Base.GetImageLocalBounds((ID2D1DeviceContext *)This, image, localBounds))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetImageLocalBounds")
|
||||
|
||||
#define ID2D1DeviceContext1_GetImageWorldBounds(This, image, worldBounds) \
|
||||
((This)->lpVtbl->Base.GetImageWorldBounds((ID2D1DeviceContext *)This, image, worldBounds))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetImageWorldBounds")
|
||||
|
||||
#define ID2D1DeviceContext1_GetGlyphRunWorldBounds(This, baselineOrigin, glyphRun, measuringMode, bounds) \
|
||||
((This)->lpVtbl->Base.GetGlyphRunWorldBounds((ID2D1DeviceContext *)This, baselineOrigin, glyphRun, measuringMode, bounds))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetGlyphRunWorldBounds")
|
||||
|
||||
#define ID2D1DeviceContext1_GetDevice(This, device) \
|
||||
((This)->lpVtbl->Base.GetDevice((ID2D1DeviceContext *)This, device))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetDevice")
|
||||
|
||||
#define ID2D1DeviceContext1_SetTarget(This, image) \
|
||||
((This)->lpVtbl->Base.SetTarget((ID2D1DeviceContext *)This, image))
|
||||
#pragma deprecated("ID2D1DeviceContext1_SetTarget")
|
||||
|
||||
#define ID2D1DeviceContext1_GetTarget(This, image) \
|
||||
((This)->lpVtbl->Base.GetTarget((ID2D1DeviceContext *)This, image))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetTarget")
|
||||
|
||||
#define ID2D1DeviceContext1_SetRenderingControls(This, renderingControls) \
|
||||
((This)->lpVtbl->Base.SetRenderingControls((ID2D1DeviceContext *)This, renderingControls))
|
||||
#pragma deprecated("ID2D1DeviceContext1_SetRenderingControls")
|
||||
|
||||
#define ID2D1DeviceContext1_GetRenderingControls(This, renderingControls) \
|
||||
((This)->lpVtbl->Base.GetRenderingControls((ID2D1DeviceContext *)This, renderingControls))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetRenderingControls")
|
||||
|
||||
#define ID2D1DeviceContext1_SetPrimitiveBlend(This, primitiveBlend) \
|
||||
((This)->lpVtbl->Base.SetPrimitiveBlend((ID2D1DeviceContext *)This, primitiveBlend))
|
||||
#pragma deprecated("ID2D1DeviceContext1_SetPrimitiveBlend")
|
||||
|
||||
#define ID2D1DeviceContext1_GetPrimitiveBlend(This) \
|
||||
((This)->lpVtbl->Base.GetPrimitiveBlend((ID2D1DeviceContext *)This))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetPrimitiveBlend")
|
||||
|
||||
#define ID2D1DeviceContext1_SetUnitMode(This, unitMode) \
|
||||
((This)->lpVtbl->Base.SetUnitMode((ID2D1DeviceContext *)This, unitMode))
|
||||
#pragma deprecated("ID2D1DeviceContext1_SetUnitMode")
|
||||
|
||||
#define ID2D1DeviceContext1_GetUnitMode(This) \
|
||||
((This)->lpVtbl->Base.GetUnitMode((ID2D1DeviceContext *)This))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetUnitMode")
|
||||
|
||||
#define ID2D1DeviceContext1_DrawGlyphRun(This, baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode) \
|
||||
((This)->lpVtbl->Base.DrawGlyphRun((ID2D1DeviceContext *)This, baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode))
|
||||
#pragma deprecated("ID2D1DeviceContext1_DrawGlyphRun")
|
||||
|
||||
#define ID2D1DeviceContext1_DrawImage(This, image, targetOffset, imageRectangle, interpolationMode, compositeMode) \
|
||||
((This)->lpVtbl->Base.DrawImage((ID2D1DeviceContext *)This, image, targetOffset, imageRectangle, interpolationMode, compositeMode))
|
||||
#pragma deprecated("ID2D1DeviceContext1_DrawImage")
|
||||
|
||||
#define ID2D1DeviceContext1_DrawGdiMetafile(This, gdiMetafile, targetOffset) \
|
||||
((This)->lpVtbl->Base.DrawGdiMetafile((ID2D1DeviceContext *)This, gdiMetafile, targetOffset))
|
||||
#pragma deprecated("ID2D1DeviceContext1_DrawGdiMetafile")
|
||||
|
||||
#define ID2D1DeviceContext1_DrawBitmap(This, bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle, perspectiveTransform) \
|
||||
((This)->lpVtbl->Base.DrawBitmap((ID2D1DeviceContext *)This, bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle, perspectiveTransform))
|
||||
#pragma deprecated("ID2D1DeviceContext1_DrawBitmap")
|
||||
|
||||
#define ID2D1DeviceContext1_PushLayer(This, layerParameters, layer) \
|
||||
((This)->lpVtbl->Base.PushLayer((ID2D1DeviceContext *)This, layerParameters, layer))
|
||||
#pragma deprecated("ID2D1DeviceContext1_PushLayer")
|
||||
|
||||
#define ID2D1DeviceContext1_InvalidateEffectInputRectangle(This, effect, input, inputRectangle) \
|
||||
((This)->lpVtbl->Base.InvalidateEffectInputRectangle((ID2D1DeviceContext *)This, effect, input, inputRectangle))
|
||||
#pragma deprecated("ID2D1DeviceContext1_InvalidateEffectInputRectangle")
|
||||
|
||||
#define ID2D1DeviceContext1_GetEffectInvalidRectangleCount(This, effect, rectangleCount) \
|
||||
((This)->lpVtbl->Base.GetEffectInvalidRectangleCount((ID2D1DeviceContext *)This, effect, rectangleCount))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetEffectInvalidRectangleCount")
|
||||
|
||||
#define ID2D1DeviceContext1_GetEffectInvalidRectangles(This, effect, rectangles, rectanglesCount) \
|
||||
((This)->lpVtbl->Base.GetEffectInvalidRectangles((ID2D1DeviceContext *)This, effect, rectangles, rectanglesCount))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetEffectInvalidRectangles")
|
||||
|
||||
#define ID2D1DeviceContext1_GetEffectRequiredInputRectangles(This, renderEffect, renderImageRectangle, inputDescriptions, requiredInputRects, inputCount) \
|
||||
((This)->lpVtbl->Base.GetEffectRequiredInputRectangles((ID2D1DeviceContext *)This, renderEffect, renderImageRectangle, inputDescriptions, requiredInputRects, inputCount))
|
||||
#pragma deprecated("ID2D1DeviceContext1_GetEffectRequiredInputRectangles")
|
||||
|
||||
#define ID2D1DeviceContext1_FillOpacityMask(This, opacityMask, brush, destinationRectangle, sourceRectangle) \
|
||||
((This)->lpVtbl->Base.FillOpacityMask((ID2D1DeviceContext *)This, opacityMask, brush, destinationRectangle, sourceRectangle))
|
||||
#pragma deprecated("ID2D1DeviceContext1_FillOpacityMask")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateFilledGeometryRealization(This, geometry, flatteningTolerance, geometryRealization) \
|
||||
((This)->lpVtbl->CreateFilledGeometryRealization(This, geometry, flatteningTolerance, geometryRealization))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateFilledGeometryRealization")
|
||||
|
||||
#define ID2D1DeviceContext1_CreateStrokedGeometryRealization(This, geometry, flatteningTolerance, strokeWidth, strokeStyle, geometryRealization) \
|
||||
((This)->lpVtbl->CreateStrokedGeometryRealization(This, geometry, flatteningTolerance, strokeWidth, strokeStyle, geometryRealization))
|
||||
#pragma deprecated("ID2D1DeviceContext1_CreateStrokedGeometryRealization")
|
||||
|
||||
#define ID2D1DeviceContext1_DrawGeometryRealization(This, geometryRealization, brush) \
|
||||
((This)->lpVtbl->DrawGeometryRealization(This, geometryRealization, brush))
|
||||
#pragma deprecated("ID2D1DeviceContext1_DrawGeometryRealization")
|
||||
|
||||
typedef interface ID2D1Device1 ID2D1Device1;
|
||||
|
||||
@@ -550,36 +641,47 @@ interface ID2D1Device1
|
||||
|
||||
#define ID2D1Device1_QueryInterface(This, riid, ppv) \
|
||||
((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
|
||||
#pragma deprecated("ID2D1Device1_QueryInterface")
|
||||
|
||||
#define ID2D1Device1_AddRef(This) \
|
||||
((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This))
|
||||
#pragma deprecated("ID2D1Device1_AddRef")
|
||||
|
||||
#define ID2D1Device1_Release(This) \
|
||||
((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This))
|
||||
#pragma deprecated("ID2D1Device1_Release")
|
||||
|
||||
#define ID2D1Device1_GetFactory(This, factory) \
|
||||
((This)->lpVtbl->Base.Base.GetFactory((ID2D1Resource *)This, factory))
|
||||
#pragma deprecated("ID2D1Device1_GetFactory")
|
||||
|
||||
#define ID2D1Device1_CreatePrintControl(This, wicFactory, documentTarget, printControlProperties, printControl) \
|
||||
((This)->lpVtbl->Base.CreatePrintControl((ID2D1Device *)This, wicFactory, documentTarget, printControlProperties, printControl))
|
||||
#pragma deprecated("ID2D1Device1_CreatePrintControl")
|
||||
|
||||
#define ID2D1Device1_SetMaximumTextureMemory(This, maximumInBytes) \
|
||||
((This)->lpVtbl->Base.SetMaximumTextureMemory((ID2D1Device *)This, maximumInBytes))
|
||||
#pragma deprecated("ID2D1Device1_SetMaximumTextureMemory")
|
||||
|
||||
#define ID2D1Device1_GetMaximumTextureMemory(This) \
|
||||
((This)->lpVtbl->Base.GetMaximumTextureMemory((ID2D1Device *)This))
|
||||
#pragma deprecated("ID2D1Device1_GetMaximumTextureMemory")
|
||||
|
||||
#define ID2D1Device1_ClearResources(This, millisecondsSinceUse) \
|
||||
((This)->lpVtbl->Base.ClearResources((ID2D1Device *)This, millisecondsSinceUse))
|
||||
#pragma deprecated("ID2D1Device1_ClearResources")
|
||||
|
||||
#define ID2D1Device1_GetRenderingPriority(This) \
|
||||
((This)->lpVtbl->GetRenderingPriority(This))
|
||||
#pragma deprecated("ID2D1Device1_GetRenderingPriority")
|
||||
|
||||
#define ID2D1Device1_SetRenderingPriority(This, renderingPriority) \
|
||||
((This)->lpVtbl->SetRenderingPriority(This, renderingPriority))
|
||||
#pragma deprecated("ID2D1Device1_SetRenderingPriority")
|
||||
|
||||
#define ID2D1Device1_CreateDeviceContext(This, options, deviceContext1) \
|
||||
((This)->lpVtbl->CreateDeviceContext(This, options, deviceContext1))
|
||||
#pragma deprecated("ID2D1Device1_CreateDeviceContext")
|
||||
|
||||
typedef interface ID2D1Factory2 ID2D1Factory2;
|
||||
|
||||
@@ -604,75 +706,99 @@ interface ID2D1Factory2
|
||||
|
||||
#define ID2D1Factory2_QueryInterface(This, riid, ppv) \
|
||||
((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
|
||||
#pragma deprecated("ID2D1Factory2_QueryInterface")
|
||||
|
||||
#define ID2D1Factory2_AddRef(This) \
|
||||
((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This))
|
||||
#pragma deprecated("ID2D1Factory2_AddRef")
|
||||
|
||||
#define ID2D1Factory2_Release(This) \
|
||||
((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This))
|
||||
#pragma deprecated("ID2D1Factory2_Release")
|
||||
|
||||
#define ID2D1Factory2_ReloadSystemMetrics(This) \
|
||||
((This)->lpVtbl->Base.Base.ReloadSystemMetrics((ID2D1Factory *)This))
|
||||
#pragma deprecated("ID2D1Factory2_ReloadSystemMetrics")
|
||||
|
||||
#define ID2D1Factory2_GetDesktopDpi(This, dpiX, dpiY) \
|
||||
((This)->lpVtbl->Base.Base.GetDesktopDpi((ID2D1Factory *)This, dpiX, dpiY))
|
||||
#pragma deprecated("ID2D1Factory2_GetDesktopDpi")
|
||||
|
||||
#define ID2D1Factory2_CreateRectangleGeometry(This, rectangle, rectangleGeometry) \
|
||||
((This)->lpVtbl->Base.Base.CreateRectangleGeometry((ID2D1Factory *)This, rectangle, rectangleGeometry))
|
||||
#pragma deprecated("ID2D1Factory2_CreateRectangleGeometry")
|
||||
|
||||
#define ID2D1Factory2_CreateRoundedRectangleGeometry(This, roundedRectangle, roundedRectangleGeometry) \
|
||||
((This)->lpVtbl->Base.Base.CreateRoundedRectangleGeometry((ID2D1Factory *)This, roundedRectangle, roundedRectangleGeometry))
|
||||
#pragma deprecated("ID2D1Factory2_CreateRoundedRectangleGeometry")
|
||||
|
||||
#define ID2D1Factory2_CreateEllipseGeometry(This, ellipse, ellipseGeometry) \
|
||||
((This)->lpVtbl->Base.Base.CreateEllipseGeometry((ID2D1Factory *)This, ellipse, ellipseGeometry))
|
||||
#pragma deprecated("ID2D1Factory2_CreateEllipseGeometry")
|
||||
|
||||
#define ID2D1Factory2_CreateGeometryGroup(This, fillMode, geometries, geometriesCount, geometryGroup) \
|
||||
((This)->lpVtbl->Base.Base.CreateGeometryGroup((ID2D1Factory *)This, fillMode, geometries, geometriesCount, geometryGroup))
|
||||
#pragma deprecated("ID2D1Factory2_CreateGeometryGroup")
|
||||
|
||||
#define ID2D1Factory2_CreateTransformedGeometry(This, sourceGeometry, transform, transformedGeometry) \
|
||||
((This)->lpVtbl->Base.Base.CreateTransformedGeometry((ID2D1Factory *)This, sourceGeometry, transform, transformedGeometry))
|
||||
#pragma deprecated("ID2D1Factory2_CreateTransformedGeometry")
|
||||
|
||||
#define ID2D1Factory2_CreateWicBitmapRenderTarget(This, target, renderTargetProperties, renderTarget) \
|
||||
((This)->lpVtbl->Base.Base.CreateWicBitmapRenderTarget((ID2D1Factory *)This, target, renderTargetProperties, renderTarget))
|
||||
#pragma deprecated("ID2D1Factory2_CreateWicBitmapRenderTarget")
|
||||
|
||||
#define ID2D1Factory2_CreateHwndRenderTarget(This, renderTargetProperties, hwndRenderTargetProperties, hwndRenderTarget) \
|
||||
((This)->lpVtbl->Base.Base.CreateHwndRenderTarget((ID2D1Factory *)This, renderTargetProperties, hwndRenderTargetProperties, hwndRenderTarget))
|
||||
#pragma deprecated("ID2D1Factory2_CreateHwndRenderTarget")
|
||||
|
||||
#define ID2D1Factory2_CreateDxgiSurfaceRenderTarget(This, dxgiSurface, renderTargetProperties, renderTarget) \
|
||||
((This)->lpVtbl->Base.Base.CreateDxgiSurfaceRenderTarget((ID2D1Factory *)This, dxgiSurface, renderTargetProperties, renderTarget))
|
||||
#pragma deprecated("ID2D1Factory2_CreateDxgiSurfaceRenderTarget")
|
||||
|
||||
#define ID2D1Factory2_CreateDCRenderTarget(This, renderTargetProperties, dcRenderTarget) \
|
||||
((This)->lpVtbl->Base.Base.CreateDCRenderTarget((ID2D1Factory *)This, renderTargetProperties, dcRenderTarget))
|
||||
#pragma deprecated("ID2D1Factory2_CreateDCRenderTarget")
|
||||
|
||||
#define ID2D1Factory2_CreateStrokeStyle(This, strokeStyleProperties, dashes, dashesCount, strokeStyle) \
|
||||
((This)->lpVtbl->Base.CreateStrokeStyle((ID2D1Factory1 *)This, strokeStyleProperties, dashes, dashesCount, strokeStyle))
|
||||
#pragma deprecated("ID2D1Factory2_CreateStrokeStyle")
|
||||
|
||||
#define ID2D1Factory2_CreatePathGeometry(This, pathGeometry) \
|
||||
((This)->lpVtbl->Base.CreatePathGeometry((ID2D1Factory1 *)This, pathGeometry))
|
||||
#pragma deprecated("ID2D1Factory2_CreatePathGeometry")
|
||||
|
||||
#define ID2D1Factory2_CreateDrawingStateBlock(This, drawingStateDescription, textRenderingParams, drawingStateBlock) \
|
||||
((This)->lpVtbl->Base.CreateDrawingStateBlock((ID2D1Factory1 *)This, drawingStateDescription, textRenderingParams, drawingStateBlock))
|
||||
#pragma deprecated("ID2D1Factory2_CreateDrawingStateBlock")
|
||||
|
||||
#define ID2D1Factory2_CreateGdiMetafile(This, metafileStream, metafile) \
|
||||
((This)->lpVtbl->Base.CreateGdiMetafile((ID2D1Factory1 *)This, metafileStream, metafile))
|
||||
#pragma deprecated("ID2D1Factory2_CreateGdiMetafile")
|
||||
|
||||
#define ID2D1Factory2_RegisterEffectFromStream(This, classId, propertyXml, bindings, bindingsCount, effectFactory) \
|
||||
((This)->lpVtbl->Base.RegisterEffectFromStream((ID2D1Factory1 *)This, classId, propertyXml, bindings, bindingsCount, effectFactory))
|
||||
#pragma deprecated("ID2D1Factory2_RegisterEffectFromStream")
|
||||
|
||||
#define ID2D1Factory2_RegisterEffectFromString(This, classId, propertyXml, bindings, bindingsCount, effectFactory) \
|
||||
((This)->lpVtbl->Base.RegisterEffectFromString((ID2D1Factory1 *)This, classId, propertyXml, bindings, bindingsCount, effectFactory))
|
||||
#pragma deprecated("ID2D1Factory2_RegisterEffectFromString")
|
||||
|
||||
#define ID2D1Factory2_UnregisterEffect(This, classId) \
|
||||
((This)->lpVtbl->Base.UnregisterEffect((ID2D1Factory1 *)This, classId))
|
||||
#pragma deprecated("ID2D1Factory2_UnregisterEffect")
|
||||
|
||||
#define ID2D1Factory2_GetRegisteredEffects(This, effects, effectsCount, effectsReturned, effectsRegistered) \
|
||||
((This)->lpVtbl->Base.GetRegisteredEffects((ID2D1Factory1 *)This, effects, effectsCount, effectsReturned, effectsRegistered))
|
||||
#pragma deprecated("ID2D1Factory2_GetRegisteredEffects")
|
||||
|
||||
#define ID2D1Factory2_GetEffectProperties(This, effectId, properties) \
|
||||
((This)->lpVtbl->Base.GetEffectProperties((ID2D1Factory1 *)This, effectId, properties))
|
||||
#pragma deprecated("ID2D1Factory2_GetEffectProperties")
|
||||
|
||||
#define ID2D1Factory2_CreateDevice(This, dxgiDevice, d2dDevice1) \
|
||||
((This)->lpVtbl->CreateDevice(This, dxgiDevice, d2dDevice1))
|
||||
#pragma deprecated("ID2D1Factory2_CreateDevice")
|
||||
|
||||
typedef interface ID2D1CommandSink1 ID2D1CommandSink1;
|
||||
|
||||
@@ -696,90 +822,119 @@ interface ID2D1CommandSink1
|
||||
|
||||
#define ID2D1CommandSink1_QueryInterface(This, riid, ppv) \
|
||||
((This)->lpVtbl->Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
|
||||
#pragma deprecated("ID2D1CommandSink1_QueryInterface")
|
||||
|
||||
#define ID2D1CommandSink1_AddRef(This) \
|
||||
((This)->lpVtbl->Base.Base.AddRef((IUnknown *)This))
|
||||
#pragma deprecated("ID2D1CommandSink1_AddRef")
|
||||
|
||||
#define ID2D1CommandSink1_Release(This) \
|
||||
((This)->lpVtbl->Base.Base.Release((IUnknown *)This))
|
||||
#pragma deprecated("ID2D1CommandSink1_Release")
|
||||
|
||||
#define ID2D1CommandSink1_BeginDraw(This) \
|
||||
((This)->lpVtbl->Base.BeginDraw((ID2D1CommandSink *)This))
|
||||
#pragma deprecated("ID2D1CommandSink1_BeginDraw")
|
||||
|
||||
#define ID2D1CommandSink1_EndDraw(This) \
|
||||
((This)->lpVtbl->Base.EndDraw((ID2D1CommandSink *)This))
|
||||
#pragma deprecated("ID2D1CommandSink1_EndDraw")
|
||||
|
||||
#define ID2D1CommandSink1_SetAntialiasMode(This, antialiasMode) \
|
||||
((This)->lpVtbl->Base.SetAntialiasMode((ID2D1CommandSink *)This, antialiasMode))
|
||||
#pragma deprecated("ID2D1CommandSink1_SetAntialiasMode")
|
||||
|
||||
#define ID2D1CommandSink1_SetTags(This, tag1, tag2) \
|
||||
((This)->lpVtbl->Base.SetTags((ID2D1CommandSink *)This, tag1, tag2))
|
||||
#pragma deprecated("ID2D1CommandSink1_SetTags")
|
||||
|
||||
#define ID2D1CommandSink1_SetTextAntialiasMode(This, textAntialiasMode) \
|
||||
((This)->lpVtbl->Base.SetTextAntialiasMode((ID2D1CommandSink *)This, textAntialiasMode))
|
||||
#pragma deprecated("ID2D1CommandSink1_SetTextAntialiasMode")
|
||||
|
||||
#define ID2D1CommandSink1_SetTextRenderingParams(This, textRenderingParams) \
|
||||
((This)->lpVtbl->Base.SetTextRenderingParams((ID2D1CommandSink *)This, textRenderingParams))
|
||||
#pragma deprecated("ID2D1CommandSink1_SetTextRenderingParams")
|
||||
|
||||
#define ID2D1CommandSink1_SetTransform(This, transform) \
|
||||
((This)->lpVtbl->Base.SetTransform((ID2D1CommandSink *)This, transform))
|
||||
#pragma deprecated("ID2D1CommandSink1_SetTransform")
|
||||
|
||||
#define ID2D1CommandSink1_SetPrimitiveBlend(This, primitiveBlend) \
|
||||
((This)->lpVtbl->Base.SetPrimitiveBlend((ID2D1CommandSink *)This, primitiveBlend))
|
||||
#pragma deprecated("ID2D1CommandSink1_SetPrimitiveBlend")
|
||||
|
||||
#define ID2D1CommandSink1_SetUnitMode(This, unitMode) \
|
||||
((This)->lpVtbl->Base.SetUnitMode((ID2D1CommandSink *)This, unitMode))
|
||||
#pragma deprecated("ID2D1CommandSink1_SetUnitMode")
|
||||
|
||||
#define ID2D1CommandSink1_Clear(This, color) \
|
||||
((This)->lpVtbl->Base.Clear((ID2D1CommandSink *)This, color))
|
||||
#pragma deprecated("ID2D1CommandSink1_Clear")
|
||||
|
||||
#define ID2D1CommandSink1_DrawGlyphRun(This, baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode) \
|
||||
((This)->lpVtbl->Base.DrawGlyphRun((ID2D1CommandSink *)This, baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode))
|
||||
#pragma deprecated("ID2D1CommandSink1_DrawGlyphRun")
|
||||
|
||||
#define ID2D1CommandSink1_DrawLine(This, point0, point1, brush, strokeWidth, strokeStyle) \
|
||||
((This)->lpVtbl->Base.DrawLine((ID2D1CommandSink *)This, point0, point1, brush, strokeWidth, strokeStyle))
|
||||
#pragma deprecated("ID2D1CommandSink1_DrawLine")
|
||||
|
||||
#define ID2D1CommandSink1_DrawGeometry(This, geometry, brush, strokeWidth, strokeStyle) \
|
||||
((This)->lpVtbl->Base.DrawGeometry((ID2D1CommandSink *)This, geometry, brush, strokeWidth, strokeStyle))
|
||||
#pragma deprecated("ID2D1CommandSink1_DrawGeometry")
|
||||
|
||||
#define ID2D1CommandSink1_DrawRectangle(This, rect, brush, strokeWidth, strokeStyle) \
|
||||
((This)->lpVtbl->Base.DrawRectangle((ID2D1CommandSink *)This, rect, brush, strokeWidth, strokeStyle))
|
||||
#pragma deprecated("ID2D1CommandSink1_DrawRectangle")
|
||||
|
||||
#define ID2D1CommandSink1_DrawBitmap(This, bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle, perspectiveTransform) \
|
||||
((This)->lpVtbl->Base.DrawBitmap((ID2D1CommandSink *)This, bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle, perspectiveTransform))
|
||||
#pragma deprecated("ID2D1CommandSink1_DrawBitmap")
|
||||
|
||||
#define ID2D1CommandSink1_DrawImage(This, image, targetOffset, imageRectangle, interpolationMode, compositeMode) \
|
||||
((This)->lpVtbl->Base.DrawImage((ID2D1CommandSink *)This, image, targetOffset, imageRectangle, interpolationMode, compositeMode))
|
||||
#pragma deprecated("ID2D1CommandSink1_DrawImage")
|
||||
|
||||
#define ID2D1CommandSink1_DrawGdiMetafile(This, gdiMetafile, targetOffset) \
|
||||
((This)->lpVtbl->Base.DrawGdiMetafile((ID2D1CommandSink *)This, gdiMetafile, targetOffset))
|
||||
#pragma deprecated("ID2D1CommandSink1_DrawGdiMetafile")
|
||||
|
||||
#define ID2D1CommandSink1_FillMesh(This, mesh, brush) \
|
||||
((This)->lpVtbl->Base.FillMesh((ID2D1CommandSink *)This, mesh, brush))
|
||||
#pragma deprecated("ID2D1CommandSink1_FillMesh")
|
||||
|
||||
#define ID2D1CommandSink1_FillOpacityMask(This, opacityMask, brush, destinationRectangle, sourceRectangle) \
|
||||
((This)->lpVtbl->Base.FillOpacityMask((ID2D1CommandSink *)This, opacityMask, brush, destinationRectangle, sourceRectangle))
|
||||
#pragma deprecated("ID2D1CommandSink1_FillOpacityMask")
|
||||
|
||||
#define ID2D1CommandSink1_FillGeometry(This, geometry, brush, opacityBrush) \
|
||||
((This)->lpVtbl->Base.FillGeometry((ID2D1CommandSink *)This, geometry, brush, opacityBrush))
|
||||
#pragma deprecated("ID2D1CommandSink1_FillGeometry")
|
||||
|
||||
#define ID2D1CommandSink1_FillRectangle(This, rect, brush) \
|
||||
((This)->lpVtbl->Base.FillRectangle((ID2D1CommandSink *)This, rect, brush))
|
||||
#pragma deprecated("ID2D1CommandSink1_FillRectangle")
|
||||
|
||||
#define ID2D1CommandSink1_PushAxisAlignedClip(This, clipRect, antialiasMode) \
|
||||
((This)->lpVtbl->Base.PushAxisAlignedClip((ID2D1CommandSink *)This, clipRect, antialiasMode))
|
||||
#pragma deprecated("ID2D1CommandSink1_PushAxisAlignedClip")
|
||||
|
||||
#define ID2D1CommandSink1_PushLayer(This, layerParameters1, layer) \
|
||||
((This)->lpVtbl->Base.PushLayer((ID2D1CommandSink *)This, layerParameters1, layer))
|
||||
#pragma deprecated("ID2D1CommandSink1_PushLayer")
|
||||
|
||||
#define ID2D1CommandSink1_PopAxisAlignedClip(This) \
|
||||
((This)->lpVtbl->Base.PopAxisAlignedClip((ID2D1CommandSink *)This))
|
||||
#pragma deprecated("ID2D1CommandSink1_PopAxisAlignedClip")
|
||||
|
||||
#define ID2D1CommandSink1_PopLayer(This) \
|
||||
((This)->lpVtbl->Base.PopLayer((ID2D1CommandSink *)This))
|
||||
#pragma deprecated("ID2D1CommandSink1_PopLayer")
|
||||
|
||||
#define ID2D1CommandSink1_SetPrimitiveBlend1(This, primitiveBlend) \
|
||||
((This)->lpVtbl->SetPrimitiveBlend1(This, primitiveBlend))
|
||||
#pragma deprecated("ID2D1CommandSink1_SetPrimitiveBlend1")
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -215,6 +215,16 @@ namespace D2D1
|
||||
|
||||
return inkStyleProperties;
|
||||
}
|
||||
|
||||
COM_DECLSPEC_NOTHROW
|
||||
D2D1FORCEINLINE
|
||||
D2D1_RECT_U
|
||||
InfiniteRectU()
|
||||
{
|
||||
D2D1_RECT_U rect = { 0u, 0u, UINT_MAX, UINT_MAX };
|
||||
|
||||
return rect;
|
||||
}
|
||||
} // namespace D2D1
|
||||
|
||||
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
|
||||
|
||||
@@ -9661,6 +9661,8 @@ DEFINE_GUID(D3D11_DECODER_PROFILE_MPEG4PT2_VLD_ADVSIMPLE_NOGMC, 0xed418a9f, 0x0
|
||||
DEFINE_GUID(D3D11_DECODER_PROFILE_MPEG4PT2_VLD_ADVSIMPLE_GMC, 0xab998b5b, 0x4258,0x44a9,0x9f,0xeb,0x94,0xe5,0x97,0xa6,0xba,0xae);
|
||||
DEFINE_GUID(D3D11_DECODER_PROFILE_HEVC_VLD_MAIN, 0x5b11d51b, 0x2f4c,0x4452,0xbc,0xc3,0x09,0xf2,0xa1,0x16,0x0c,0xc0);
|
||||
DEFINE_GUID(D3D11_DECODER_PROFILE_HEVC_VLD_MAIN10, 0x107af0e0, 0xef1a,0x4d19,0xab,0xa8,0x67,0xa1,0x63,0x07,0x3d,0x13);
|
||||
DEFINE_GUID(D3D11_DECODER_PROFILE_VP9_VLD_PROFILE0, 0x463707f8, 0xa1d0, 0x4585, 0x87, 0x6d, 0x83, 0xaa, 0x6d, 0x60, 0xb8, 0x9e);
|
||||
DEFINE_GUID(D3D11_DECODER_PROFILE_VP8_VLD, 0x90b899ea, 0x3a62, 0x4705, 0x88, 0xb3, 0x8d, 0xf0, 0x4b, 0x27, 0x44, 0xe7);
|
||||
typedef struct D3D11_VIDEO_DECODER_DESC
|
||||
{
|
||||
GUID Guid;
|
||||
|
||||
@@ -4523,7 +4523,7 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList;
|
||||
|
||||
virtual void STDMETHODCALLTYPE SetDescriptorHeaps(
|
||||
_In_ UINT NumDescriptorHeaps,
|
||||
_In_reads_(NumDescriptorHeaps) ID3D12DescriptorHeap **ppDescriptorHeaps) = 0;
|
||||
_In_reads_(NumDescriptorHeaps) ID3D12DescriptorHeap *const *ppDescriptorHeaps) = 0;
|
||||
|
||||
virtual void STDMETHODCALLTYPE SetComputeRootSignature(
|
||||
_In_ ID3D12RootSignature *pRootSignature) = 0;
|
||||
@@ -4600,7 +4600,7 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList;
|
||||
|
||||
virtual void STDMETHODCALLTYPE OMSetRenderTargets(
|
||||
_In_ UINT NumRenderTargetDescriptors,
|
||||
_In_ const D3D12_CPU_DESCRIPTOR_HANDLE *pRenderTargetDescriptors,
|
||||
_In_opt_ const D3D12_CPU_DESCRIPTOR_HANDLE *pRenderTargetDescriptors,
|
||||
_In_ BOOL RTsSingleHandleToDescriptorRange,
|
||||
_In_opt_ const D3D12_CPU_DESCRIPTOR_HANDLE *pDepthStencilDescriptor) = 0;
|
||||
|
||||
@@ -4840,7 +4840,7 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList;
|
||||
void ( STDMETHODCALLTYPE *SetDescriptorHeaps )(
|
||||
ID3D12GraphicsCommandList * This,
|
||||
_In_ UINT NumDescriptorHeaps,
|
||||
_In_reads_(NumDescriptorHeaps) ID3D12DescriptorHeap **ppDescriptorHeaps);
|
||||
_In_reads_(NumDescriptorHeaps) ID3D12DescriptorHeap *const *ppDescriptorHeaps);
|
||||
|
||||
void ( STDMETHODCALLTYPE *SetComputeRootSignature )(
|
||||
ID3D12GraphicsCommandList * This,
|
||||
@@ -4935,7 +4935,7 @@ EXTERN_C const IID IID_ID3D12GraphicsCommandList;
|
||||
void ( STDMETHODCALLTYPE *OMSetRenderTargets )(
|
||||
ID3D12GraphicsCommandList * This,
|
||||
_In_ UINT NumRenderTargetDescriptors,
|
||||
_In_ const D3D12_CPU_DESCRIPTOR_HANDLE *pRenderTargetDescriptors,
|
||||
_In_opt_ const D3D12_CPU_DESCRIPTOR_HANDLE *pRenderTargetDescriptors,
|
||||
_In_ BOOL RTsSingleHandleToDescriptorRange,
|
||||
_In_opt_ const D3D12_CPU_DESCRIPTOR_HANDLE *pDepthStencilDescriptor);
|
||||
|
||||
|
||||
@@ -1459,7 +1459,27 @@ enum D3D12_MESSAGE_ID
|
||||
D3D12_MESSAGE_ID_UNMAP_INVALID_NULLRANGE = ( D3D12_MESSAGE_ID_MAP_INVALID_NULLRANGE + 1 ) ,
|
||||
D3D12_MESSAGE_ID_NO_GRAPHICS_API_SUPPORT = ( D3D12_MESSAGE_ID_UNMAP_INVALID_NULLRANGE + 1 ) ,
|
||||
D3D12_MESSAGE_ID_NO_COMPUTE_API_SUPPORT = ( D3D12_MESSAGE_ID_NO_GRAPHICS_API_SUPPORT + 1 ) ,
|
||||
D3D12_MESSAGE_ID_D3D12_MESSAGES_END = ( D3D12_MESSAGE_ID_NO_COMPUTE_API_SUPPORT + 1 )
|
||||
D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_RESOURCE_FLAGS_NOT_SUPPORTED = ( D3D12_MESSAGE_ID_NO_COMPUTE_API_SUPPORT + 1 ) ,
|
||||
D3D12_MESSAGE_ID_SHADER_BASED_VALIDATION_ROOT_ARGUMENT_UNINITIALIZED = ( D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_RESOURCE_FLAGS_NOT_SUPPORTED + 1 ) ,
|
||||
D3D12_MESSAGE_ID_SHADER_BASED_VALIDATION_DESCRIPTOR_HEAP_INDEX_OUT_OF_BOUNDS = ( D3D12_MESSAGE_ID_SHADER_BASED_VALIDATION_ROOT_ARGUMENT_UNINITIALIZED + 1 ) ,
|
||||
D3D12_MESSAGE_ID_SHADER_BASED_VALIDATION_DESCRIPTOR_TABLE_REGISTER_INDEX_OUT_OF_BOUNDS = ( D3D12_MESSAGE_ID_SHADER_BASED_VALIDATION_DESCRIPTOR_HEAP_INDEX_OUT_OF_BOUNDS + 1 ) ,
|
||||
D3D12_MESSAGE_ID_SHADER_BASED_VALIDATION_DESCRIPTOR_UNINITIALIZED = ( D3D12_MESSAGE_ID_SHADER_BASED_VALIDATION_DESCRIPTOR_TABLE_REGISTER_INDEX_OUT_OF_BOUNDS + 1 ) ,
|
||||
D3D12_MESSAGE_ID_SHADER_BASED_VALIDATION_DESCRIPTOR_TYPE_MISMATCH = ( D3D12_MESSAGE_ID_SHADER_BASED_VALIDATION_DESCRIPTOR_UNINITIALIZED + 1 ) ,
|
||||
D3D12_MESSAGE_ID_SHADER_BASED_VALIDATION_SRV_RESOURCE_DIMENSION_MISMATCH = ( D3D12_MESSAGE_ID_SHADER_BASED_VALIDATION_DESCRIPTOR_TYPE_MISMATCH + 1 ) ,
|
||||
D3D12_MESSAGE_ID_SHADER_BASED_VALIDATION_UAV_RESOURCE_DIMENSION_MISMATCH = ( D3D12_MESSAGE_ID_SHADER_BASED_VALIDATION_SRV_RESOURCE_DIMENSION_MISMATCH + 1 ) ,
|
||||
D3D12_MESSAGE_ID_SHADER_BASED_VALIDATION_INCOMPATIBLE_RESOURCE_STATE = ( D3D12_MESSAGE_ID_SHADER_BASED_VALIDATION_UAV_RESOURCE_DIMENSION_MISMATCH + 1 ) ,
|
||||
D3D12_MESSAGE_ID_COPYRESOURCE_NULLDST = ( D3D12_MESSAGE_ID_SHADER_BASED_VALIDATION_INCOMPATIBLE_RESOURCE_STATE + 1 ) ,
|
||||
D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDDSTRESOURCE = ( D3D12_MESSAGE_ID_COPYRESOURCE_NULLDST + 1 ) ,
|
||||
D3D12_MESSAGE_ID_COPYRESOURCE_NULLSRC = ( D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDDSTRESOURCE + 1 ) ,
|
||||
D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDSRCRESOURCE = ( D3D12_MESSAGE_ID_COPYRESOURCE_NULLSRC + 1 ) ,
|
||||
D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_NULLDST = ( D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDSRCRESOURCE + 1 ) ,
|
||||
D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALIDDSTRESOURCE = ( D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_NULLDST + 1 ) ,
|
||||
D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_NULLSRC = ( D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALIDDSTRESOURCE + 1 ) ,
|
||||
D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALIDSRCRESOURCE = ( D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_NULLSRC + 1 ) ,
|
||||
D3D12_MESSAGE_ID_PIPELINE_STATE_TYPE_MISMATCH = ( D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALIDSRCRESOURCE + 1 ) ,
|
||||
D3D12_MESSAGE_ID_COMMAND_LIST_DISPATCH_ROOT_SIGNATURE_NOT_SET = ( D3D12_MESSAGE_ID_PIPELINE_STATE_TYPE_MISMATCH + 1 ) ,
|
||||
D3D12_MESSAGE_ID_COMMAND_LIST_DISPATCH_ROOT_SIGNATURE_MISMATCH = ( D3D12_MESSAGE_ID_COMMAND_LIST_DISPATCH_ROOT_SIGNATURE_NOT_SET + 1 ) ,
|
||||
D3D12_MESSAGE_ID_D3D12_MESSAGES_END = ( D3D12_MESSAGE_ID_COMMAND_LIST_DISPATCH_ROOT_SIGNATURE_MISMATCH + 1 )
|
||||
} D3D12_MESSAGE_ID;
|
||||
|
||||
typedef struct D3D12_MESSAGE
|
||||
|
||||
@@ -2446,7 +2446,7 @@ enum DWRITE_NUMBER_SUBSTITUTION_METHOD
|
||||
/// <summary>
|
||||
/// Holds the appropriate digits and numeric punctuation for a given locale.
|
||||
/// </summary>
|
||||
interface DECLSPEC_UUID("14885CC9-BAB0-4f90-B6ED-5C366A2CD03D") DECLSPEC_NOVTABLE IDWriteNumberSubstitution : public IUnknown
|
||||
interface DWRITE_DECLARE_INTERFACE("14885CC9-BAB0-4f90-B6ED-5C366A2CD03D") IDWriteNumberSubstitution : public IUnknown
|
||||
{
|
||||
};
|
||||
|
||||
@@ -2511,7 +2511,7 @@ struct DWRITE_SHAPING_GLYPH_PROPERTIES
|
||||
/// stop prematurely and return a callback error. Rather than return E_NOTIMPL,
|
||||
/// an application should stub the method and return a constant/null and S_OK.
|
||||
/// </summary>
|
||||
interface DECLSPEC_UUID("688e1a58-5094-47c8-adc8-fbcea60ae92b") DECLSPEC_NOVTABLE IDWriteTextAnalysisSource : public IUnknown
|
||||
interface DWRITE_DECLARE_INTERFACE("688e1a58-5094-47c8-adc8-fbcea60ae92b") IDWriteTextAnalysisSource : public IUnknown
|
||||
{
|
||||
/// <summary>
|
||||
/// Get a block of text starting at the specified text position.
|
||||
@@ -2620,7 +2620,7 @@ interface DECLSPEC_UUID("688e1a58-5094-47c8-adc8-fbcea60ae92b") DECLSPEC_NOVTABL
|
||||
/// state of the analysis sink, therefore a Set method call on a range
|
||||
/// overwrites the previously set analysis result of the same range.
|
||||
/// </summary>
|
||||
interface DECLSPEC_UUID("5810cd44-0ca0-4701-b3fa-bec5182ae4f6") DECLSPEC_NOVTABLE IDWriteTextAnalysisSink : public IUnknown
|
||||
interface DWRITE_DECLARE_INTERFACE("5810cd44-0ca0-4701-b3fa-bec5182ae4f6") IDWriteTextAnalysisSink : public IUnknown
|
||||
{
|
||||
/// <summary>
|
||||
/// Report script analysis for the text range.
|
||||
|
||||
@@ -1714,7 +1714,7 @@ interface DWRITE_DECLARE_INTERFACE("80DAD800-E21F-4E83-96CE-BFCCE500DB7C") IDWri
|
||||
/// If any of these callbacks returns an error, the analysis functions will
|
||||
/// stop prematurely and return a callback error.
|
||||
/// </summary>
|
||||
interface DECLSPEC_UUID("{639CFAD8-0FB4-4B21-A58A-067920120009}") DECLSPEC_NOVTABLE IDWriteTextAnalysisSource1 : public IDWriteTextAnalysisSource
|
||||
interface DWRITE_DECLARE_INTERFACE("639CFAD8-0FB4-4B21-A58A-067920120009") IDWriteTextAnalysisSource1 : public IDWriteTextAnalysisSource
|
||||
{
|
||||
/// <summary>
|
||||
/// The text analyzer calls back to this to get the desired glyph
|
||||
@@ -1753,7 +1753,7 @@ interface DECLSPEC_UUID("{639CFAD8-0FB4-4B21-A58A-067920120009}") DECLSPEC_NOVTA
|
||||
/// The interface implemented by the client to receive the
|
||||
/// output of the text analyzers.
|
||||
/// </summary>
|
||||
interface DECLSPEC_UUID("B0D941A0-85E7-4D8B-9FD3-5CED9934482A") DECLSPEC_NOVTABLE IDWriteTextAnalysisSink1 : public IDWriteTextAnalysisSink
|
||||
interface DWRITE_DECLARE_INTERFACE("B0D941A0-85E7-4D8B-9FD3-5CED9934482A") IDWriteTextAnalysisSink1 : public IDWriteTextAnalysisSink
|
||||
{
|
||||
/// <summary>
|
||||
/// The text analyzer calls back to this to report the actual orientation
|
||||
|
||||
@@ -0,0 +1,294 @@
|
||||
/*
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Module Name:
|
||||
|
||||
sdkddkver.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Master include file for versioning windows SDK/DDK.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _INC_SDKDDKVER
|
||||
#define _INC_SDKDDKVER
|
||||
|
||||
#if (_MSC_VER >= 800)
|
||||
#if (_MSC_VER >= 1200)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4668) /* #if not_defined treated as #if 0 */
|
||||
#endif
|
||||
#pragma warning(disable:4001) /* nonstandard extension : single line comment */
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
//
|
||||
// _WIN32_WINNT version constants
|
||||
//
|
||||
#define _WIN32_WINNT_NT4 0x0400
|
||||
#define _WIN32_WINNT_WIN2K 0x0500
|
||||
#define _WIN32_WINNT_WINXP 0x0501
|
||||
#define _WIN32_WINNT_WS03 0x0502
|
||||
#define _WIN32_WINNT_WIN6 0x0600
|
||||
#define _WIN32_WINNT_VISTA 0x0600
|
||||
#define _WIN32_WINNT_WS08 0x0600
|
||||
#define _WIN32_WINNT_LONGHORN 0x0600
|
||||
#define _WIN32_WINNT_WIN7 0x0601
|
||||
#define _WIN32_WINNT_WIN8 0x0602
|
||||
#define _WIN32_WINNT_WINBLUE 0x0603
|
||||
#define _WIN32_WINNT_WINTHRESHOLD 0x0A00 /* ABRACADABRA_THRESHOLD*/
|
||||
#define _WIN32_WINNT_WIN10 0x0A00 /* ABRACADABRA_THRESHOLD*/
|
||||
|
||||
//
|
||||
// _WIN32_IE_ version constants
|
||||
//
|
||||
#define _WIN32_IE_IE20 0x0200
|
||||
#define _WIN32_IE_IE30 0x0300
|
||||
#define _WIN32_IE_IE302 0x0302
|
||||
#define _WIN32_IE_IE40 0x0400
|
||||
#define _WIN32_IE_IE401 0x0401
|
||||
#define _WIN32_IE_IE50 0x0500
|
||||
#define _WIN32_IE_IE501 0x0501
|
||||
#define _WIN32_IE_IE55 0x0550
|
||||
#define _WIN32_IE_IE60 0x0600
|
||||
#define _WIN32_IE_IE60SP1 0x0601
|
||||
#define _WIN32_IE_IE60SP2 0x0603
|
||||
#define _WIN32_IE_IE70 0x0700
|
||||
#define _WIN32_IE_IE80 0x0800
|
||||
#define _WIN32_IE_IE90 0x0900
|
||||
#define _WIN32_IE_IE100 0x0A00
|
||||
#define _WIN32_IE_IE110 0x0A00 /* ABRACADABRA_THRESHOLD */
|
||||
|
||||
//
|
||||
// IE <-> OS version mapping
|
||||
//
|
||||
// NT4 supports IE versions 2.0 -> 6.0 SP1
|
||||
#define _WIN32_IE_NT4 _WIN32_IE_IE20
|
||||
#define _WIN32_IE_NT4SP1 _WIN32_IE_IE20
|
||||
#define _WIN32_IE_NT4SP2 _WIN32_IE_IE20
|
||||
#define _WIN32_IE_NT4SP3 _WIN32_IE_IE302
|
||||
#define _WIN32_IE_NT4SP4 _WIN32_IE_IE401
|
||||
#define _WIN32_IE_NT4SP5 _WIN32_IE_IE401
|
||||
#define _WIN32_IE_NT4SP6 _WIN32_IE_IE50
|
||||
// Win98 supports IE versions 4.01 -> 6.0 SP1
|
||||
#define _WIN32_IE_WIN98 _WIN32_IE_IE401
|
||||
// Win98SE supports IE versions 5.0 -> 6.0 SP1
|
||||
#define _WIN32_IE_WIN98SE _WIN32_IE_IE50
|
||||
// WinME supports IE versions 5.5 -> 6.0 SP1
|
||||
#define _WIN32_IE_WINME _WIN32_IE_IE55
|
||||
// Win2k supports IE versions 5.01 -> 6.0 SP1
|
||||
#define _WIN32_IE_WIN2K _WIN32_IE_IE501
|
||||
#define _WIN32_IE_WIN2KSP1 _WIN32_IE_IE501
|
||||
#define _WIN32_IE_WIN2KSP2 _WIN32_IE_IE501
|
||||
#define _WIN32_IE_WIN2KSP3 _WIN32_IE_IE501
|
||||
#define _WIN32_IE_WIN2KSP4 _WIN32_IE_IE501
|
||||
#define _WIN32_IE_XP _WIN32_IE_IE60
|
||||
#define _WIN32_IE_XPSP1 _WIN32_IE_IE60SP1
|
||||
#define _WIN32_IE_XPSP2 _WIN32_IE_IE60SP2
|
||||
#define _WIN32_IE_WS03 0x0602
|
||||
#define _WIN32_IE_WS03SP1 _WIN32_IE_IE60SP2
|
||||
#define _WIN32_IE_WIN6 _WIN32_IE_IE70
|
||||
#define _WIN32_IE_LONGHORN _WIN32_IE_IE70
|
||||
#define _WIN32_IE_WIN7 _WIN32_IE_IE80
|
||||
#define _WIN32_IE_WIN8 _WIN32_IE_IE100
|
||||
#define _WIN32_IE_WINBLUE _WIN32_IE_IE100
|
||||
#define _WIN32_IE_WINTHRESHOLD _WIN32_IE_IE110 /* ABRACADABRA_THRESHOLD */
|
||||
#define _WIN32_IE_WIN10 _WIN32_IE_IE110 /* ABRACADABRA_THRESHOLD */
|
||||
|
||||
|
||||
//
|
||||
// NTDDI version constants
|
||||
//
|
||||
#define NTDDI_WIN2K 0x05000000
|
||||
#define NTDDI_WIN2KSP1 0x05000100
|
||||
#define NTDDI_WIN2KSP2 0x05000200
|
||||
#define NTDDI_WIN2KSP3 0x05000300
|
||||
#define NTDDI_WIN2KSP4 0x05000400
|
||||
|
||||
#define NTDDI_WINXP 0x05010000
|
||||
#define NTDDI_WINXPSP1 0x05010100
|
||||
#define NTDDI_WINXPSP2 0x05010200
|
||||
#define NTDDI_WINXPSP3 0x05010300
|
||||
#define NTDDI_WINXPSP4 0x05010400
|
||||
|
||||
#define NTDDI_WS03 0x05020000
|
||||
#define NTDDI_WS03SP1 0x05020100
|
||||
#define NTDDI_WS03SP2 0x05020200
|
||||
#define NTDDI_WS03SP3 0x05020300
|
||||
#define NTDDI_WS03SP4 0x05020400
|
||||
|
||||
#define NTDDI_WIN6 0x06000000
|
||||
#define NTDDI_WIN6SP1 0x06000100
|
||||
#define NTDDI_WIN6SP2 0x06000200
|
||||
#define NTDDI_WIN6SP3 0x06000300
|
||||
#define NTDDI_WIN6SP4 0x06000400
|
||||
|
||||
#define NTDDI_VISTA NTDDI_WIN6
|
||||
#define NTDDI_VISTASP1 NTDDI_WIN6SP1
|
||||
#define NTDDI_VISTASP2 NTDDI_WIN6SP2
|
||||
#define NTDDI_VISTASP3 NTDDI_WIN6SP3
|
||||
#define NTDDI_VISTASP4 NTDDI_WIN6SP4
|
||||
|
||||
#define NTDDI_LONGHORN NTDDI_VISTA
|
||||
|
||||
#define NTDDI_WS08 NTDDI_WIN6SP1
|
||||
#define NTDDI_WS08SP2 NTDDI_WIN6SP2
|
||||
#define NTDDI_WS08SP3 NTDDI_WIN6SP3
|
||||
#define NTDDI_WS08SP4 NTDDI_WIN6SP4
|
||||
|
||||
#define NTDDI_WIN7 0x06010000
|
||||
#define NTDDI_WIN8 0x06020000
|
||||
#define NTDDI_WINBLUE 0x06030000
|
||||
#define NTDDI_WINTHRESHOLD 0x0A000000 /* ABRACADABRA_THRESHOLD */
|
||||
#define NTDDI_WIN10 0x0A000000 /* ABRACADABRA_THRESHOLD */
|
||||
#define NTDDI_WIN10_TH2 0x0A000001 /* ABRACADABRA_WIN10_TH2 */
|
||||
|
||||
//
|
||||
// masks for version macros
|
||||
//
|
||||
#define OSVERSION_MASK 0xFFFF0000
|
||||
#define SPVERSION_MASK 0x0000FF00
|
||||
#define SUBVERSION_MASK 0x000000FF
|
||||
|
||||
|
||||
//
|
||||
// macros to extract various version fields from the NTDDI version
|
||||
//
|
||||
#define OSVER(Version) ((Version) & OSVERSION_MASK)
|
||||
#define SPVER(Version) (((Version) & SPVERSION_MASK) >> 8)
|
||||
#define SUBVER(Version) (((Version) & SUBVERSION_MASK) )
|
||||
|
||||
|
||||
#if defined(DECLSPEC_DEPRECATED_DDK)
|
||||
|
||||
// deprecate in 2k or later
|
||||
#if (NTDDI_VERSION >= NTDDI_WIN2K)
|
||||
#define DECLSPEC_DEPRECATED_DDK_WIN2K DECLSPEC_DEPRECATED_DDK
|
||||
#else
|
||||
#define DECLSPEC_DEPRECATED_DDK_WIN2K
|
||||
#endif
|
||||
|
||||
// deprecate in XP or later
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
#define DECLSPEC_DEPRECATED_DDK_WINXP DECLSPEC_DEPRECATED_DDK
|
||||
#else
|
||||
#define DECLSPEC_DEPRECATED_DDK_WINXP
|
||||
#endif
|
||||
|
||||
// deprecate in WS03 or later
|
||||
#if (NTDDI_VERSION >= NTDDI_WS03)
|
||||
#define DECLSPEC_DEPRECATED_DDK_WIN2003 DECLSPEC_DEPRECATED_DDK
|
||||
#else
|
||||
#define DECLSPEC_DEPRECATED_DDK_WIN2003
|
||||
#endif
|
||||
|
||||
// deprecate in WIN6 or later
|
||||
#if (NTDDI_VERSION >= NTDDI_WIN6)
|
||||
#define DECLSPEC_DEPRECATED_DDK_WIN6 DECLSPEC_DEPRECATED_DDK
|
||||
#else
|
||||
#define DECLSPEC_DEPRECATED_DDK_WIN6
|
||||
#endif
|
||||
|
||||
#define DECLSPEC_DEPRECATED_DDK_LONGHORN DECLSPEC_DEPRECATED_DDK_WIN6
|
||||
|
||||
#endif // defined(DECLSPEC_DEPRECATED_DDK)
|
||||
|
||||
|
||||
//
|
||||
// if versions aren't already defined, default to most current
|
||||
//
|
||||
|
||||
#define NTDDI_VERSION_FROM_WIN32_WINNT2(ver) ver##0000
|
||||
#define NTDDI_VERSION_FROM_WIN32_WINNT(ver) NTDDI_VERSION_FROM_WIN32_WINNT2(ver)
|
||||
|
||||
#if !defined(_WIN32_WINNT) && !defined(_CHICAGO_)
|
||||
#define _WIN32_WINNT 0x0A00
|
||||
#endif
|
||||
|
||||
#ifndef NTDDI_VERSION
|
||||
#ifdef _WIN32_WINNT
|
||||
// set NTDDI_VERSION based on _WIN32_WINNT
|
||||
#define NTDDI_VERSION NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT)
|
||||
#else
|
||||
#define NTDDI_VERSION 0x0A000001
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef WINVER
|
||||
#ifdef _WIN32_WINNT
|
||||
// set WINVER based on _WIN32_WINNT
|
||||
#define WINVER _WIN32_WINNT
|
||||
#else
|
||||
#define WINVER 0x0A00
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_IE
|
||||
#ifdef _WIN32_WINNT
|
||||
// set _WIN32_IE based on _WIN32_WINNT
|
||||
#if (_WIN32_WINNT <= _WIN32_WINNT_NT4)
|
||||
#define _WIN32_IE _WIN32_IE_IE50
|
||||
#elif (_WIN32_WINNT <= _WIN32_WINNT_WIN2K)
|
||||
#define _WIN32_IE _WIN32_IE_IE501
|
||||
#elif (_WIN32_WINNT <= _WIN32_WINNT_WINXP)
|
||||
#define _WIN32_IE _WIN32_IE_IE60
|
||||
#elif (_WIN32_WINNT <= _WIN32_WINNT_WS03)
|
||||
#define _WIN32_IE _WIN32_IE_WS03
|
||||
#elif (_WIN32_WINNT <= _WIN32_WINNT_VISTA)
|
||||
#define _WIN32_IE _WIN32_IE_LONGHORN
|
||||
#elif (_WIN32_WINNT <= _WIN32_WINNT_WIN7)
|
||||
#define _WIN32_IE _WIN32_IE_WIN7
|
||||
#elif (_WIN32_WINNT <= _WIN32_WINNT_WIN8)
|
||||
#define _WIN32_IE _WIN32_IE_WIN8
|
||||
#else
|
||||
#define _WIN32_IE 0x0A00
|
||||
#endif
|
||||
#else
|
||||
#define _WIN32_IE 0x0A00
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Sanity check for compatible versions
|
||||
//
|
||||
#if defined(_WIN32_WINNT) && !defined(MIDL_PASS) && !defined(RC_INVOKED)
|
||||
|
||||
#if (defined(WINVER) && (WINVER < 0x0400) && (_WIN32_WINNT > 0x0400))
|
||||
#error WINVER setting conflicts with _WIN32_WINNT setting
|
||||
#endif
|
||||
|
||||
#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_WIN2K) && (_WIN32_WINNT != _WIN32_WINNT_WIN2K))
|
||||
#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting
|
||||
#endif
|
||||
|
||||
#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP))
|
||||
#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting
|
||||
#endif
|
||||
|
||||
#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_WS03) && (_WIN32_WINNT != _WIN32_WINNT_WS03))
|
||||
#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting
|
||||
#endif
|
||||
|
||||
#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_VISTA) && (_WIN32_WINNT != _WIN32_WINNT_VISTA))
|
||||
#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting
|
||||
#endif
|
||||
|
||||
#if ((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1))
|
||||
#error _WIN32_WINNT settings conflicts with _WIN32_IE setting
|
||||
#endif
|
||||
|
||||
#endif // defined(_WIN32_WINNT) && !defined(MIDL_PASS) && !defined(_WINRESRC_)
|
||||
|
||||
#if (_MSC_VER >= 800)
|
||||
#if (_MSC_VER >= 1200)
|
||||
#pragma warning(pop)
|
||||
#else
|
||||
#pragma warning(default:4001) /* nonstandard extension : single line comment */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* !_INC_SDKDDKVER */
|
||||
|
||||
@@ -0,0 +1,240 @@
|
||||
/*
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Module Name:
|
||||
|
||||
winapifamily.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Master include file for API family partitioning.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _INC_WINAPIFAMILY
|
||||
#define _INC_WINAPIFAMILY
|
||||
|
||||
#if defined(_MSC_VER) && !defined(MOFCOMP_PASS)
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4001) /* nonstandard extension 'single line comment' was used */
|
||||
#endif
|
||||
#pragma once
|
||||
#endif // defined(_MSC_VER) && !defined(MOFCOMP_PASS)
|
||||
|
||||
#include <winpackagefamily.h>
|
||||
|
||||
/*
|
||||
* When compiling C and C++ code using SDK header files, the development
|
||||
* environment can specify a target platform by #define-ing the
|
||||
* pre-processor symbol WINAPI_FAMILY to one of the following values.
|
||||
* Each FAMILY value denotes an application family for which a different
|
||||
* subset of the total set of header-file-defined APIs are available.
|
||||
* Setting the WINAPI_FAMILY value will effectively hide from the
|
||||
* editing and compilation environments the existence of APIs that
|
||||
* are not applicable to the family of applications targeting a
|
||||
* specific platform.
|
||||
*/
|
||||
|
||||
/* In Windows 10, WINAPI_PARTITIONs will be used to add additional
|
||||
* device specific APIs to a particular WINAPI_FAMILY.
|
||||
* For example, when writing Windows Universal apps, specifying
|
||||
* WINAPI_FAMILY_APP will hide phone APIs from compilation.
|
||||
* However, specifying WINAPI_PARTITION_PHONE_APP=1 additionally, will
|
||||
* unhide any API hidden behind the partition, to the compiler.
|
||||
|
||||
* The following partitions are currently defined:
|
||||
* WINAPI_PARTITION_DESKTOP // usable for Desktop Win32 apps (but not store apps)
|
||||
* WINAPI_PARTITION_APP // usable for Windows Universal store apps
|
||||
* WINAPI_PARTITION_PC_APP // specific to Desktop-only store apps
|
||||
* WINAPI_PARTITION_PHONE_APP // specific to Phone-only store apps
|
||||
* WINAPI_PARTITION_SYSTEM // specific to System applications
|
||||
|
||||
* The following partitions are indirect partitions and defined in
|
||||
* winpackagefamily.h. These partitions are related to package based
|
||||
* partitions. For example, specifying WINAPI_PARTITION_SERVER=1 will light up
|
||||
* any API hidden behind the package based partitions that are bound to
|
||||
* WINAPI_PARTITION_SERVER, to the compiler.
|
||||
* WINAPI_PARTITION_SERVER // specific to Server applications
|
||||
*/
|
||||
|
||||
/*
|
||||
* The WINAPI_FAMILY values of 0 and 1 are reserved to ensure that
|
||||
* an error will occur if WINAPI_FAMILY is set to any
|
||||
* WINAPI_PARTITION value (which must be 0 or 1, see below).
|
||||
*/
|
||||
#define WINAPI_FAMILY_PC_APP 2 /* Windows Store Applications */
|
||||
#define WINAPI_FAMILY_PHONE_APP 3 /* Windows Phone Applications */
|
||||
#define WINAPI_FAMILY_SYSTEM 4 /* Windows Drivers and Tools */
|
||||
#define WINAPI_FAMILY_SERVER 5 /* Windows Server Applications */
|
||||
#define WINAPI_FAMILY_DESKTOP_APP 100 /* Windows Desktop Applications */
|
||||
/* The value of WINAPI_FAMILY_DESKTOP_APP may change in future SDKs. */
|
||||
/* Additional WINAPI_FAMILY values may be defined in future SDKs. */
|
||||
|
||||
/*
|
||||
* For compatibility with Windows 8 header files, the following
|
||||
* synonym for WINAPI_FAMILY_PC_APP is temporarily #define'd.
|
||||
* Use of this symbol should be considered deprecated.
|
||||
*/
|
||||
#define WINAPI_FAMILY_APP WINAPI_FAMILY_PC_APP
|
||||
|
||||
/*
|
||||
* If no WINAPI_FAMILY value is specified, then all APIs available to
|
||||
* Windows desktop applications are exposed.
|
||||
*/
|
||||
#ifndef WINAPI_FAMILY
|
||||
#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
|
||||
#endif
|
||||
|
||||
/*
|
||||
* API PARTITONs are part of an indirection mechanism for mapping between
|
||||
* individual APIs and the FAMILYs to which they apply.
|
||||
* Each PARTITION is a category or subset of named APIs. PARTITIONs
|
||||
* are permitted to have overlapping membership -- some single API
|
||||
* might be part of more than one PARTITION. PARTITIONS are each #define-ed
|
||||
* to be either 1 or 0 or depending on the platform at which the app is targeted.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The mapping between families and partitions is summarized here.
|
||||
* An X indicates that the given partition is active for the given
|
||||
* platform/family.
|
||||
*
|
||||
* +-------------------+---+
|
||||
* | *Partition* | |
|
||||
* +---+---+---+---+---+---+
|
||||
* | | | | | | |
|
||||
* | | | | | | |
|
||||
* | | | | P | | |
|
||||
* | | | | H | | |
|
||||
* | D | | | O | | |
|
||||
* | E | | P | N | S | S |
|
||||
* | S | | C | E | Y | E |
|
||||
* | K | | _ | _ | S | R |
|
||||
* | T | A | A | A | T | V |
|
||||
* +-------------------------+----+ O | P | P | P | E | E |
|
||||
* | *Platform/Family* \| P | P | P | P | M | R |
|
||||
* +------------------------------+---+---+---+---+---+---+
|
||||
* | WINAPI_FAMILY_DESKTOP_APP | X | X | X | | | |
|
||||
* +------------------------------+---+---+---+---+---+---+
|
||||
* | WINAPI_FAMILY_PC_APP | | X | X | | | |
|
||||
* +------------------------------+---+---+---+---+---+---+
|
||||
* | WINAPI_FAMILY_PHONE_APP | | X | | X | | |
|
||||
* +----------------------------- +---+---+---+---+---+---+
|
||||
* | WINAPI_FAMILY_SYSTEM | | | | | X | |
|
||||
* +----------------------------- +---+---+---+---+---+---+
|
||||
* | WINAPI_FAMILY_SERVER | | | | | X | X |
|
||||
* +------------------------------+---+---+---+---+---+---+
|
||||
*
|
||||
* The table above is encoded in the following expressions,
|
||||
* each of which evaluates to 1 or 0.
|
||||
*
|
||||
* Whenever a new family is added, all of these expressions
|
||||
* need to be reconsidered.
|
||||
*/
|
||||
#if WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP && \
|
||||
WINAPI_FAMILY != WINAPI_FAMILY_PC_APP && \
|
||||
WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP && \
|
||||
WINAPI_FAMILY != WINAPI_FAMILY_SYSTEM && \
|
||||
WINAPI_FAMILY != WINAPI_FAMILY_SERVER
|
||||
#error Unknown WINAPI_FAMILY value. Was it defined in terms of a WINAPI_PARTITION_* value?
|
||||
#endif
|
||||
|
||||
#ifndef WINAPI_PARTITION_DESKTOP
|
||||
#define WINAPI_PARTITION_DESKTOP (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
|
||||
#endif
|
||||
|
||||
#ifndef WINAPI_PARTITION_APP
|
||||
#define WINAPI_PARTITION_APP \
|
||||
(WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP || \
|
||||
WINAPI_FAMILY == WINAPI_FAMILY_PC_APP || \
|
||||
WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
|
||||
#endif
|
||||
|
||||
#ifndef WINAPI_PARTITION_PC_APP
|
||||
#define WINAPI_PARTITION_PC_APP \
|
||||
(WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP || \
|
||||
WINAPI_FAMILY == WINAPI_FAMILY_PC_APP)
|
||||
#endif
|
||||
|
||||
#ifndef WINAPI_PARTITION_PHONE_APP
|
||||
#define WINAPI_PARTITION_PHONE_APP (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* SYSTEM is the only partition defined here.
|
||||
* All other System based editions are defined as packages
|
||||
* on top of the System partition.
|
||||
* See winpackagefamily.h for packages level partitions
|
||||
*/
|
||||
#ifndef WINAPI_PARTITION_SYSTEM
|
||||
#define WINAPI_PARTITION_SYSTEM \
|
||||
(WINAPI_FAMILY == WINAPI_FAMILY_SYSTEM || \
|
||||
WINAPI_FAMILY == WINAPI_FAMILY_SERVER)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* For compatibility with Windows Phone 8 header files, the following
|
||||
* synonym for WINAPI_PARTITION_PHONE_APP is temporarily #define'd.
|
||||
* Use of this symbol should be regarded as deprecated.
|
||||
*/
|
||||
#define WINAPI_PARTITION_PHONE WINAPI_PARTITION_PHONE_APP
|
||||
|
||||
/*
|
||||
* Header files use the WINAPI_FAMILY_PARTITION macro to assign one or
|
||||
* more declarations to some group of partitions. The macro chooses
|
||||
* whether the preprocessor will emit or omit a sequence of declarations
|
||||
* bracketed by an #if/#endif pair. All header file references to the
|
||||
* WINAPI_PARTITION_* values should be in the form of occurrences of
|
||||
* WINAPI_FAMILY_PARTITION(...).
|
||||
*
|
||||
* For example, the following usage of WINAPI_FAMILY_PARTITION identifies
|
||||
* a sequence of declarations that are part of both the Windows Desktop
|
||||
* Partition and the Windows-Phone-Specific Store Partition:
|
||||
*
|
||||
* #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_PHONE_APP)
|
||||
* ...
|
||||
* #endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_PHONE_APP)
|
||||
*
|
||||
* The comment on the closing #endif allow tools as well as people to find the
|
||||
* matching #ifdef properly.
|
||||
*
|
||||
* Usages of WINAPI_FAMILY_PARTITION may be combined, when the partitition definitions are
|
||||
* related. In particular one might use declarations like
|
||||
*
|
||||
* #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
*
|
||||
* or
|
||||
*
|
||||
* #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP)
|
||||
*
|
||||
* Direct references to WINAPI_PARTITION_ values (eg #if !WINAPI_FAMILY_PARTITION_...)
|
||||
* should not be used.
|
||||
*/
|
||||
#define WINAPI_FAMILY_PARTITION(Partitions) (Partitions)
|
||||
|
||||
/*
|
||||
* Macro used to #define or typedef a symbol used for selective deprecation
|
||||
* of individual methods of a COM interfaces that are otherwise available
|
||||
* for a given set of partitions.
|
||||
*/
|
||||
#define _WINAPI_DEPRECATED_DECLARATION __declspec(deprecated("This API cannot be used in the context of the caller's application type."))
|
||||
|
||||
/*
|
||||
* For compatibility with Windows 8 header files, the following
|
||||
* symbol is temporarily conditionally #define'd. Additional symbols
|
||||
* like this should be not defined in winapifamily.h, but rather should be
|
||||
* introduced locally to the header files of the component that needs them.
|
||||
*/
|
||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
# define APP_DEPRECATED_HRESULT HRESULT _WINAPI_DEPRECATED_DECLARATION
|
||||
#endif // WINAPIFAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
|
||||
#if defined(_MSC_VER) && !defined(MOFCOMP_PASS)
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* !_INC_WINAPIFAMILY */
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Module Name:
|
||||
|
||||
winpackagefamily.h
|
||||
|
||||
Abstract:
|
||||
|
||||
API family partitioning based on packages.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _INC_WINPACKAGEFAMILY
|
||||
#define _INC_WINPACKAGEFAMILY
|
||||
|
||||
#if defined(_MSC_VER) && !defined(MOFCOMP_PASS)
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4001) /* nonstandard extension 'single line comment' was used */
|
||||
#endif
|
||||
#pragma once
|
||||
#endif // defined(_MSC_VER) && !defined(MOFCOMP_PASS)
|
||||
|
||||
#ifndef WINAPI_PARTITION_SERVER
|
||||
#define WINAPI_PARTITION_SERVER (WINAPI_FAMILY == WINAPI_FAMILY_SERVER)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* PARTITIONS based on packages are each #undef'ed below, and then will be #define-ed
|
||||
* to be either 1 or 0 or depending on the active WINAPI_FAMILY.
|
||||
*/
|
||||
#undef WINAPI_PARTITION_PKG_WINTRUST
|
||||
#undef WINAPI_PARTITION_PKG_WEBSERVICES
|
||||
#undef WINAPI_PARTITION_PKG_EVENTLOGSERVICE
|
||||
#undef WINAPI_PARTITION_PKG_VHD
|
||||
#undef WINAPI_PARTITION_PKG_PERFCOUNTER
|
||||
#undef WINAPI_PARTITION_PKG_SECURESTARTUP
|
||||
#undef WINAPI_PARTITION_PKG_REMOTEFS
|
||||
#undef WINAPI_PARTITION_PKG_BOOTABLESKU
|
||||
#undef WINAPI_PARTITION_PKG_CMD
|
||||
#undef WINAPI_PARTITION_PKG_CMDTOOLS
|
||||
#undef WINAPI_PARTITION_PKG_DISM
|
||||
#undef WINAPI_PARTITION_PKG_CORESETUP
|
||||
#undef WINAPI_PARTITION_PKG_APPRUNTIME
|
||||
#undef WINAPI_PARTITION_PKG_ESENT
|
||||
#undef WINAPI_PARTITION_PKG_WINMGMT
|
||||
#undef WINAPI_PARTITION_PKG_WNV
|
||||
#undef WINAPI_PARTITION_PKG_CLUSTER
|
||||
#undef WINAPI_PARTITION_PKG_VSS
|
||||
|
||||
/*
|
||||
* PARTITIONS for feature packages. Each package might be active for one or more editions
|
||||
*/
|
||||
#define WINAPI_PARTITION_PKG_WINTRUST (WINAPI_PARTITION_SERVER == 1)
|
||||
#define WINAPI_PARTITION_PKG_WEBSERVICES (WINAPI_PARTITION_SERVER == 1)
|
||||
#define WINAPI_PARTITION_PKG_EVENTLOGSERVICE (WINAPI_PARTITION_SERVER == 1)
|
||||
#define WINAPI_PARTITION_PKG_VHD (WINAPI_PARTITION_SERVER == 1)
|
||||
#define WINAPI_PARTITION_PKG_PERFCOUNTER (WINAPI_PARTITION_SERVER == 1)
|
||||
#define WINAPI_PARTITION_PKG_SECURESTARTUP (WINAPI_PARTITION_SERVER == 1)
|
||||
#define WINAPI_PARTITION_PKG_REMOTEFS (WINAPI_PARTITION_SERVER == 1)
|
||||
#define WINAPI_PARTITION_PKG_BOOTABLESKU (WINAPI_PARTITION_SERVER == 1)
|
||||
#define WINAPI_PARTITION_PKG_CMD (WINAPI_PARTITION_SERVER == 1)
|
||||
#define WINAPI_PARTITION_PKG_CMDTOOLS (WINAPI_PARTITION_SERVER == 1)
|
||||
#define WINAPI_PARTITION_PKG_DISM (WINAPI_PARTITION_SERVER == 1)
|
||||
#define WINAPI_PARTITION_PKG_CORESETUP (WINAPI_PARTITION_SERVER == 1)
|
||||
#define WINAPI_PARTITION_PKG_APPRUNTIME (WINAPI_PARTITION_SERVER == 1)
|
||||
#define WINAPI_PARTITION_PKG_ESENT (WINAPI_PARTITION_SERVER == 1)
|
||||
#define WINAPI_PARTITION_PKG_WINMGMT (WINAPI_PARTITION_SERVER == 1)
|
||||
#define WINAPI_PARTITION_PKG_WNV (WINAPI_PARTITION_SERVER == 1)
|
||||
#define WINAPI_PARTITION_PKG_CLUSTER (WINAPI_PARTITION_SERVER == 1)
|
||||
#define WINAPI_PARTITION_PKG_VSS (WINAPI_PARTITION_SERVER == 1)
|
||||
|
||||
#if defined(_MSC_VER) && !defined(MOFCOMP_PASS)
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* !_INC_WINPACKAGEFAMILY */
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -266,7 +266,7 @@ public:
|
||||
.setOptLevel(llvm::CodeGenOpt::Aggressive)
|
||||
.setMCPU("nehalem")
|
||||
.create();
|
||||
module_ptr->setDataLayout(execution_engine->getDataLayout());
|
||||
module_ptr->setDataLayout(*execution_engine->getDataLayout());
|
||||
|
||||
execution_engine->finalizeObject();
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
#pragma once
|
||||
#ifdef _MSC_VER
|
||||
|
||||
#include "minidx12/Include/sdkddkver.h" // Use last SDKDDKVer in SDK 10.586 for Win10
|
||||
#include "Emu/Audio/AudioThread.h"
|
||||
|
||||
#pragma push_macro("_WIN32_WINNT")
|
||||
#undef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0601 // This is to be sure that correct (2.7) header is included
|
||||
#include "minidx9/Include/XAudio2.h" // XAudio2 2.8 available only on Win8+, used XAudio2 2.7 from dxsdk
|
||||
#pragma pop_macro("_WIN32_WINNT")
|
||||
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) // XAudio2 2.8 and 2.9 available only on Win8+ and Win10.
|
||||
#include "minidx12/Include/xaudio2.h"
|
||||
#else
|
||||
#include "minidx9/Include/XAudio2.h" // XAudio 2.7 for Windows 7 Only
|
||||
#endif
|
||||
|
||||
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN10)
|
||||
#pragma comment(lib,"../minidx12/Lib/xaudio2.lib") // Lib 2.9 for Only Windows 10
|
||||
#elif (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
|
||||
#pragma comment(lib,"../minidx12/Lib/xaudio2_8.lib") // Lib 2.8 for Only Windows 8+
|
||||
#endif
|
||||
|
||||
class XAudio2Thread : public AudioThread
|
||||
{
|
||||
|
||||
@@ -73,12 +73,14 @@ void ppu_interpreter::TWI(PPUThread& CPU, ppu_opcode_t op)
|
||||
|
||||
void ppu_interpreter::MFVSCR(PPUThread& CPU, ppu_opcode_t op)
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
CPU.VPR[op.vd]._u32[0] = CPU.VSCR.VSCR;
|
||||
CPU.VPR[op.vd].clear();
|
||||
}
|
||||
|
||||
void ppu_interpreter::MTVSCR(PPUThread& CPU, ppu_opcode_t op)
|
||||
{
|
||||
// ignored (MFVSCR disabled)
|
||||
CPU.VSCR.VSCR = CPU.VPR[op.vb]._u32[0];
|
||||
CPU.VSCR.X = CPU.VSCR.Y = 0;
|
||||
}
|
||||
|
||||
void ppu_interpreter::VADDCUW(PPUThread& CPU, ppu_opcode_t op)
|
||||
@@ -1696,7 +1698,7 @@ void ppu_interpreter::TW(PPUThread& CPU, ppu_opcode_t op)
|
||||
((u32)a < (u32)b && (op.bo & 0x2)) ||
|
||||
((u32)a >(u32)b && (op.bo & 0x1)))
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
//throw EXCEPTION("");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2571,14 +2571,11 @@ private:
|
||||
s32 a = (s32)CPU.GPR[ra];
|
||||
s32 b = (s32)CPU.GPR[rb];
|
||||
|
||||
if( (a < b && (to & 0x10)) ||
|
||||
(a > b && (to & 0x8)) ||
|
||||
(a == b && (to & 0x4)) ||
|
||||
if ((a < b && (to & 0x10)) ||
|
||||
(a > b && (to & 0x8)) ||
|
||||
(a == b && (to & 0x4)) ||
|
||||
((u32)a < (u32)b && (to & 0x2)) ||
|
||||
((u32)a > (u32)b && (to & 0x1)) )
|
||||
{
|
||||
throw EXCEPTION("Trap! (tw 0x%x, r%d, r%d)", to, ra, rb);
|
||||
}
|
||||
((u32)a >(u32)b && (to & 0x1)));
|
||||
}
|
||||
void LVSL(u32 vd, u32 ra, u32 rb) override
|
||||
{
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include "llvm/Support/Host.h"
|
||||
#include "llvm/Support/ManagedStatic.h"
|
||||
#include "llvm/ExecutionEngine/GenericValue.h"
|
||||
#include "llvm/ExecutionEngine/MCJIT.h"
|
||||
#include "llvm/IR/Intrinsics.h"
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Analysis/Passes.h"
|
||||
@@ -64,10 +63,10 @@ std::unique_ptr<Module> Compiler::create_module(LLVMContext &llvm_context)
|
||||
|
||||
void Compiler::optimise_module(llvm::Module *module)
|
||||
{
|
||||
llvm::FunctionPassManager fpm(module);
|
||||
llvm::legacy::FunctionPassManager fpm(module);
|
||||
fpm.add(createNoAAPass());
|
||||
fpm.add(createBasicAliasAnalysisPass());
|
||||
fpm.add(createNoTargetTransformInfoPass());
|
||||
fpm.add(createTargetTransformInfoWrapperPass(TargetIRAnalysis()));
|
||||
fpm.add(createEarlyCSEPass());
|
||||
fpm.add(createTailCallEliminationPass());
|
||||
fpm.add(createReassociatePass());
|
||||
@@ -78,7 +77,7 @@ void Compiler::optimise_module(llvm::Module *module)
|
||||
fpm.add(createInstructionCombiningPass());
|
||||
fpm.add(new MemoryDependenceAnalysis());
|
||||
fpm.add(createDeadStoreEliminationPass());
|
||||
fpm.add(new LoopInfo());
|
||||
fpm.add(new LoopInfoWrapperPass());
|
||||
fpm.add(new ScalarEvolution());
|
||||
fpm.add(createSLPVectorizerPass());
|
||||
fpm.add(createInstructionCombiningPass());
|
||||
@@ -413,7 +412,7 @@ std::pair<Executable, llvm::ExecutionEngine *> RecompilationEngine::compile(cons
|
||||
.setOptLevel(llvm::CodeGenOpt::Aggressive)
|
||||
.setMCPU("nehalem")
|
||||
.create();
|
||||
module_ptr->setDataLayout(execution_engine->getDataLayout());
|
||||
module_ptr->setDataLayout(*execution_engine->getDataLayout());
|
||||
|
||||
// Translate to machine code
|
||||
execution_engine->finalizeObject();
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push, 0)
|
||||
#endif
|
||||
#include "llvm/ExecutionEngine/ExecutionEngine.h"
|
||||
#include "llvm/ExecutionEngine/MCJIT.h"
|
||||
#include "llvm/ExecutionEngine/SectionMemoryManager.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/IR/GlobalVariable.h"
|
||||
#include "llvm/PassManager.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/LegacyPassManager.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
@@ -144,7 +144,7 @@ void Compiler::VADDFP(u32 vd, u32 va, u32 vb) {
|
||||
void Compiler::VADDSBS(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v16i8 = GetVrAsIntVec(va, 8);
|
||||
auto vb_v16i8 = GetVrAsIntVec(vb, 8);
|
||||
auto sum_v16i8 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_padds_b), va_v16i8, vb_v16i8);
|
||||
auto sum_v16i8 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_padds_b), { va_v16i8, vb_v16i8 });
|
||||
SetVr(vd, sum_v16i8);
|
||||
|
||||
// TODO: Set VSCR.SAT
|
||||
@@ -153,7 +153,7 @@ void Compiler::VADDSBS(u32 vd, u32 va, u32 vb) {
|
||||
void Compiler::VADDSHS(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v8i16 = GetVrAsIntVec(va, 16);
|
||||
auto vb_v8i16 = GetVrAsIntVec(vb, 16);
|
||||
auto sum_v8i16 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_padds_w), va_v8i16, vb_v8i16);
|
||||
auto sum_v8i16 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_padds_w), { va_v8i16, vb_v8i16 });
|
||||
SetVr(vd, sum_v8i16);
|
||||
|
||||
// TODO: Set VSCR.SAT
|
||||
@@ -194,7 +194,7 @@ void Compiler::VADDSWS(u32 vd, u32 va, u32 vb) {
|
||||
auto tmp3_v16i8 = m_ir_builder->CreateBitCast(tmp3_v4i32, VectorType::get(m_ir_builder->getInt8Ty(), 16));
|
||||
|
||||
// tmp4 is equal to 0xFFFFFFFF if an overflow occured and 0x00000000 otherwise.
|
||||
auto res_v16i8 = m_ir_builder->CreateCall3(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pblendvb), sum_v16i8, tmp1_v16i8, tmp3_v16i8);
|
||||
auto res_v16i8 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pblendvb), { sum_v16i8, tmp1_v16i8, tmp3_v16i8 });
|
||||
SetVr(vd, res_v16i8);
|
||||
|
||||
// TODO: Set SAT
|
||||
@@ -210,7 +210,7 @@ void Compiler::VADDUBM(u32 vd, u32 va, u32 vb) {
|
||||
void Compiler::VADDUBS(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v16i8 = GetVrAsIntVec(va, 8);
|
||||
auto vb_v16i8 = GetVrAsIntVec(vb, 8);
|
||||
auto sum_v16i8 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_paddus_b), va_v16i8, vb_v16i8);
|
||||
auto sum_v16i8 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_paddus_b), { va_v16i8, vb_v16i8 });
|
||||
SetVr(vd, sum_v16i8);
|
||||
|
||||
// TODO: Set SAT
|
||||
@@ -226,7 +226,7 @@ void Compiler::VADDUHM(u32 vd, u32 va, u32 vb) {
|
||||
void Compiler::VADDUHS(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v8i16 = GetVrAsIntVec(va, 16);
|
||||
auto vb_v8i16 = GetVrAsIntVec(vb, 16);
|
||||
auto sum_v8i16 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_paddus_w), va_v8i16, vb_v8i16);
|
||||
auto sum_v8i16 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_paddus_w), { va_v8i16, vb_v8i16 });
|
||||
SetVr(vd, sum_v8i16);
|
||||
|
||||
// TODO: Set SAT
|
||||
@@ -305,14 +305,14 @@ void Compiler::VAVGSW(u32 vd, u32 va, u32 vb) {
|
||||
void Compiler::VAVGUB(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v16i8 = GetVrAsIntVec(va, 8);
|
||||
auto vb_v16i8 = GetVrAsIntVec(vb, 8);
|
||||
auto avg_v16i8 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_pavg_b), va_v16i8, vb_v16i8);
|
||||
auto avg_v16i8 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_pavg_b), { va_v16i8, vb_v16i8 });
|
||||
SetVr(vd, avg_v16i8);
|
||||
}
|
||||
|
||||
void Compiler::VAVGUH(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v8i16 = GetVrAsIntVec(va, 16);
|
||||
auto vb_v8i16 = GetVrAsIntVec(vb, 16);
|
||||
auto avg_v8i16 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_pavg_w), va_v8i16, vb_v8i16);
|
||||
auto avg_v8i16 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_pavg_w), { va_v8i16, vb_v8i16 });
|
||||
SetVr(vd, avg_v8i16);
|
||||
}
|
||||
|
||||
@@ -557,7 +557,7 @@ void Compiler::VCTUXS(u32 vd, u32 uimm5, u32 vb) {
|
||||
vb_v4f32 = m_ir_builder->CreateFMul(vb_v4f32, m_ir_builder->CreateVectorSplat(4, ConstantFP::get(m_ir_builder->getFloatTy(), 1 << uimm5)));
|
||||
}
|
||||
|
||||
auto res_v4f32 = (Value *)m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse_max_ps), vb_v4f32, m_ir_builder->CreateVectorSplat(4, ConstantFP::get(m_ir_builder->getFloatTy(), 0)));
|
||||
auto res_v4f32 = (Value *)m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse_max_ps), { vb_v4f32, m_ir_builder->CreateVectorSplat(4, ConstantFP::get(m_ir_builder->getFloatTy(), 0)) });
|
||||
auto cmp_v4i1 = m_ir_builder->CreateFCmpOGE(res_v4f32, m_ir_builder->CreateVectorSplat(4, ConstantFP::get(m_ir_builder->getFloatTy(), 0xFFFFFFFFu)));
|
||||
auto cmp_v4i32 = m_ir_builder->CreateSExt(cmp_v4i1, VectorType::get(m_ir_builder->getInt32Ty(), 4));
|
||||
auto res_v4i32 = m_ir_builder->CreateFPToUI(res_v4f32, VectorType::get(m_ir_builder->getInt32Ty(), 4));
|
||||
@@ -569,8 +569,8 @@ void Compiler::VCTUXS(u32 vd, u32 uimm5, u32 vb) {
|
||||
|
||||
void Compiler::VEXPTEFP(u32 vd, u32 vb) {
|
||||
auto vb_v4f32 = GetVrAsFloatVec(vb);
|
||||
auto res_v4f32 = (Value *)m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::pow, VectorType::get(m_ir_builder->getFloatTy(), 4)),
|
||||
m_ir_builder->CreateVectorSplat(4, ConstantFP::get(m_ir_builder->getFloatTy(), 2.0f)), vb_v4f32);
|
||||
auto res_v4f32 = (Value *)m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::pow, VectorType::get(m_ir_builder->getFloatTy(), 4)),
|
||||
{ m_ir_builder->CreateVectorSplat(4, ConstantFP::get(m_ir_builder->getFloatTy(), 2.0f)), vb_v4f32 });
|
||||
SetVr(vd, res_v4f32);
|
||||
}
|
||||
|
||||
@@ -584,56 +584,56 @@ void Compiler::VMADDFP(u32 vd, u32 va, u32 vc, u32 vb) {
|
||||
auto va_v4f32 = GetVrAsFloatVec(va);
|
||||
auto vb_v4f32 = GetVrAsFloatVec(vb);
|
||||
auto vc_v4f32 = GetVrAsFloatVec(vc);
|
||||
auto res_v4f32 = m_ir_builder->CreateCall3(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, VectorType::get(m_ir_builder->getFloatTy(), 4)), va_v4f32, vc_v4f32, vb_v4f32);
|
||||
auto res_v4f32 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, VectorType::get(m_ir_builder->getFloatTy(), 4)), { va_v4f32, vc_v4f32, vb_v4f32 });
|
||||
SetVr(vd, res_v4f32);
|
||||
}
|
||||
|
||||
void Compiler::VMAXFP(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v4f32 = GetVrAsFloatVec(va);
|
||||
auto vb_v4f32 = GetVrAsFloatVec(vb);
|
||||
auto res_v4f32 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse_max_ps), va_v4f32, vb_v4f32);
|
||||
auto res_v4f32 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse_max_ps), { va_v4f32, vb_v4f32 });
|
||||
SetVr(vd, res_v4f32);
|
||||
}
|
||||
|
||||
void Compiler::VMAXSB(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v16i8 = GetVrAsIntVec(va, 8);
|
||||
auto vb_v16i8 = GetVrAsIntVec(vb, 8);
|
||||
auto res_v16i8 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pmaxsb), va_v16i8, vb_v16i8);
|
||||
auto res_v16i8 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pmaxsb), { va_v16i8, vb_v16i8 });
|
||||
SetVr(vd, res_v16i8);
|
||||
}
|
||||
|
||||
void Compiler::VMAXSH(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v8i16 = GetVrAsIntVec(va, 16);
|
||||
auto vb_v8i16 = GetVrAsIntVec(vb, 16);
|
||||
auto res_v8i16 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_pmaxs_w), va_v8i16, vb_v8i16);
|
||||
auto res_v8i16 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_pmaxs_w), { va_v8i16, vb_v8i16 });
|
||||
SetVr(vd, res_v8i16);
|
||||
}
|
||||
|
||||
void Compiler::VMAXSW(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v4i32 = GetVrAsIntVec(va, 32);
|
||||
auto vb_v4i32 = GetVrAsIntVec(vb, 32);
|
||||
auto res_v4i32 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pmaxsd), va_v4i32, vb_v4i32);
|
||||
auto res_v4i32 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pmaxsd), { va_v4i32, vb_v4i32 });
|
||||
SetVr(vd, res_v4i32);
|
||||
}
|
||||
|
||||
void Compiler::VMAXUB(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v16i8 = GetVrAsIntVec(va, 8);
|
||||
auto vb_v16i8 = GetVrAsIntVec(vb, 8);
|
||||
auto res_v16i8 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_pmaxu_b), va_v16i8, vb_v16i8);
|
||||
auto res_v16i8 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_pmaxu_b), { va_v16i8, vb_v16i8 });
|
||||
SetVr(vd, res_v16i8);
|
||||
}
|
||||
|
||||
void Compiler::VMAXUH(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v8i16 = GetVrAsIntVec(va, 16);
|
||||
auto vb_v8i16 = GetVrAsIntVec(vb, 16);
|
||||
auto res_v8i16 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pmaxuw), va_v8i16, vb_v8i16);
|
||||
auto res_v8i16 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pmaxuw), { va_v8i16, vb_v8i16 });
|
||||
SetVr(vd, res_v8i16);
|
||||
}
|
||||
|
||||
void Compiler::VMAXUW(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v4i32 = GetVrAsIntVec(va, 32);
|
||||
auto vb_v4i32 = GetVrAsIntVec(vb, 32);
|
||||
auto res_v4i32 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pmaxud), va_v4i32, vb_v4i32);
|
||||
auto res_v4i32 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pmaxud), { va_v4i32, vb_v4i32 });
|
||||
SetVr(vd, res_v4i32);
|
||||
}
|
||||
|
||||
@@ -652,7 +652,7 @@ void Compiler::VMHADDSHS(u32 vd, u32 va, u32 vb, u32 vc) {
|
||||
auto res1_v4i32 = m_ir_builder->CreateShuffleVector(res_v8i32, UndefValue::get(VectorType::get(m_ir_builder->getInt32Ty(), 8)), ConstantDataVector::get(m_ir_builder->getContext(), mask1_v4i32));
|
||||
u32 mask2_v4i32[4] = { 4, 5, 6, 7 };
|
||||
auto res2_v4i32 = m_ir_builder->CreateShuffleVector(res_v8i32, UndefValue::get(VectorType::get(m_ir_builder->getInt32Ty(), 8)), ConstantDataVector::get(m_ir_builder->getContext(), mask2_v4i32));
|
||||
auto res_v8i16 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_packssdw_128), res1_v4i32, res2_v4i32);
|
||||
auto res_v8i16 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_packssdw_128), { res1_v4i32, res2_v4i32 });
|
||||
SetVr(vd, res_v8i16);
|
||||
|
||||
// TODO: Set VSCR.SAT
|
||||
@@ -674,7 +674,7 @@ void Compiler::VMHRADDSHS(u32 vd, u32 va, u32 vb, u32 vc) {
|
||||
auto res1_v4i32 = m_ir_builder->CreateShuffleVector(res_v8i32, UndefValue::get(VectorType::get(m_ir_builder->getInt32Ty(), 8)), ConstantDataVector::get(m_ir_builder->getContext(), mask1_v4i32));
|
||||
u32 mask2_v4i32[4] = { 4, 5, 6, 7 };
|
||||
auto res2_v4i32 = m_ir_builder->CreateShuffleVector(res_v8i32, UndefValue::get(VectorType::get(m_ir_builder->getInt32Ty(), 8)), ConstantDataVector::get(m_ir_builder->getContext(), mask2_v4i32));
|
||||
auto res_v8i16 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_packssdw_128), res1_v4i32, res2_v4i32);
|
||||
auto res_v8i16 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_packssdw_128), { res1_v4i32, res2_v4i32 });
|
||||
SetVr(vd, res_v8i16);
|
||||
|
||||
// TODO: Set VSCR.SAT
|
||||
@@ -683,49 +683,49 @@ void Compiler::VMHRADDSHS(u32 vd, u32 va, u32 vb, u32 vc) {
|
||||
void Compiler::VMINFP(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v4f32 = GetVrAsFloatVec(va);
|
||||
auto vb_v4f32 = GetVrAsFloatVec(vb);
|
||||
auto res_v4f32 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse_min_ps), va_v4f32, vb_v4f32);
|
||||
auto res_v4f32 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse_min_ps), { va_v4f32, vb_v4f32 });
|
||||
SetVr(vd, res_v4f32);
|
||||
}
|
||||
|
||||
void Compiler::VMINSB(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v16i8 = GetVrAsIntVec(va, 8);
|
||||
auto vb_v16i8 = GetVrAsIntVec(vb, 8);
|
||||
auto res_v16i8 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pminsb), va_v16i8, vb_v16i8);
|
||||
auto res_v16i8 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pminsb), { va_v16i8, vb_v16i8 });
|
||||
SetVr(vd, res_v16i8);
|
||||
}
|
||||
|
||||
void Compiler::VMINSH(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v8i16 = GetVrAsIntVec(va, 16);
|
||||
auto vb_v8i16 = GetVrAsIntVec(vb, 16);
|
||||
auto res_v8i16 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_pmins_w), va_v8i16, vb_v8i16);
|
||||
auto res_v8i16 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_pmins_w), { va_v8i16, vb_v8i16 });
|
||||
SetVr(vd, res_v8i16);
|
||||
}
|
||||
|
||||
void Compiler::VMINSW(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v4i32 = GetVrAsIntVec(va, 32);
|
||||
auto vb_v4i32 = GetVrAsIntVec(vb, 32);
|
||||
auto res_v4i32 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pminsd), va_v4i32, vb_v4i32);
|
||||
auto res_v4i32 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pminsd), { va_v4i32, vb_v4i32 });
|
||||
SetVr(vd, res_v4i32);
|
||||
}
|
||||
|
||||
void Compiler::VMINUB(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v16i8 = GetVrAsIntVec(va, 8);
|
||||
auto vb_v16i8 = GetVrAsIntVec(vb, 8);
|
||||
auto res_v16i8 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_pminu_b), va_v16i8, vb_v16i8);
|
||||
auto res_v16i8 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_pminu_b), { va_v16i8, vb_v16i8 });
|
||||
SetVr(vd, res_v16i8);
|
||||
}
|
||||
|
||||
void Compiler::VMINUH(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v8i16 = GetVrAsIntVec(va, 16);
|
||||
auto vb_v8i16 = GetVrAsIntVec(vb, 16);
|
||||
auto res_v8i16 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pminuw), va_v8i16, vb_v8i16);
|
||||
auto res_v8i16 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pminuw), { va_v8i16, vb_v8i16 });
|
||||
SetVr(vd, res_v8i16);
|
||||
}
|
||||
|
||||
void Compiler::VMINUW(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v4i32 = GetVrAsIntVec(va, 32);
|
||||
auto vb_v4i32 = GetVrAsIntVec(vb, 32);
|
||||
auto res_v4i32 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pminud), va_v4i32, vb_v4i32);
|
||||
auto res_v4i32 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pminud), { va_v4i32, vb_v4i32 });
|
||||
SetVr(vd, res_v4i32);
|
||||
}
|
||||
|
||||
@@ -822,7 +822,7 @@ void Compiler::VMSUMSHM(u32 vd, u32 va, u32 vb, u32 vc) {
|
||||
auto va_v8i16 = GetVrAsIntVec(va, 16);
|
||||
auto vb_v8i16 = GetVrAsIntVec(vb, 16);
|
||||
auto vc_v4i32 = GetVrAsIntVec(vc, 32);
|
||||
auto res_v4i32 = (Value *)m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_pmadd_wd), va_v8i16, vb_v8i16);
|
||||
auto res_v4i32 = (Value *)m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_pmadd_wd), { va_v8i16, vb_v8i16 });
|
||||
res_v4i32 = m_ir_builder->CreateAdd(res_v4i32, vc_v4i32);
|
||||
SetVr(vd, res_v4i32);
|
||||
}
|
||||
@@ -831,7 +831,7 @@ void Compiler::VMSUMSHS(u32 vd, u32 va, u32 vb, u32 vc) {
|
||||
auto va_v8i16 = GetVrAsIntVec(va, 16);
|
||||
auto vb_v8i16 = GetVrAsIntVec(vb, 16);
|
||||
auto vc_v4i32 = GetVrAsIntVec(vc, 32);
|
||||
auto res_v4i32 = (Value *)m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_pmadd_wd), va_v8i16, vb_v8i16);
|
||||
auto res_v4i32 = (Value *)m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_pmadd_wd), { va_v8i16, vb_v8i16 });
|
||||
|
||||
auto tmp1_v4i32 = m_ir_builder->CreateLShr(vc_v4i32, 31);
|
||||
tmp1_v4i32 = m_ir_builder->CreateAdd(tmp1_v4i32, m_ir_builder->CreateVectorSplat(4, m_ir_builder->getInt32(0x7FFFFFFF)));
|
||||
@@ -844,7 +844,7 @@ void Compiler::VMSUMSHS(u32 vd, u32 va, u32 vb, u32 vc) {
|
||||
tmp3_v4i32 = m_ir_builder->CreateAnd(tmp2_v4i32, tmp3_v4i32);
|
||||
tmp3_v4i32 = m_ir_builder->CreateAShr(tmp3_v4i32, 31);
|
||||
auto tmp3_v16i8 = m_ir_builder->CreateBitCast(tmp3_v4i32, VectorType::get(m_ir_builder->getInt8Ty(), 16));
|
||||
auto res_v16i8 = m_ir_builder->CreateCall3(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pblendvb), sum_v16i8, tmp1_v16i8, tmp3_v16i8);
|
||||
auto res_v16i8 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pblendvb), { sum_v16i8, tmp1_v16i8, tmp3_v16i8 });
|
||||
SetVr(vd, res_v16i8);
|
||||
|
||||
// TODO: Set VSCR.SAT
|
||||
@@ -1015,7 +1015,7 @@ void Compiler::VNMSUBFP(u32 vd, u32 va, u32 vc, u32 vb) {
|
||||
auto vb_v4f32 = GetVrAsFloatVec(vb);
|
||||
auto vc_v4f32 = GetVrAsFloatVec(vc);
|
||||
vc_v4f32 = m_ir_builder->CreateFNeg(vc_v4f32);
|
||||
auto res_v4f32 = (Value *)m_ir_builder->CreateCall3(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, VectorType::get(m_ir_builder->getFloatTy(), 4)), va_v4f32, vc_v4f32, vb_v4f32);
|
||||
auto res_v4f32 = (Value *)m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, VectorType::get(m_ir_builder->getFloatTy(), 4)), { va_v4f32, vc_v4f32, vb_v4f32 });
|
||||
SetVr(vd, res_v4f32);
|
||||
}
|
||||
|
||||
@@ -1044,13 +1044,13 @@ void Compiler::VPERM(u32 vd, u32 va, u32 vb, u32 vc) {
|
||||
|
||||
auto fifteen_v16i8 = m_ir_builder->CreateVectorSplat(16, m_ir_builder->getInt8(15));
|
||||
auto vc_le15_v16i8 = m_ir_builder->CreateSub(fifteen_v16i8, vc_v16i8);
|
||||
auto res_va_v16i8 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_ssse3_pshuf_b_128), va_v16i8, vc_le15_v16i8);
|
||||
auto res_va_v16i8 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_ssse3_pshuf_b_128), { va_v16i8, vc_le15_v16i8 });
|
||||
|
||||
auto vc_gt15_v16i8 = m_ir_builder->CreateSub(thrity_one_v16i8, vc_v16i8);
|
||||
auto cmp_i1 = m_ir_builder->CreateICmpUGT(vc_gt15_v16i8, fifteen_v16i8);
|
||||
auto cmp_i8 = m_ir_builder->CreateSExt(cmp_i1, VectorType::get(m_ir_builder->getInt8Ty(), 16));
|
||||
vc_gt15_v16i8 = m_ir_builder->CreateOr(cmp_i8, vc_gt15_v16i8);
|
||||
auto res_vb_v16i8 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_ssse3_pshuf_b_128), vb_v16i8, vc_gt15_v16i8);
|
||||
auto res_vb_v16i8 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_ssse3_pshuf_b_128), { vb_v16i8, vc_gt15_v16i8 });
|
||||
|
||||
auto res_v16i8 = m_ir_builder->CreateOr(res_vb_v16i8, res_va_v16i8);
|
||||
SetVr(vd, res_v16i8);
|
||||
@@ -1093,7 +1093,7 @@ void Compiler::VPKPX(u32 vd, u32 va, u32 vb) {
|
||||
void Compiler::VPKSHSS(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v8i16 = GetVrAsIntVec(va, 16);
|
||||
auto vb_v8i16 = GetVrAsIntVec(vb, 16);
|
||||
auto res_v16i8 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_packsswb_128), vb_v8i16, va_v8i16);
|
||||
auto res_v16i8 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_packsswb_128), { vb_v8i16, va_v8i16 });
|
||||
SetVr(vd, res_v16i8);
|
||||
|
||||
// TODO: VSCR.SAT
|
||||
@@ -1102,7 +1102,7 @@ void Compiler::VPKSHSS(u32 vd, u32 va, u32 vb) {
|
||||
void Compiler::VPKSHUS(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v8i16 = GetVrAsIntVec(va, 16);
|
||||
auto vb_v8i16 = GetVrAsIntVec(vb, 16);
|
||||
auto res_v16i8 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_packuswb_128), vb_v8i16, va_v8i16);
|
||||
auto res_v16i8 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_packuswb_128), { vb_v8i16, va_v8i16 });
|
||||
SetVr(vd, res_v16i8);
|
||||
|
||||
// TODO: VSCR.SAT
|
||||
@@ -1111,7 +1111,7 @@ void Compiler::VPKSHUS(u32 vd, u32 va, u32 vb) {
|
||||
void Compiler::VPKSWSS(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v4i32 = GetVrAsIntVec(va, 32);
|
||||
auto vb_v4i32 = GetVrAsIntVec(vb, 32);
|
||||
auto res_v8i16 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_packssdw_128), vb_v4i32, va_v4i32);
|
||||
auto res_v8i16 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_packssdw_128), { vb_v4i32, va_v4i32 });
|
||||
SetVr(vd, res_v8i16);
|
||||
|
||||
// TODO: VSCR.SAT
|
||||
@@ -1120,7 +1120,7 @@ void Compiler::VPKSWSS(u32 vd, u32 va, u32 vb) {
|
||||
void Compiler::VPKSWUS(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v4i32 = GetVrAsIntVec(va, 32);
|
||||
auto vb_v4i32 = GetVrAsIntVec(vb, 32);
|
||||
auto res_v8i16 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_packusdw), vb_v4i32, va_v4i32);
|
||||
auto res_v8i16 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_packusdw), { vb_v4i32, va_v4i32 });
|
||||
SetVr(vd, res_v8i16);
|
||||
|
||||
// TODO: VSCR.SAT
|
||||
@@ -1138,8 +1138,8 @@ void Compiler::VPKUHUM(u32 vd, u32 va, u32 vb) {
|
||||
void Compiler::VPKUHUS(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v8i16 = GetVrAsIntVec(va, 16);
|
||||
auto vb_v8i16 = GetVrAsIntVec(vb, 16);
|
||||
va_v8i16 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pminuw), va_v8i16, m_ir_builder->CreateVectorSplat(8, m_ir_builder->getInt16(0xFF)));
|
||||
vb_v8i16 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pminuw), vb_v8i16, m_ir_builder->CreateVectorSplat(8, m_ir_builder->getInt16(0xFF)));
|
||||
va_v8i16 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pminuw), { va_v8i16, m_ir_builder->CreateVectorSplat(8, m_ir_builder->getInt16(0xFF)) });
|
||||
vb_v8i16 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pminuw), { vb_v8i16, m_ir_builder->CreateVectorSplat(8, m_ir_builder->getInt16(0xFF)) });
|
||||
auto va_v16i8 = m_ir_builder->CreateBitCast(va_v8i16, VectorType::get(m_ir_builder->getInt8Ty(), 16));
|
||||
auto vb_v16i8 = m_ir_builder->CreateBitCast(vb_v8i16, VectorType::get(m_ir_builder->getInt8Ty(), 16));
|
||||
|
||||
@@ -1162,8 +1162,8 @@ void Compiler::VPKUWUM(u32 vd, u32 va, u32 vb) {
|
||||
void Compiler::VPKUWUS(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v4i32 = GetVrAsIntVec(va, 32);
|
||||
auto vb_v4i32 = GetVrAsIntVec(vb, 32);
|
||||
va_v4i32 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pminud), va_v4i32, m_ir_builder->CreateVectorSplat(4, m_ir_builder->getInt32(0xFFFF)));
|
||||
vb_v4i32 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pminud), vb_v4i32, m_ir_builder->CreateVectorSplat(4, m_ir_builder->getInt32(0xFFFF)));
|
||||
va_v4i32 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pminud), { va_v4i32, m_ir_builder->CreateVectorSplat(4, m_ir_builder->getInt32(0xFFFF)) });
|
||||
vb_v4i32 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pminud), { vb_v4i32, m_ir_builder->CreateVectorSplat(4, m_ir_builder->getInt32(0xFFFF)) });
|
||||
auto va_v8i16 = m_ir_builder->CreateBitCast(va_v4i32, VectorType::get(m_ir_builder->getInt16Ty(), 8));
|
||||
auto vb_v8i16 = m_ir_builder->CreateBitCast(vb_v4i32, VectorType::get(m_ir_builder->getInt16Ty(), 8));
|
||||
|
||||
@@ -1434,7 +1434,7 @@ void Compiler::VSUBFP(u32 vd, u32 va, u32 vb) {
|
||||
void Compiler::VSUBSBS(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v16i8 = GetVrAsIntVec(va, 8);
|
||||
auto vb_v16i8 = GetVrAsIntVec(vb, 8);
|
||||
auto diff_v16i8 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_psubs_b), va_v16i8, vb_v16i8);
|
||||
auto diff_v16i8 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_psubs_b), { va_v16i8, vb_v16i8 });
|
||||
SetVr(vd, diff_v16i8);
|
||||
|
||||
// TODO: Set VSCR.SAT
|
||||
@@ -1443,7 +1443,7 @@ void Compiler::VSUBSBS(u32 vd, u32 va, u32 vb) {
|
||||
void Compiler::VSUBSHS(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v8i16 = GetVrAsIntVec(va, 16);
|
||||
auto vb_v8i16 = GetVrAsIntVec(vb, 16);
|
||||
auto diff_v8i16 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_psubs_w), va_v8i16, vb_v8i16);
|
||||
auto diff_v8i16 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_psubs_w), { va_v8i16, vb_v8i16 });
|
||||
SetVr(vd, diff_v8i16);
|
||||
|
||||
// TODO: Set VSCR.SAT
|
||||
@@ -1474,7 +1474,7 @@ void Compiler::VSUBSWS(u32 vd, u32 va, u32 vb) {
|
||||
auto tmp3_v16i8 = m_ir_builder->CreateBitCast(tmp3_v4i32, VectorType::get(m_ir_builder->getInt8Ty(), 16));
|
||||
|
||||
// tmp4 is equal to 0xFFFFFFFF if an overflow occured and 0x00000000 otherwise.
|
||||
auto res_v16i8 = m_ir_builder->CreateCall3(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pblendvb), diff_v16i8, tmp1_v16i8, tmp3_v16i8);
|
||||
auto res_v16i8 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse41_pblendvb), { diff_v16i8, tmp1_v16i8, tmp3_v16i8 });
|
||||
SetVr(vd, res_v16i8);
|
||||
|
||||
// TODO: Set SAT
|
||||
@@ -1490,7 +1490,7 @@ void Compiler::VSUBUBM(u32 vd, u32 va, u32 vb) {
|
||||
void Compiler::VSUBUBS(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v16i8 = GetVrAsIntVec(va, 8);
|
||||
auto vb_v16i8 = GetVrAsIntVec(vb, 8);
|
||||
auto diff_v16i8 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_psubus_b), va_v16i8, vb_v16i8);
|
||||
auto diff_v16i8 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_psubus_b), {va_v16i8, vb_v16i8});
|
||||
SetVr(vd, diff_v16i8);
|
||||
|
||||
// TODO: Set SAT
|
||||
@@ -1506,7 +1506,7 @@ void Compiler::VSUBUHM(u32 vd, u32 va, u32 vb) {
|
||||
void Compiler::VSUBUHS(u32 vd, u32 va, u32 vb) {
|
||||
auto va_v8i16 = GetVrAsIntVec(va, 16);
|
||||
auto vb_v8i16 = GetVrAsIntVec(vb, 16);
|
||||
auto diff_v8i16 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_psubus_w), va_v8i16, vb_v8i16);
|
||||
auto diff_v8i16 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_sse2_psubus_w), { va_v8i16, vb_v8i16 });
|
||||
SetVr(vd, diff_v8i16);
|
||||
|
||||
// TODO: Set SAT
|
||||
@@ -1744,7 +1744,7 @@ void Compiler::SUBFIC(u32 rd, u32 ra, s32 simm16) {
|
||||
|
||||
auto ra_i64 = GetGpr(ra);
|
||||
ra_i64 = m_ir_builder->CreateNeg(ra_i64); // simpler way of doing ~ra + 1
|
||||
auto res_s = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), ra_i64, m_ir_builder->getInt64((s64)simm16));
|
||||
auto res_s = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), { ra_i64, m_ir_builder->getInt64((s64)simm16) });
|
||||
auto diff_i64 = m_ir_builder->CreateExtractValue(res_s, { 0 });
|
||||
auto carry_i1 = m_ir_builder->CreateExtractValue(res_s, { 1 });
|
||||
auto is_zero = m_ir_builder->CreateICmpEQ(ra_i64, m_ir_builder->getInt64(0)); // if ra is zero when ~ra + 1 = 0 sets overflow bit
|
||||
@@ -1785,7 +1785,7 @@ void Compiler::ADDIC(u32 rd, u32 ra, s32 simm16) {
|
||||
USE_INTERP_IF_REQUESTED(ADDIC, m_ir_builder->getInt32(rd), m_ir_builder->getInt32(ra), m_ir_builder->getInt32(simm16));
|
||||
|
||||
auto ra_i64 = GetGpr(ra);
|
||||
auto res_s = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), m_ir_builder->getInt64((s64)simm16), ra_i64);
|
||||
auto res_s = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), { m_ir_builder->getInt64((s64)simm16), ra_i64 });
|
||||
auto sum_i64 = m_ir_builder->CreateExtractValue(res_s, { 0 });
|
||||
auto carry_i1 = m_ir_builder->CreateExtractValue(res_s, { 1 });
|
||||
SetGpr(rd, sum_i64);
|
||||
@@ -2337,7 +2337,7 @@ void Compiler::SUBFC(u32 rd, u32 ra, u32 rb, u32 oe, u32 rc) {
|
||||
auto ra_i64 = GetGpr(ra);
|
||||
ra_i64 = m_ir_builder->CreateNeg(ra_i64);
|
||||
auto rb_i64 = GetGpr(rb);
|
||||
auto res_s = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), ra_i64, rb_i64);
|
||||
auto res_s = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), { ra_i64, rb_i64 });
|
||||
auto diff_i64 = m_ir_builder->CreateExtractValue(res_s, { 0 });
|
||||
auto carry_i1 = m_ir_builder->CreateExtractValue(res_s, { 1 });
|
||||
SetGpr(rd, diff_i64);
|
||||
@@ -2356,7 +2356,7 @@ void Compiler::SUBFC(u32 rd, u32 ra, u32 rb, u32 oe, u32 rc) {
|
||||
void Compiler::ADDC(u32 rd, u32 ra, u32 rb, u32 oe, u32 rc) {
|
||||
auto ra_i64 = GetGpr(ra);
|
||||
auto rb_i64 = GetGpr(rb);
|
||||
auto res_s = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), ra_i64, rb_i64);
|
||||
auto res_s = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), { ra_i64, rb_i64 });
|
||||
auto sum_i64 = m_ir_builder->CreateExtractValue(res_s, { 0 });
|
||||
auto carry_i1 = m_ir_builder->CreateExtractValue(res_s, { 1 });
|
||||
SetGpr(rd, sum_i64);
|
||||
@@ -2468,7 +2468,7 @@ void Compiler::SLW(u32 ra, u32 rs, u32 rb, u32 rc) {
|
||||
|
||||
void Compiler::CNTLZW(u32 ra, u32 rs, u32 rc) {
|
||||
auto rs_i32 = GetGpr(rs, 32);
|
||||
auto res_i32 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::ctlz, m_ir_builder->getInt32Ty()), rs_i32, m_ir_builder->getInt1(false));
|
||||
auto res_i32 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::ctlz, m_ir_builder->getInt32Ty()), { rs_i32, m_ir_builder->getInt1(false) });
|
||||
auto res_i64 = m_ir_builder->CreateZExt(res_i32, m_ir_builder->getInt64Ty());
|
||||
SetGpr(ra, res_i64);
|
||||
|
||||
@@ -2618,7 +2618,7 @@ void Compiler::LWZUX(u32 rd, u32 ra, u32 rb) {
|
||||
|
||||
void Compiler::CNTLZD(u32 ra, u32 rs, u32 rc) {
|
||||
auto rs_i64 = GetGpr(rs);
|
||||
auto res_i64 = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::ctlz, m_ir_builder->getInt64Ty()), rs_i64, m_ir_builder->getInt1(false));
|
||||
auto res_i64 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::ctlz, m_ir_builder->getInt64Ty()), { rs_i64, m_ir_builder->getInt1(false) });
|
||||
SetGpr(ra, res_i64);
|
||||
|
||||
if (rc) {
|
||||
@@ -2793,10 +2793,10 @@ void Compiler::SUBFE(u32 rd, u32 ra, u32 rb, u32 oe, u32 rc) {
|
||||
auto ra_i64 = GetGpr(ra);
|
||||
auto rb_i64 = GetGpr(rb);
|
||||
ra_i64 = m_ir_builder->CreateNot(ra_i64);
|
||||
auto res_s = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), ra_i64, ca_i64);
|
||||
auto res_s = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), {ra_i64, ca_i64 });
|
||||
auto res_i64 = m_ir_builder->CreateExtractValue(res_s, { 0 });
|
||||
auto carry1_i1 = m_ir_builder->CreateExtractValue(res_s, { 1 });
|
||||
res_s = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), res_i64, rb_i64);
|
||||
res_s = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), { res_i64, rb_i64 });
|
||||
res_i64 = m_ir_builder->CreateExtractValue(res_s, { 0 });
|
||||
auto carry2_i1 = m_ir_builder->CreateExtractValue(res_s, { 1 });
|
||||
auto carry_i1 = m_ir_builder->CreateOr(carry1_i1, carry2_i1);
|
||||
@@ -2817,10 +2817,10 @@ void Compiler::ADDE(u32 rd, u32 ra, u32 rb, u32 oe, u32 rc) {
|
||||
auto ca_i64 = GetXerCa();
|
||||
auto ra_i64 = GetGpr(ra);
|
||||
auto rb_i64 = GetGpr(rb);
|
||||
auto res_s = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), ra_i64, ca_i64);
|
||||
auto res_s = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), { ra_i64, ca_i64 });
|
||||
auto res_i64 = m_ir_builder->CreateExtractValue(res_s, { 0 });
|
||||
auto carry1_i1 = m_ir_builder->CreateExtractValue(res_s, { 1 });
|
||||
res_s = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), res_i64, rb_i64);
|
||||
res_s = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), { res_i64, rb_i64 });
|
||||
res_i64 = m_ir_builder->CreateExtractValue(res_s, { 0 });
|
||||
auto carry2_i1 = m_ir_builder->CreateExtractValue(res_s, { 1 });
|
||||
auto carry_i1 = m_ir_builder->CreateOr(carry1_i1, carry2_i1);
|
||||
@@ -2954,7 +2954,7 @@ void Compiler::STVEWX(u32 vs, u32 ra, u32 rb) {
|
||||
void Compiler::ADDZE(u32 rd, u32 ra, u32 oe, u32 rc) {
|
||||
auto ra_i64 = GetGpr(ra);
|
||||
auto ca_i64 = GetXerCa();
|
||||
auto res_s = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), ra_i64, ca_i64);
|
||||
auto res_s = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), { ra_i64, ca_i64 });
|
||||
auto sum_i64 = m_ir_builder->CreateExtractValue(res_s, { 0 });
|
||||
auto carry_i1 = m_ir_builder->CreateExtractValue(res_s, { 1 });
|
||||
SetGpr(rd, sum_i64);
|
||||
@@ -2974,7 +2974,7 @@ void Compiler::SUBFZE(u32 rd, u32 ra, u32 oe, u32 rc) {
|
||||
auto ra_i64 = GetGpr(ra);
|
||||
ra_i64 = m_ir_builder->CreateNot(ra_i64);
|
||||
auto ca_i64 = GetXerCa();
|
||||
auto res_s = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), ra_i64, ca_i64);
|
||||
auto res_s = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), { ra_i64, ca_i64 });
|
||||
auto res_i64 = m_ir_builder->CreateExtractValue(res_s, { 0 });
|
||||
auto carry_i1 = m_ir_builder->CreateExtractValue(res_s, { 1 });
|
||||
SetGpr(rd, res_i64);
|
||||
@@ -3035,10 +3035,10 @@ void Compiler::SUBFME(u32 rd, u32 ra, u32 oe, u32 rc) {
|
||||
auto ca_i64 = GetXerCa();
|
||||
auto ra_i64 = GetGpr(ra);
|
||||
ra_i64 = m_ir_builder->CreateNot(ra_i64);
|
||||
auto res_s = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), ra_i64, ca_i64);
|
||||
auto res_s = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), { ra_i64, ca_i64 });
|
||||
auto res_i64 = m_ir_builder->CreateExtractValue(res_s, { 0 });
|
||||
auto carry1_i1 = m_ir_builder->CreateExtractValue(res_s, { 1 });
|
||||
res_s = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), res_i64, m_ir_builder->getInt64((s64)-1));
|
||||
res_s = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), { res_i64, m_ir_builder->getInt64((s64)-1) });
|
||||
res_i64 = m_ir_builder->CreateExtractValue(res_s, { 0 });
|
||||
auto carry2_i1 = m_ir_builder->CreateExtractValue(res_s, { 1 });
|
||||
auto carry_i1 = m_ir_builder->CreateOr(carry1_i1, carry2_i1);
|
||||
@@ -3074,10 +3074,10 @@ void Compiler::MULLD(u32 rd, u32 ra, u32 rb, u32 oe, u32 rc) {
|
||||
void Compiler::ADDME(u32 rd, u32 ra, u32 oe, u32 rc) {
|
||||
auto ca_i64 = GetXerCa();
|
||||
auto ra_i64 = GetGpr(ra);
|
||||
auto res_s = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), ra_i64, ca_i64);
|
||||
auto res_s = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), { ra_i64, ca_i64 });
|
||||
auto res_i64 = m_ir_builder->CreateExtractValue(res_s, { 0 });
|
||||
auto carry1_i1 = m_ir_builder->CreateExtractValue(res_s, { 1 });
|
||||
res_s = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), res_i64, m_ir_builder->getInt64((s64)-1));
|
||||
res_s = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::uadd_with_overflow, m_ir_builder->getInt64Ty()), { res_i64, m_ir_builder->getInt64((s64)-1) });
|
||||
res_i64 = m_ir_builder->CreateExtractValue(res_s, { 0 });
|
||||
auto carry2_i1 = m_ir_builder->CreateExtractValue(res_s, { 1 });
|
||||
auto carry_i1 = m_ir_builder->CreateOr(carry1_i1, carry2_i1);
|
||||
@@ -3663,8 +3663,8 @@ void Compiler::STVLX(u32 vs, u32 ra, u32 rb) {
|
||||
auto vs_i8_ptr = m_ir_builder->CreateBitCast(vs_i128_ptr, m_ir_builder->getInt8PtrTy());
|
||||
|
||||
Type * types[3] = { m_ir_builder->getInt8PtrTy(), m_ir_builder->getInt8PtrTy(), m_ir_builder->getInt64Ty() };
|
||||
m_ir_builder->CreateCall5(Intrinsic::getDeclaration(m_module, Intrinsic::memcpy, types),
|
||||
addr_i8_ptr, vs_i8_ptr, size_i64, m_ir_builder->getInt32(1), m_ir_builder->getInt1(false));
|
||||
m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::memcpy, types),
|
||||
{ addr_i8_ptr, vs_i8_ptr, size_i64, m_ir_builder->getInt32(1), m_ir_builder->getInt1(false) });
|
||||
}
|
||||
|
||||
void Compiler::STDBRX(u32 rs, u32 ra, u32 rb) {
|
||||
@@ -3724,8 +3724,8 @@ void Compiler::STVRX(u32 vs, u32 ra, u32 rb) {
|
||||
vs_i8_ptr = m_ir_builder->CreateGEP(vs_i8_ptr, index_i64);
|
||||
|
||||
Type * types[3] = { m_ir_builder->getInt8PtrTy(), m_ir_builder->getInt8PtrTy(), m_ir_builder->getInt64Ty() };
|
||||
m_ir_builder->CreateCall5(Intrinsic::getDeclaration(m_module, Intrinsic::memcpy, types),
|
||||
addr_i8_ptr, vs_i8_ptr, size_i64, m_ir_builder->getInt32(1), m_ir_builder->getInt1(false));
|
||||
m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::memcpy, types),
|
||||
{ addr_i8_ptr, vs_i8_ptr, size_i64, m_ir_builder->getInt32(1), m_ir_builder->getInt1(false) });
|
||||
}
|
||||
|
||||
void Compiler::STFSUX(u32 frs, u32 ra, u32 rb) {
|
||||
@@ -3994,8 +3994,8 @@ void Compiler::DCBZ(u32 ra, u32 rb) {
|
||||
auto addr_i8_ptr = m_ir_builder->CreateIntToPtr(addr_i64, m_ir_builder->getInt8PtrTy());
|
||||
|
||||
std::vector<Type *> types = { (Type *)m_ir_builder->getInt8PtrTy(), (Type *)m_ir_builder->getInt32Ty() };
|
||||
m_ir_builder->CreateCall5(Intrinsic::getDeclaration(m_module, Intrinsic::memset, types),
|
||||
addr_i8_ptr, m_ir_builder->getInt8(0), m_ir_builder->getInt32(128), m_ir_builder->getInt32(128), m_ir_builder->getInt1(true));
|
||||
m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::memset, types),
|
||||
{ addr_i8_ptr, m_ir_builder->getInt8(0), m_ir_builder->getInt32(128), m_ir_builder->getInt32(128), m_ir_builder->getInt1(true) });
|
||||
}
|
||||
|
||||
void Compiler::LWZ(u32 rd, u32 ra, s32 d) {
|
||||
@@ -4397,7 +4397,7 @@ void Compiler::FMADDS(u32 frd, u32 fra, u32 frc, u32 frb, u32 rc) {
|
||||
auto ra_f64 = GetFpr(fra);
|
||||
auto rb_f64 = GetFpr(frb);
|
||||
auto rc_f64 = GetFpr(frc);
|
||||
auto res_f64 = (Value *)m_ir_builder->CreateCall3(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, m_ir_builder->getDoubleTy()), ra_f64, rc_f64, rb_f64);
|
||||
auto res_f64 = (Value *)m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, m_ir_builder->getDoubleTy()), { ra_f64, rc_f64, rb_f64 });
|
||||
auto res_f32 = m_ir_builder->CreateFPTrunc(res_f64, m_ir_builder->getFloatTy());
|
||||
SetFpr(frd, res_f32);
|
||||
|
||||
@@ -4414,7 +4414,7 @@ void Compiler::FMSUBS(u32 frd, u32 fra, u32 frc, u32 frb, u32 rc) {
|
||||
auto rb_f64 = GetFpr(frb);
|
||||
auto rc_f64 = GetFpr(frc);
|
||||
rb_f64 = m_ir_builder->CreateFNeg(rb_f64);
|
||||
auto res_f64 = (Value *)m_ir_builder->CreateCall3(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, m_ir_builder->getDoubleTy()), ra_f64, rc_f64, rb_f64);
|
||||
auto res_f64 = (Value *)m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, m_ir_builder->getDoubleTy()), { ra_f64, rc_f64, rb_f64 });
|
||||
auto res_f32 = m_ir_builder->CreateFPTrunc(res_f64, m_ir_builder->getFloatTy());
|
||||
SetFpr(frd, res_f32);
|
||||
|
||||
@@ -4431,7 +4431,7 @@ void Compiler::FNMSUBS(u32 frd, u32 fra, u32 frc, u32 frb, u32 rc) {
|
||||
auto rb_f64 = GetFpr(frb);
|
||||
auto rc_f64 = GetFpr(frc);
|
||||
rb_f64 = m_ir_builder->CreateFNeg(rb_f64);
|
||||
auto res_f64 = (Value *)m_ir_builder->CreateCall3(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, m_ir_builder->getDoubleTy()), ra_f64, rc_f64, rb_f64);
|
||||
auto res_f64 = (Value *)m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, m_ir_builder->getDoubleTy()), { ra_f64, rc_f64, rb_f64 });
|
||||
res_f64 = m_ir_builder->CreateFNeg(res_f64);
|
||||
auto res_f32 = m_ir_builder->CreateFPTrunc(res_f64, m_ir_builder->getFloatTy());
|
||||
SetFpr(frd, res_f32);
|
||||
@@ -4448,7 +4448,7 @@ void Compiler::FNMADDS(u32 frd, u32 fra, u32 frc, u32 frb, u32 rc) {
|
||||
auto ra_f64 = GetFpr(fra);
|
||||
auto rb_f64 = GetFpr(frb);
|
||||
auto rc_f64 = GetFpr(frc);
|
||||
auto res_f64 = (Value *)m_ir_builder->CreateCall3(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, m_ir_builder->getDoubleTy()), ra_f64, rc_f64, rb_f64);
|
||||
auto res_f64 = (Value *)m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, m_ir_builder->getDoubleTy()), { ra_f64, rc_f64, rb_f64 });
|
||||
res_f64 = m_ir_builder->CreateFNeg(res_f64);
|
||||
auto res_f32 = m_ir_builder->CreateFPTrunc(res_f64, m_ir_builder->getFloatTy());
|
||||
SetFpr(frd, res_f32);
|
||||
@@ -4746,7 +4746,7 @@ void Compiler::FMSUB(u32 frd, u32 fra, u32 frc, u32 frb, u32 rc) {
|
||||
auto rb_f64 = GetFpr(frb);
|
||||
auto rc_f64 = GetFpr(frc);
|
||||
rb_f64 = m_ir_builder->CreateFNeg(rb_f64);
|
||||
auto res_f64 = m_ir_builder->CreateCall3(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, m_ir_builder->getDoubleTy()), ra_f64, rc_f64, rb_f64);
|
||||
auto res_f64 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, m_ir_builder->getDoubleTy()), { ra_f64, rc_f64, rb_f64 });
|
||||
SetFpr(frd, res_f64);
|
||||
|
||||
if (rc) {
|
||||
@@ -4761,7 +4761,7 @@ void Compiler::FMADD(u32 frd, u32 fra, u32 frc, u32 frb, u32 rc) {
|
||||
auto ra_f64 = GetFpr(fra);
|
||||
auto rb_f64 = GetFpr(frb);
|
||||
auto rc_f64 = GetFpr(frc);
|
||||
auto res_f64 = m_ir_builder->CreateCall3(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, m_ir_builder->getDoubleTy()), ra_f64, rc_f64, rb_f64);
|
||||
auto res_f64 = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, m_ir_builder->getDoubleTy()), { ra_f64, rc_f64, rb_f64 });
|
||||
SetFpr(frd, res_f64);
|
||||
|
||||
if (rc) {
|
||||
@@ -4777,7 +4777,7 @@ void Compiler::FNMSUB(u32 frd, u32 fra, u32 frc, u32 frb, u32 rc) {
|
||||
auto rb_f64 = GetFpr(frb);
|
||||
auto rc_f64 = GetFpr(frc);
|
||||
rc_f64 = m_ir_builder->CreateFNeg(rc_f64);
|
||||
auto res_f64 = (Value *)m_ir_builder->CreateCall3(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, m_ir_builder->getDoubleTy()), ra_f64, rc_f64, rb_f64);
|
||||
auto res_f64 = (Value *)m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, m_ir_builder->getDoubleTy()), { ra_f64, rc_f64, rb_f64 });
|
||||
SetFpr(frd, res_f64);
|
||||
|
||||
if (rc) {
|
||||
@@ -4794,7 +4794,7 @@ void Compiler::FNMADD(u32 frd, u32 fra, u32 frc, u32 frb, u32 rc) {
|
||||
auto rc_f64 = GetFpr(frc);
|
||||
rb_f64 = m_ir_builder->CreateFNeg(rb_f64);
|
||||
rc_f64 = m_ir_builder->CreateFNeg(rc_f64);
|
||||
auto res_f64 = (Value *)m_ir_builder->CreateCall3(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, m_ir_builder->getDoubleTy()), ra_f64, rc_f64, rb_f64);
|
||||
auto res_f64 = (Value *)m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::fmuladd, m_ir_builder->getDoubleTy()), { ra_f64, rc_f64, rb_f64 });
|
||||
SetFpr(frd, res_f64);
|
||||
|
||||
if (rc) {
|
||||
@@ -4983,10 +4983,10 @@ Value * Compiler::GetBit(Value * val, u32 n) {
|
||||
|
||||
#ifdef PPU_LLVM_RECOMPILER_USE_BMI
|
||||
if (val->getType()->isIntegerTy(32)) {
|
||||
bit = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_bmi_pext_32), val, m_ir_builder->getInt32(1 << (31 - n)));
|
||||
bit = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_bmi_pext_32), val, m_ir_builder->getInt32(1 << (31 - n)));
|
||||
}
|
||||
else if (val->getType()->isIntegerTy(64)) {
|
||||
bit = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_bmi_pext_64), val, m_ir_builder->getInt64((u64)1 << (63 - n)));
|
||||
bit = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_bmi_pext_64), val, m_ir_builder->getInt64((u64)1 << (63 - n)));
|
||||
}
|
||||
else {
|
||||
#endif
|
||||
@@ -5030,10 +5030,10 @@ Value * Compiler::GetNibble(Value * val, u32 n) {
|
||||
|
||||
#ifdef PPU_LLVM_RECOMPILER_USE_BMI
|
||||
if (val->getType()->isIntegerTy(32)) {
|
||||
nibble = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_bmi_pext_32), val, m_ir_builder->getInt32((u64)0xF << ((7 - n) * 4)));
|
||||
nibble = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_bmi_pext_32), val, m_ir_builder->getInt32((u64)0xF << ((7 - n) * 4)));
|
||||
}
|
||||
else if (val->getType()->isIntegerTy(64)) {
|
||||
nibble = m_ir_builder->CreateCall2(Intrinsic::getDeclaration(m_module, Intrinsic::x86_bmi_pext_64), val, m_ir_builder->getInt64((u64)0xF << ((15 - n) * 4)));
|
||||
nibble = m_ir_builder->CreateCall(Intrinsic::getDeclaration(m_module, Intrinsic::x86_bmi_pext_64), val, m_ir_builder->getInt64((u64)0xF << ((15 - n) * 4)));
|
||||
}
|
||||
else {
|
||||
#endif
|
||||
@@ -5417,7 +5417,7 @@ void Compiler::CreateBranch(llvm::Value * cmp_i1, llvm::Value * target_i32, bool
|
||||
// Function *fn = m_module->getFunction(fmt::format("function_0x%08X", target_address));
|
||||
llvm::Value *execStatus;
|
||||
// if (fn)
|
||||
// execStatus = m_ir_builder->CreateCall2(fn, m_state.args[CompileTaskState::Args::State], m_ir_builder->getInt64(0));
|
||||
// execStatus = m_ir_builder->CreateCall(fn, {m_state.args[CompileTaskState::Args::State], m_ir_builder->getInt64(0) });
|
||||
// else
|
||||
execStatus = Call<u32>("execute_unknown_function", m_state.args[CompileTaskState::Args::State], m_ir_builder->getInt64(0));
|
||||
|
||||
@@ -5451,7 +5451,7 @@ void Compiler::CreateBranch(llvm::Value * cmp_i1, llvm::Value * target_i32, bool
|
||||
else if (lk) {
|
||||
BasicBlock *next_block = GetBasicBlockFromAddress(m_state.current_instruction_address + 4);
|
||||
|
||||
llvm::Value *execStatus = m_ir_builder->CreateCall2(m_execute_unknown_function, m_state.args[CompileTaskState::Args::State], m_ir_builder->getInt64(0));
|
||||
llvm::Value *execStatus = m_ir_builder->CreateCall(m_execute_unknown_function, {m_state.args[CompileTaskState::Args::State], m_ir_builder->getInt64(0)});
|
||||
|
||||
llvm::BasicBlock *cputhreadexitblock = GetBasicBlockFromAddress(m_state.current_instruction_address, "early_exit");
|
||||
llvm::Value *isCPUThreadExit = m_ir_builder->CreateICmpEQ(execStatus, m_ir_builder->getInt32(ExecutionStatus::ExecutionStatusPropagateException));
|
||||
|
||||
@@ -916,7 +916,7 @@ void spu_recompiler::BISL(spu_opcode_t op)
|
||||
|
||||
void spu_recompiler::IRET(spu_opcode_t op)
|
||||
{
|
||||
throw EXCEPTION("Unimplemented instruction");
|
||||
//throw EXCEPTION("Unimplemented instruction");
|
||||
}
|
||||
|
||||
void spu_recompiler::BISLED(spu_opcode_t op)
|
||||
|
||||
@@ -807,7 +807,7 @@ namespace vm
|
||||
{
|
||||
if (used > this->size)
|
||||
{
|
||||
throw EXCEPTION("Unexpected memory amount used (0x%x)", used);
|
||||
//throw EXCEPTION("Unexpected memory amount used (0x%x)", used);
|
||||
}
|
||||
|
||||
if (used + size > this->size)
|
||||
|
||||
@@ -340,7 +340,7 @@ bool FragmentProgramDecompiler::handle_sct(u32 opcode)
|
||||
switch (opcode)
|
||||
{
|
||||
case RSX_FP_OPCODE_ADD: SetDst("($0 + $1)"); return true;
|
||||
case RSX_FP_OPCODE_DIV: SetDst("($0 / $1)"); return true;
|
||||
case RSX_FP_OPCODE_DIV: SetDst("($0 / $1.xxxx)"); return true;
|
||||
// Note: DIVSQ is not IEEE compliant. divsq(0, 0) is 0 (Super Puzzle Fighter II Turbo HD Remix).
|
||||
// sqrt(x, 0) might be equal to some big value (in absolute) whose sign is sign(x) but it has to be proven.
|
||||
case RSX_FP_OPCODE_DIVSQ: SetDst("divsq_legacy($0, $1)"); return true;
|
||||
@@ -376,7 +376,7 @@ bool FragmentProgramDecompiler::handle_scb(u32 opcode)
|
||||
{
|
||||
case RSX_FP_OPCODE_ADD: SetDst("($0 + $1)"); return true;
|
||||
case RSX_FP_OPCODE_COS: SetDst("cos($0.xxxx)"); return true;
|
||||
case RSX_FP_OPCODE_DIV: SetDst("($0 / $1)"); return true;
|
||||
case RSX_FP_OPCODE_DIV: SetDst("($0 / $1.xxxx)"); return true;
|
||||
// Note: DIVSQ is not IEEE compliant. sqrt(0, 0) is 0 (Super Puzzle Fighter II Turbo HD Remix).
|
||||
// sqrt(x, 0) might be equal to some big value (in absolute) whose sign is sign(x) but it has to be proven.
|
||||
case RSX_FP_OPCODE_DIVSQ: SetDst("divsq_legacy($0, sqrt($1).xxxx)"); return true;
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
|
||||
using namespace program_hash_util;
|
||||
|
||||
size_t vertex_program_hash::operator()(const std::vector<u32> &program) const
|
||||
size_t vertex_program_hash::operator()(const RSXVertexProgram &program) const
|
||||
{
|
||||
// 64-bit Fowler/Noll/Vo FNV-1a hash code
|
||||
size_t hash = 0xCBF29CE484222325ULL;
|
||||
const qword *instbuffer = (const qword*)program.data();
|
||||
const qword *instbuffer = (const qword*)program.data.data();
|
||||
size_t instIndex = 0;
|
||||
bool end = false;
|
||||
for (unsigned i = 0; i < program.size() / 4; i++)
|
||||
for (unsigned i = 0; i < program.data.size() / 4; i++)
|
||||
{
|
||||
const qword inst = instbuffer[instIndex];
|
||||
hash ^= inst.dword[0];
|
||||
@@ -22,13 +22,17 @@ size_t vertex_program_hash::operator()(const std::vector<u32> &program) const
|
||||
return hash;
|
||||
}
|
||||
|
||||
bool vertex_program_compare::operator()(const std::vector<u32> &binary1, const std::vector<u32> &binary2) const
|
||||
bool vertex_program_compare::operator()(const RSXVertexProgram &binary1, const RSXVertexProgram &binary2) const
|
||||
{
|
||||
if (binary1.size() != binary2.size()) return false;
|
||||
const qword *instBuffer1 = (const qword*)binary1.data();
|
||||
const qword *instBuffer2 = (const qword*)binary2.data();
|
||||
if (binary1.output_mask != binary2.output_mask)
|
||||
return false;
|
||||
if (binary1.rsx_vertex_inputs != binary2.rsx_vertex_inputs)
|
||||
return false;
|
||||
if (binary1.data.size() != binary2.data.size()) return false;
|
||||
const qword *instBuffer1 = (const qword*)binary1.data.data();
|
||||
const qword *instBuffer2 = (const qword*)binary2.data.data();
|
||||
size_t instIndex = 0;
|
||||
for (unsigned i = 0; i < binary1.size() / 4; i++)
|
||||
for (unsigned i = 0; i < binary1.data.size() / 4; i++)
|
||||
{
|
||||
const qword& inst1 = instBuffer1[instIndex];
|
||||
const qword& inst2 = instBuffer2[instIndex];
|
||||
|
||||
@@ -23,12 +23,12 @@ namespace program_hash_util
|
||||
|
||||
struct vertex_program_hash
|
||||
{
|
||||
size_t operator()(const std::vector<u32> &program) const;
|
||||
size_t operator()(const RSXVertexProgram &program) const;
|
||||
};
|
||||
|
||||
struct vertex_program_compare
|
||||
{
|
||||
bool operator()(const std::vector<u32> &binary1, const std::vector<u32> &binary2) const;
|
||||
bool operator()(const RSXVertexProgram &binary1, const RSXVertexProgram &binary2) const;
|
||||
};
|
||||
|
||||
struct fragment_program_utils
|
||||
@@ -75,7 +75,7 @@ class program_state_cache
|
||||
using vertex_program_type = typename backend_traits::vertex_program_type;
|
||||
using fragment_program_type = typename backend_traits::fragment_program_type;
|
||||
|
||||
using binary_to_vertex_program = std::unordered_map<std::vector<u32>, vertex_program_type, program_hash_util::vertex_program_hash, program_hash_util::vertex_program_compare> ;
|
||||
using binary_to_vertex_program = std::unordered_map<RSXVertexProgram, vertex_program_type, program_hash_util::vertex_program_hash, program_hash_util::vertex_program_compare> ;
|
||||
using binary_to_fragment_program = std::unordered_map<void *, fragment_program_type, program_hash_util::fragment_program_hash, program_hash_util::fragment_program_compare>;
|
||||
|
||||
|
||||
@@ -115,13 +115,13 @@ private:
|
||||
/// bool here to inform that the program was preexisting.
|
||||
std::tuple<const vertex_program_type&, bool> search_vertex_program(const RSXVertexProgram& rsx_vp)
|
||||
{
|
||||
const auto& I = m_vertex_shader_cache.find(rsx_vp.data);
|
||||
const auto& I = m_vertex_shader_cache.find(rsx_vp);
|
||||
if (I != m_vertex_shader_cache.end())
|
||||
{
|
||||
return std::forward_as_tuple(I->second, true);
|
||||
}
|
||||
LOG_NOTICE(RSX, "VP not found in buffer!");
|
||||
vertex_program_type& new_shader = m_vertex_shader_cache[rsx_vp.data];
|
||||
vertex_program_type& new_shader = m_vertex_shader_cache[rsx_vp];
|
||||
backend_traits::recompile_vertex_program(rsx_vp, new_shader, m_next_id++);
|
||||
|
||||
return std::forward_as_tuple(new_shader, false);
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
|
||||
const vertex_program_type& get_transform_program(const RSXVertexProgram& rsx_vp) const
|
||||
{
|
||||
auto I = m_vertex_shader_cache.find(rsx_vp.data);
|
||||
auto I = m_vertex_shader_cache.find(rsx_vp);
|
||||
if (I != m_vertex_shader_cache.end())
|
||||
return I->second;
|
||||
throw new EXCEPTION("Trying to get unknow transform program");
|
||||
|
||||
@@ -9,15 +9,18 @@
|
||||
#include "../rsx_methods.h"
|
||||
|
||||
|
||||
std::vector<D3D12_VERTEX_BUFFER_VIEW> D3D12GSRender::upload_vertex_attributes(const std::vector<std::pair<u32, u32> > &vertex_ranges)
|
||||
std::vector<D3D12_SHADER_RESOURCE_VIEW_DESC> D3D12GSRender::upload_vertex_attributes(
|
||||
const std::vector<std::pair<u32, u32> > &vertex_ranges,
|
||||
gsl::not_null<ID3D12GraphicsCommandList*> command_list)
|
||||
{
|
||||
std::vector<D3D12_VERTEX_BUFFER_VIEW> vertex_buffer_views;
|
||||
|
||||
m_IASet.clear();
|
||||
std::vector<D3D12_SHADER_RESOURCE_VIEW_DESC> vertex_buffer_views;
|
||||
command_list->ResourceBarrier(1, &CD3DX12_RESOURCE_BARRIER::Transition(m_vertex_buffer_data.Get(), D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER, D3D12_RESOURCE_STATE_COPY_DEST));
|
||||
size_t input_slot = 0;
|
||||
|
||||
size_t vertex_count = 0;
|
||||
|
||||
size_t offset_in_vertex_buffers_buffer = 0;
|
||||
|
||||
for (const auto &pair : vertex_ranges)
|
||||
vertex_count += pair.second;
|
||||
|
||||
@@ -34,9 +37,9 @@ std::vector<D3D12_VERTEX_BUFFER_VIEW> D3D12GSRender::upload_vertex_attributes(co
|
||||
// Active vertex array
|
||||
const rsx::data_array_format_info &info = vertex_arrays_info[index];
|
||||
|
||||
u32 element_size = rsx::get_vertex_type_size_on_host(info.type, info.size);
|
||||
|
||||
size_t element_size = rsx::get_vertex_type_size_on_host(info.type, info.size);
|
||||
size_t buffer_size = element_size * vertex_count;
|
||||
|
||||
size_t heap_offset = m_buffer_data.alloc<D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT>(buffer_size);
|
||||
|
||||
void *mapped_buffer = m_buffer_data.map<void>(CD3DX12_RANGE(heap_offset, heap_offset + buffer_size));
|
||||
@@ -47,25 +50,51 @@ std::vector<D3D12_VERTEX_BUFFER_VIEW> D3D12GSRender::upload_vertex_attributes(co
|
||||
}
|
||||
m_buffer_data.unmap(CD3DX12_RANGE(heap_offset, heap_offset + buffer_size));
|
||||
|
||||
D3D12_VERTEX_BUFFER_VIEW vertex_buffer_view =
|
||||
command_list->CopyBufferRegion(m_vertex_buffer_data.Get(), offset_in_vertex_buffers_buffer, m_buffer_data.get_heap(), heap_offset, buffer_size);
|
||||
|
||||
UINT component_mapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
|
||||
switch (info.size)
|
||||
{
|
||||
m_buffer_data.get_heap()->GetGPUVirtualAddress() + heap_offset,
|
||||
(UINT)buffer_size,
|
||||
(UINT)element_size
|
||||
case 1:
|
||||
component_mapping = D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(
|
||||
D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_0,
|
||||
D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_0,
|
||||
D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_0,
|
||||
D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_1,
|
||||
);
|
||||
break;
|
||||
case 2:
|
||||
component_mapping = D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(
|
||||
D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_0,
|
||||
D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_1,
|
||||
D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_0,
|
||||
D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_1,
|
||||
);
|
||||
break;
|
||||
case 3:
|
||||
component_mapping = D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(
|
||||
D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_0,
|
||||
D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_1,
|
||||
D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_2,
|
||||
D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_1,
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
D3D12_SHADER_RESOURCE_VIEW_DESC vertex_buffer_view = {
|
||||
get_vertex_attribute_format(info.type, info.size),
|
||||
D3D12_SRV_DIMENSION_BUFFER,
|
||||
component_mapping
|
||||
};
|
||||
vertex_buffer_view.Buffer.FirstElement = offset_in_vertex_buffers_buffer / element_size;
|
||||
vertex_buffer_view.Buffer.NumElements = buffer_size / element_size;
|
||||
vertex_buffer_views.push_back(vertex_buffer_view);
|
||||
|
||||
offset_in_vertex_buffers_buffer = (offset_in_vertex_buffers_buffer + buffer_size + 191) / 192; // 192 is multiple of 2, 4, 6, 8, 12, 16, 24, 32, 48, 64
|
||||
offset_in_vertex_buffers_buffer *= 192;
|
||||
|
||||
m_timers.m_buffer_upload_size += buffer_size;
|
||||
|
||||
D3D12_INPUT_ELEMENT_DESC IAElement = {};
|
||||
IAElement.SemanticName = "TEXCOORD";
|
||||
IAElement.SemanticIndex = (UINT)index;
|
||||
IAElement.InputSlot = (UINT)input_slot++;
|
||||
IAElement.Format = get_vertex_attribute_format(info.type, info.size);
|
||||
IAElement.AlignedByteOffset = 0;
|
||||
IAElement.InputSlotClass = D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA;
|
||||
IAElement.InstanceDataStepRate = 0;
|
||||
m_IASet.push_back(IAElement);
|
||||
}
|
||||
else if (register_vertex_info[index].size > 0)
|
||||
{
|
||||
@@ -74,34 +103,31 @@ std::vector<D3D12_VERTEX_BUFFER_VIEW> D3D12GSRender::upload_vertex_attributes(co
|
||||
|
||||
const std::vector<u8> &data = register_vertex_data[index];
|
||||
|
||||
u32 element_size = rsx::get_vertex_type_size_on_host(info.type, info.size);
|
||||
|
||||
size_t element_size = rsx::get_vertex_type_size_on_host(info.type, info.size);
|
||||
size_t buffer_size = data.size();
|
||||
|
||||
size_t heap_offset = m_buffer_data.alloc<D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT>(buffer_size);
|
||||
|
||||
void *mapped_buffer = m_buffer_data.map<void>(CD3DX12_RANGE(heap_offset, heap_offset + buffer_size));
|
||||
memcpy(mapped_buffer, data.data(), data.size());
|
||||
m_buffer_data.unmap(CD3DX12_RANGE(heap_offset, heap_offset + buffer_size));
|
||||
|
||||
D3D12_VERTEX_BUFFER_VIEW vertex_buffer_view = {
|
||||
m_buffer_data.get_heap()->GetGPUVirtualAddress() + heap_offset,
|
||||
(UINT)buffer_size,
|
||||
(UINT)element_size
|
||||
command_list->CopyBufferRegion(m_vertex_buffer_data.Get(), offset_in_vertex_buffers_buffer, m_buffer_data.get_heap(), heap_offset, buffer_size);
|
||||
|
||||
D3D12_SHADER_RESOURCE_VIEW_DESC vertex_buffer_view = {
|
||||
get_vertex_attribute_format(info.type, info.size),
|
||||
D3D12_SRV_DIMENSION_BUFFER,
|
||||
D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING
|
||||
};
|
||||
vertex_buffer_view.Buffer.FirstElement = offset_in_vertex_buffers_buffer / element_size;
|
||||
vertex_buffer_view.Buffer.NumElements = buffer_size / element_size;
|
||||
vertex_buffer_views.push_back(vertex_buffer_view);
|
||||
|
||||
D3D12_INPUT_ELEMENT_DESC IAElement = {};
|
||||
IAElement.SemanticName = "TEXCOORD";
|
||||
IAElement.SemanticIndex = (UINT)index;
|
||||
IAElement.InputSlot = (UINT)input_slot++;
|
||||
IAElement.Format = get_vertex_attribute_format(info.type, info.size);
|
||||
IAElement.AlignedByteOffset = 0;
|
||||
IAElement.InputSlotClass = D3D12_INPUT_CLASSIFICATION_PER_INSTANCE_DATA;
|
||||
IAElement.InstanceDataStepRate = 1;
|
||||
m_IASet.push_back(IAElement);
|
||||
offset_in_vertex_buffers_buffer = (offset_in_vertex_buffers_buffer + buffer_size + 191) / 192; // 192 is multiple of 2, 4, 6, 8, 12, 16, 24, 32, 48, 64
|
||||
offset_in_vertex_buffers_buffer *= 192;
|
||||
}
|
||||
}
|
||||
|
||||
command_list->ResourceBarrier(1, &CD3DX12_RESOURCE_BARRIER::Transition(m_vertex_buffer_data.Get(), D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER));
|
||||
return vertex_buffer_views;
|
||||
}
|
||||
|
||||
@@ -190,7 +216,7 @@ void D3D12GSRender::upload_and_bind_fragment_shader_constants(size_t descriptor_
|
||||
std::tuple<D3D12_VERTEX_BUFFER_VIEW, size_t> D3D12GSRender::upload_inlined_vertex_array()
|
||||
{
|
||||
UINT offset = 0;
|
||||
m_IASet.clear();
|
||||
|
||||
// Bind attributes
|
||||
for (int index = 0; index < rsx::limits::vertex_count; ++index)
|
||||
{
|
||||
@@ -199,16 +225,6 @@ std::tuple<D3D12_VERTEX_BUFFER_VIEW, size_t> D3D12GSRender::upload_inlined_verte
|
||||
if (!info.size) // disabled
|
||||
continue;
|
||||
|
||||
D3D12_INPUT_ELEMENT_DESC IAElement = {};
|
||||
IAElement.SemanticName = "TEXCOORD";
|
||||
IAElement.SemanticIndex = (UINT)index;
|
||||
IAElement.InputSlot = 0;
|
||||
IAElement.Format = get_vertex_attribute_format(info.type, info.size);
|
||||
IAElement.AlignedByteOffset = offset;
|
||||
IAElement.InputSlotClass = D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA;
|
||||
IAElement.InstanceDataStepRate = 0;
|
||||
m_IASet.push_back(IAElement);
|
||||
|
||||
offset += rsx::get_vertex_type_size_on_host(info.type, info.size);
|
||||
}
|
||||
|
||||
@@ -258,11 +274,11 @@ std::tuple<D3D12_INDEX_BUFFER_VIEW, size_t> D3D12GSRender::generate_index_buffer
|
||||
return std::make_tuple(index_buffer_view, index_count);
|
||||
}
|
||||
|
||||
std::tuple<bool, size_t> D3D12GSRender::upload_and_set_vertex_index_data(ID3D12GraphicsCommandList *command_list)
|
||||
std::tuple<bool, size_t, std::vector<D3D12_SHADER_RESOURCE_VIEW_DESC>> D3D12GSRender::upload_and_set_vertex_index_data(ID3D12GraphicsCommandList *command_list)
|
||||
{
|
||||
if (draw_command == Draw_command::draw_command_inlined_array)
|
||||
{
|
||||
size_t vertex_count;
|
||||
/* size_t vertex_count;
|
||||
D3D12_VERTEX_BUFFER_VIEW vertex_buffer_view;
|
||||
std::tie(vertex_buffer_view, vertex_count) = upload_inlined_vertex_array();
|
||||
command_list->IASetVertexBuffers(0, (UINT)1, &vertex_buffer_view);
|
||||
@@ -274,28 +290,25 @@ std::tuple<bool, size_t> D3D12GSRender::upload_and_set_vertex_index_data(ID3D12G
|
||||
size_t index_count;
|
||||
std::tie(index_buffer_view, index_count) = generate_index_buffer_for_emulated_primitives_array({ { 0, (u32)vertex_count } });
|
||||
command_list->IASetIndexBuffer(&index_buffer_view);
|
||||
return std::make_tuple(true, index_count);
|
||||
return std::make_tuple(true, index_count);*/
|
||||
}
|
||||
|
||||
if (draw_command == Draw_command::draw_command_array)
|
||||
{
|
||||
const std::vector<D3D12_VERTEX_BUFFER_VIEW> &vertex_buffer_views = upload_vertex_attributes(first_count_commands);
|
||||
command_list->IASetVertexBuffers(0, (UINT)vertex_buffer_views.size(), vertex_buffer_views.data());
|
||||
|
||||
if (is_primitive_native(draw_mode))
|
||||
{
|
||||
// Index count
|
||||
size_t vertex_count = 0;
|
||||
for (const auto &pair : first_count_commands)
|
||||
vertex_count += pair.second;
|
||||
return std::make_tuple(false, vertex_count);
|
||||
return std::make_tuple(false, vertex_count, upload_vertex_attributes(first_count_commands, command_list));
|
||||
}
|
||||
|
||||
D3D12_INDEX_BUFFER_VIEW index_buffer_view;
|
||||
size_t index_count;
|
||||
std::tie(index_buffer_view, index_count) = generate_index_buffer_for_emulated_primitives_array(first_count_commands);
|
||||
command_list->IASetIndexBuffer(&index_buffer_view);
|
||||
return std::make_tuple(true, index_count);
|
||||
return std::make_tuple(true, index_count, upload_vertex_attributes(first_count_commands, command_list));
|
||||
}
|
||||
|
||||
assert(draw_command == Draw_command::draw_command_indexed);
|
||||
@@ -337,10 +350,7 @@ std::tuple<bool, size_t> D3D12GSRender::upload_and_set_vertex_index_data(ID3D12G
|
||||
m_timers.m_buffer_upload_size += buffer_size;
|
||||
command_list->IASetIndexBuffer(&index_buffer_view);
|
||||
|
||||
const std::vector<D3D12_VERTEX_BUFFER_VIEW> &vertex_buffer_views = upload_vertex_attributes({ std::make_pair(0, max_index + 1) });
|
||||
command_list->IASetVertexBuffers(0, (UINT)vertex_buffer_views.size(), vertex_buffer_views.data());
|
||||
|
||||
return std::make_tuple(true, index_count);
|
||||
return std::make_tuple(true, index_count, upload_vertex_attributes({ std::make_pair(0, max_index + 1) }, command_list));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -40,11 +40,10 @@ D3D12_BLEND get_blend_factor(u16 factor)
|
||||
case CELL_GCM_SRC_ALPHA_SATURATE: return D3D12_BLEND_SRC_ALPHA_SAT;
|
||||
case CELL_GCM_CONSTANT_COLOR: return D3D12_BLEND_DEST_COLOR;
|
||||
case CELL_GCM_ONE_MINUS_CONSTANT_COLOR: return D3D12_BLEND_INV_DEST_COLOR;
|
||||
case CELL_GCM_CONSTANT_ALPHA:
|
||||
case CELL_GCM_ONE_MINUS_CONSTANT_ALPHA:
|
||||
break;
|
||||
case CELL_GCM_CONSTANT_ALPHA: return D3D12_BLEND_DEST_ALPHA;
|
||||
case CELL_GCM_ONE_MINUS_CONSTANT_ALPHA: return D3D12_BLEND_INV_DEST_ALPHA;
|
||||
}
|
||||
throw EXCEPTION("Invalid or unsupported blend factor (0x%x)", factor);
|
||||
throw EXCEPTION("Invalid blend factor (0x%x)", factor);
|
||||
}
|
||||
|
||||
D3D12_BLEND get_blend_factor_alpha(u16 factor)
|
||||
@@ -62,10 +61,10 @@ D3D12_BLEND get_blend_factor_alpha(u16 factor)
|
||||
case CELL_GCM_DST_COLOR: return D3D12_BLEND_DEST_ALPHA;
|
||||
case CELL_GCM_ONE_MINUS_DST_COLOR: return D3D12_BLEND_INV_DEST_ALPHA;
|
||||
case CELL_GCM_SRC_ALPHA_SATURATE: return D3D12_BLEND_SRC_ALPHA_SAT;
|
||||
case CELL_GCM_CONSTANT_ALPHA: return D3D12_BLEND_DEST_ALPHA;
|
||||
case CELL_GCM_ONE_MINUS_CONSTANT_ALPHA: return D3D12_BLEND_INV_DEST_ALPHA;
|
||||
case CELL_GCM_CONSTANT_COLOR:
|
||||
case CELL_GCM_ONE_MINUS_CONSTANT_COLOR:
|
||||
case CELL_GCM_CONSTANT_ALPHA:
|
||||
case CELL_GCM_ONE_MINUS_CONSTANT_ALPHA:
|
||||
break;
|
||||
}
|
||||
throw EXCEPTION("Invalid or unsupported blend alpha factor (0x%x)", factor);
|
||||
@@ -162,7 +161,7 @@ DXGI_FORMAT get_texture_format(u8 format)
|
||||
case CELL_GCM_TEXTURE_D8R8G8B8: return DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||
case CELL_GCM_TEXTURE_COMPRESSED_B8R8_G8R8: return DXGI_FORMAT_G8R8_G8B8_UNORM;
|
||||
case CELL_GCM_TEXTURE_COMPRESSED_R8B8_R8G8: return DXGI_FORMAT_R8G8_B8G8_UNORM;
|
||||
case CELL_GCM_TEXTURE_Y16_X16_FLOAT:
|
||||
case CELL_GCM_TEXTURE_Y16_X16_FLOAT: return DXGI_FORMAT_R16G16_FLOAT;
|
||||
case CELL_GCM_TEXTURE_COMPRESSED_HILO8:
|
||||
case CELL_GCM_TEXTURE_COMPRESSED_HILO_S8:
|
||||
case ~(CELL_GCM_TEXTURE_LN | CELL_GCM_TEXTURE_UN) & CELL_GCM_TEXTURE_COMPRESSED_B8R8_G8R8:
|
||||
|
||||
@@ -123,7 +123,7 @@ void D3D12FragmentDecompiler::insertConstants(std::stringstream & OS)
|
||||
for (ParamItem PI : PT.items)
|
||||
{
|
||||
size_t textureIndex = atoi(PI.name.data() + 3);
|
||||
OS << "Texture2D " << PI.name << " : register(t" << textureIndex << ");" << std::endl;
|
||||
OS << "Texture2D " << PI.name << " : register(t" << textureIndex + 16 << ");" << std::endl;
|
||||
OS << "sampler " << PI.name << "sampler : register(s" << textureIndex << ");" << std::endl;
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,7 @@ void D3D12FragmentDecompiler::insertConstants(std::stringstream & OS)
|
||||
for (ParamItem PI : PT.items)
|
||||
{
|
||||
size_t textureIndex = atoi(PI.name.data() + 3);
|
||||
OS << "TextureCube " << PI.name << " : register(t" << textureIndex << ");" << std::endl;
|
||||
OS << "TextureCube " << PI.name << " : register(t" << textureIndex + 16 << ");" << std::endl;
|
||||
OS << "sampler " << PI.name << "sampler : register(s" << textureIndex << ");" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,33 +143,43 @@ D3D12GSRender::D3D12GSRender()
|
||||
m_device->CreateRenderTargetView(m_backbuffer[1].Get(), &renter_target_view_desc, m_backbuffer_descriptor_heap[1]->GetCPUDescriptorHandleForHeapStart());
|
||||
|
||||
// Common root signatures
|
||||
for (unsigned texture_count = 0; texture_count < 17; texture_count++)
|
||||
for (int vertex_buffer_count = 0; vertex_buffer_count < 17; vertex_buffer_count++) // Some app (naruto ultimate ninja storm 2) uses a shader without inputs...
|
||||
{
|
||||
CD3DX12_DESCRIPTOR_RANGE descriptorRange[] =
|
||||
for (unsigned texture_count = 0; texture_count < 17; texture_count++)
|
||||
{
|
||||
// Scale Offset data
|
||||
CD3DX12_DESCRIPTOR_RANGE(D3D12_DESCRIPTOR_RANGE_TYPE_CBV, 1, 0),
|
||||
// Constants
|
||||
CD3DX12_DESCRIPTOR_RANGE(D3D12_DESCRIPTOR_RANGE_TYPE_CBV, 2, 1),
|
||||
// Textures
|
||||
CD3DX12_DESCRIPTOR_RANGE(D3D12_DESCRIPTOR_RANGE_TYPE_SRV, texture_count, 0),
|
||||
// Samplers
|
||||
CD3DX12_DESCRIPTOR_RANGE(D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER, texture_count, 0),
|
||||
};
|
||||
CD3DX12_ROOT_PARAMETER RP[2];
|
||||
RP[0].InitAsDescriptorTable((texture_count > 0) ? 3 : 2, &descriptorRange[0]);
|
||||
RP[1].InitAsDescriptorTable(1, &descriptorRange[3]);
|
||||
CD3DX12_DESCRIPTOR_RANGE descriptorRange[] =
|
||||
{
|
||||
// Vertex buffer
|
||||
CD3DX12_DESCRIPTOR_RANGE(D3D12_DESCRIPTOR_RANGE_TYPE_SRV, vertex_buffer_count, 0),
|
||||
// Scale Offset data
|
||||
CD3DX12_DESCRIPTOR_RANGE(D3D12_DESCRIPTOR_RANGE_TYPE_CBV, 1, 0),
|
||||
// Constants
|
||||
CD3DX12_DESCRIPTOR_RANGE(D3D12_DESCRIPTOR_RANGE_TYPE_CBV, 2, 1),
|
||||
// Textures
|
||||
CD3DX12_DESCRIPTOR_RANGE(D3D12_DESCRIPTOR_RANGE_TYPE_SRV, texture_count, 16),
|
||||
// Samplers
|
||||
CD3DX12_DESCRIPTOR_RANGE(D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER, texture_count, 0),
|
||||
};
|
||||
CD3DX12_ROOT_PARAMETER RP[2];
|
||||
size_t cbv_srv_uav_descriptor_size = 4;
|
||||
if (texture_count == 0)
|
||||
cbv_srv_uav_descriptor_size -= 1;
|
||||
if (vertex_buffer_count == 0)
|
||||
cbv_srv_uav_descriptor_size -= 1;
|
||||
RP[0].InitAsDescriptorTable(cbv_srv_uav_descriptor_size, (vertex_buffer_count > 0) ? &descriptorRange[0] : &descriptorRange[1]);
|
||||
RP[1].InitAsDescriptorTable(1, &descriptorRange[4]);
|
||||
|
||||
Microsoft::WRL::ComPtr<ID3DBlob> rootSignatureBlob;
|
||||
Microsoft::WRL::ComPtr<ID3DBlob> errorBlob;
|
||||
CHECK_HRESULT(wrapD3D12SerializeRootSignature(
|
||||
&CD3DX12_ROOT_SIGNATURE_DESC((texture_count > 0) ? 2 : 1, RP, 0, 0, D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT),
|
||||
D3D_ROOT_SIGNATURE_VERSION_1, &rootSignatureBlob, &errorBlob));
|
||||
Microsoft::WRL::ComPtr<ID3DBlob> rootSignatureBlob;
|
||||
Microsoft::WRL::ComPtr<ID3DBlob> errorBlob;
|
||||
CHECK_HRESULT(wrapD3D12SerializeRootSignature(
|
||||
&CD3DX12_ROOT_SIGNATURE_DESC((texture_count > 0) ? 2 : 1, RP, 0, 0),
|
||||
D3D_ROOT_SIGNATURE_VERSION_1, &rootSignatureBlob, &errorBlob));
|
||||
|
||||
m_device->CreateRootSignature(0,
|
||||
rootSignatureBlob->GetBufferPointer(),
|
||||
rootSignatureBlob->GetBufferSize(),
|
||||
IID_PPV_ARGS(m_root_signatures[texture_count].GetAddressOf()));
|
||||
m_device->CreateRootSignature(0,
|
||||
rootSignatureBlob->GetBufferPointer(),
|
||||
rootSignatureBlob->GetBufferSize(),
|
||||
IID_PPV_ARGS(m_root_signatures[texture_count][vertex_buffer_count].GetAddressOf()));
|
||||
}
|
||||
}
|
||||
|
||||
m_per_frame_storage[0].init(m_device.Get());
|
||||
@@ -194,6 +204,17 @@ D3D12GSRender::D3D12GSRender()
|
||||
m_readback_resources.init(m_device.Get(), 1024 * 1024 * 128, D3D12_HEAP_TYPE_READBACK, D3D12_RESOURCE_STATE_COPY_DEST);
|
||||
m_buffer_data.init(m_device.Get(), 1024 * 1024 * 896, D3D12_HEAP_TYPE_UPLOAD, D3D12_RESOURCE_STATE_GENERIC_READ);
|
||||
|
||||
CHECK_HRESULT(
|
||||
m_device->CreateCommittedResource(
|
||||
&CD3DX12_HEAP_PROPERTIES(D3D12_HEAP_TYPE_DEFAULT),
|
||||
D3D12_HEAP_FLAG_NONE,
|
||||
&CD3DX12_RESOURCE_DESC::Buffer(1024 * 1024 * 16),
|
||||
D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER,
|
||||
nullptr,
|
||||
IID_PPV_ARGS(m_vertex_buffer_data.GetAddressOf())
|
||||
)
|
||||
);
|
||||
|
||||
if (rpcs3::config.rsx.d3d12.overlay.value())
|
||||
init_d2d_structures();
|
||||
}
|
||||
@@ -250,9 +271,14 @@ void D3D12GSRender::end()
|
||||
|
||||
std::chrono::time_point<std::chrono::system_clock> vertex_index_duration_start = std::chrono::system_clock::now();
|
||||
|
||||
size_t currentDescriptorIndex = get_current_resource_storage().descriptors_heap_index;
|
||||
|
||||
size_t vertex_count;
|
||||
bool indexed_draw;
|
||||
std::tie(indexed_draw, vertex_count) = upload_and_set_vertex_index_data(get_current_resource_storage().command_list.Get());
|
||||
std::vector<D3D12_SHADER_RESOURCE_VIEW_DESC> vertex_buffer_views;
|
||||
std::tie(indexed_draw, vertex_count, vertex_buffer_views) = upload_and_set_vertex_index_data(get_current_resource_storage().command_list.Get());
|
||||
|
||||
size_t vertex_buffer_count = vertex_buffer_views.size();
|
||||
|
||||
std::chrono::time_point<std::chrono::system_clock> vertex_index_duration_end = std::chrono::system_clock::now();
|
||||
m_timers.m_vertex_index_duration += std::chrono::duration_cast<std::chrono::microseconds>(vertex_index_duration_end - vertex_index_duration_start).count();
|
||||
@@ -262,16 +288,23 @@ void D3D12GSRender::end()
|
||||
std::chrono::time_point<std::chrono::system_clock> program_load_end = std::chrono::system_clock::now();
|
||||
m_timers.m_program_load_duration += std::chrono::duration_cast<std::chrono::microseconds>(program_load_end - program_load_start).count();
|
||||
|
||||
get_current_resource_storage().command_list->SetGraphicsRootSignature(m_root_signatures[std::get<2>(m_current_pso)].Get());
|
||||
get_current_resource_storage().command_list->SetGraphicsRootSignature(m_root_signatures[std::get<2>(m_current_pso)][vertex_buffer_count].Get());
|
||||
get_current_resource_storage().command_list->OMSetStencilRef(rsx::method_registers[NV4097_SET_STENCIL_FUNC_REF]);
|
||||
|
||||
std::chrono::time_point<std::chrono::system_clock> constants_duration_start = std::chrono::system_clock::now();
|
||||
|
||||
size_t currentDescriptorIndex = get_current_resource_storage().descriptors_heap_index;
|
||||
size_t offset = 0;
|
||||
for (const auto view : vertex_buffer_views)
|
||||
{
|
||||
m_device->CreateShaderResourceView(m_vertex_buffer_data.Get(), &view,
|
||||
CD3DX12_CPU_DESCRIPTOR_HANDLE(get_current_resource_storage().descriptors_heap->GetCPUDescriptorHandleForHeapStart())
|
||||
.Offset((INT)currentDescriptorIndex + offset++, g_descriptor_stride_srv_cbv_uav));
|
||||
}
|
||||
|
||||
// Constants
|
||||
upload_and_bind_scale_offset_matrix(currentDescriptorIndex);
|
||||
upload_and_bind_vertex_shader_constants(currentDescriptorIndex + 1);
|
||||
upload_and_bind_fragment_shader_constants(currentDescriptorIndex + 2);
|
||||
upload_and_bind_scale_offset_matrix(currentDescriptorIndex + vertex_buffer_count);
|
||||
upload_and_bind_vertex_shader_constants(currentDescriptorIndex + 1 + vertex_buffer_count);
|
||||
upload_and_bind_fragment_shader_constants(currentDescriptorIndex + 2 + vertex_buffer_count);
|
||||
|
||||
std::chrono::time_point<std::chrono::system_clock> constants_duration_end = std::chrono::system_clock::now();
|
||||
m_timers.m_constants_duration += std::chrono::duration_cast<std::chrono::microseconds>(constants_duration_end - constants_duration_start).count();
|
||||
@@ -281,8 +314,7 @@ void D3D12GSRender::end()
|
||||
std::chrono::time_point<std::chrono::system_clock> texture_duration_start = std::chrono::system_clock::now();
|
||||
if (std::get<2>(m_current_pso) > 0)
|
||||
{
|
||||
upload_and_bind_textures(get_current_resource_storage().command_list.Get(), currentDescriptorIndex + 3, std::get<2>(m_current_pso) > 0);
|
||||
|
||||
upload_and_bind_textures(get_current_resource_storage().command_list.Get(), currentDescriptorIndex + 3 + vertex_buffer_count, std::get<2>(m_current_pso) > 0);
|
||||
|
||||
get_current_resource_storage().command_list->SetGraphicsRootDescriptorTable(0,
|
||||
CD3DX12_GPU_DESCRIPTOR_HANDLE(get_current_resource_storage().descriptors_heap->GetGPUDescriptorHandleForHeapStart())
|
||||
@@ -294,16 +326,15 @@ void D3D12GSRender::end()
|
||||
);
|
||||
|
||||
get_current_resource_storage().current_sampler_index += std::get<2>(m_current_pso);
|
||||
get_current_resource_storage().descriptors_heap_index += std::get<2>(m_current_pso) + 3;
|
||||
get_current_resource_storage().descriptors_heap_index += std::get<2>(m_current_pso) + 3 + vertex_buffer_count;
|
||||
}
|
||||
else
|
||||
{
|
||||
get_current_resource_storage().command_list->SetDescriptorHeaps(1, get_current_resource_storage().descriptors_heap.GetAddressOf());
|
||||
get_current_resource_storage().command_list->SetGraphicsRootDescriptorTable(0,
|
||||
CD3DX12_GPU_DESCRIPTOR_HANDLE(get_current_resource_storage().descriptors_heap->GetGPUDescriptorHandleForHeapStart())
|
||||
.Offset((INT)currentDescriptorIndex, g_descriptor_stride_srv_cbv_uav)
|
||||
);
|
||||
get_current_resource_storage().descriptors_heap_index += 3;
|
||||
get_current_resource_storage().descriptors_heap_index += 3 + vertex_buffer_count;
|
||||
}
|
||||
|
||||
std::chrono::time_point<std::chrono::system_clock> texture_duration_end = std::chrono::system_clock::now();
|
||||
|
||||
@@ -56,7 +56,7 @@ private:
|
||||
ComPtr<ID3D12Resource> m_backbuffer[2];
|
||||
ComPtr<ID3D12DescriptorHeap> m_backbuffer_descriptor_heap[2];
|
||||
// m_rootSignatures[N] is RS with N texture/sample
|
||||
ComPtr<ID3D12RootSignature> m_root_signatures[17];
|
||||
ComPtr<ID3D12RootSignature> m_root_signatures[17][17]; // indexed by [texture count][vertex count]
|
||||
|
||||
// TODO: Use a tree structure to parse more efficiently
|
||||
data_cache m_texture_cache;
|
||||
@@ -67,7 +67,7 @@ private:
|
||||
RSXVertexProgram vertex_program;
|
||||
RSXFragmentProgram fragment_program;
|
||||
PipelineStateObjectCache m_pso_cache;
|
||||
std::tuple<ComPtr<ID3D12PipelineState>, std::vector<size_t>, size_t> m_current_pso;
|
||||
std::tuple<ComPtr<ID3D12PipelineState>, size_t, size_t> m_current_pso;
|
||||
|
||||
struct
|
||||
{
|
||||
@@ -115,11 +115,10 @@ private:
|
||||
// Textures, constants, index and vertex buffers storage
|
||||
data_heap m_buffer_data;
|
||||
data_heap m_readback_resources;
|
||||
ComPtr<ID3D12Resource> m_vertex_buffer_data;
|
||||
|
||||
rsx::render_targets m_rtts;
|
||||
|
||||
std::vector<D3D12_INPUT_ELEMENT_DESC> m_IASet;
|
||||
|
||||
INT g_descriptor_stride_srv_cbv_uav;
|
||||
INT g_descriptor_stride_dsv;
|
||||
INT g_descriptor_stride_rtv;
|
||||
@@ -143,14 +142,15 @@ private:
|
||||
* Non native primitive type are emulated by index buffers expansion.
|
||||
* Returns whether the draw call is indexed or not and the vertex count to draw.
|
||||
*/
|
||||
std::tuple<bool, size_t> upload_and_set_vertex_index_data(ID3D12GraphicsCommandList *command_list);
|
||||
std::tuple<bool, size_t, std::vector<D3D12_SHADER_RESOURCE_VIEW_DESC> > upload_and_set_vertex_index_data(ID3D12GraphicsCommandList *command_list);
|
||||
|
||||
/**
|
||||
* Upload all enabled vertex attributes for vertex in ranges described by vertex_ranges.
|
||||
* A range in vertex_range is a pair whose first element is the index of the beginning of the
|
||||
* range, and whose second element is the number of vertex in this range.
|
||||
*/
|
||||
std::vector<D3D12_VERTEX_BUFFER_VIEW> upload_vertex_attributes(const std::vector<std::pair<u32, u32> > &vertex_ranges);
|
||||
std::vector<D3D12_SHADER_RESOURCE_VIEW_DESC> upload_vertex_attributes(const std::vector<std::pair<u32, u32> > &vertex_ranges,
|
||||
gsl::not_null<ID3D12GraphicsCommandList*> command_list);
|
||||
|
||||
std::tuple<D3D12_VERTEX_BUFFER_VIEW, size_t> upload_inlined_vertex_array();
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
template<int Alignement>
|
||||
size_t alloc(size_t size)
|
||||
{
|
||||
if (!can_alloc<Alignement>(size)) throw EXCEPTION("Working buffer not big enough");
|
||||
if (!can_alloc<Alignement>(size)) LOG_ERROR (RSX, "Working buffer not big enough");
|
||||
size_t alloc_size = align(size, Alignement);
|
||||
size_t aligned_put_pos = align(m_put_pos, Alignement);
|
||||
if (aligned_put_pos + alloc_size < m_size)
|
||||
@@ -138,12 +138,12 @@ struct texture_entry
|
||||
texture_entry() : m_format(0), m_width(0), m_height(0), m_is_dirty(true)
|
||||
{}
|
||||
|
||||
texture_entry(u8 f, size_t w, size_t h, size_t m) : m_format(f), m_width(w), m_height(h), m_is_dirty(false)
|
||||
texture_entry(u8 f, size_t w, size_t h, size_t m) : m_format(f), m_width(w), m_height(h), m_is_dirty(false), m_mipmap(m)
|
||||
{}
|
||||
|
||||
bool operator==(const texture_entry &other)
|
||||
{
|
||||
return (m_format == other.m_format && m_width == other.m_width && m_height == other.m_height);
|
||||
return (m_format == other.m_format && m_width == other.m_width && m_height == other.m_height && m_mipmap == other.m_mipmap);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -52,6 +52,42 @@ void D3D12GSRender::load_program()
|
||||
if (d3.end)
|
||||
break;
|
||||
}
|
||||
vertex_program.output_mask = rsx::method_registers[NV4097_SET_VERTEX_ATTRIB_OUTPUT_MASK];
|
||||
|
||||
u32 input_mask = rsx::method_registers[NV4097_SET_VERTEX_ATTRIB_INPUT_MASK];
|
||||
u32 modulo_mask = rsx::method_registers[NV4097_SET_FREQUENCY_DIVIDER_OPERATION];
|
||||
vertex_program.rsx_vertex_inputs.clear();
|
||||
for (u8 index = 0; index < rsx::limits::vertex_count; ++index)
|
||||
{
|
||||
bool enabled = !!(input_mask & (1 << index));
|
||||
if (!enabled)
|
||||
continue;
|
||||
|
||||
if (vertex_arrays_info[index].size > 0)
|
||||
{
|
||||
vertex_program.rsx_vertex_inputs.push_back(
|
||||
{
|
||||
index,
|
||||
vertex_arrays_info[index].size,
|
||||
vertex_arrays_info[index].frequency,
|
||||
!!((modulo_mask >> index) & 0x1),
|
||||
true
|
||||
}
|
||||
);
|
||||
}
|
||||
else if (register_vertex_info[index].size > 0)
|
||||
{
|
||||
vertex_program.rsx_vertex_inputs.push_back(
|
||||
{
|
||||
index,
|
||||
register_vertex_info[index].size,
|
||||
register_vertex_info[index].frequency,
|
||||
!!((modulo_mask >> index) & 0x1),
|
||||
false
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
u32 shader_program = rsx::method_registers[NV4097_SET_SHADER_PROGRAM];
|
||||
fragment_program.offset = shader_program & ~0x3;
|
||||
@@ -251,7 +287,6 @@ void D3D12GSRender::load_program()
|
||||
for (unsigned i = 0; i < prop.numMRT; i++)
|
||||
prop.Blend.RenderTarget[i].RenderTargetWriteMask = mask;
|
||||
|
||||
prop.IASet = m_IASet;
|
||||
if (!!rsx::method_registers[NV4097_SET_RESTART_INDEX_ENABLE])
|
||||
{
|
||||
Index_array_type index_type = to_index_array_type(rsx::method_registers[NV4097_SET_INDEX_ARRAY_DMA] >> 4);
|
||||
|
||||
@@ -10,7 +10,6 @@ struct D3D12PipelineProperties
|
||||
D3D12_PRIMITIVE_TOPOLOGY_TYPE Topology;
|
||||
DXGI_FORMAT DepthStencilFormat;
|
||||
DXGI_FORMAT RenderTargetsFormat;
|
||||
std::vector<D3D12_INPUT_ELEMENT_DESC> IASet;
|
||||
D3D12_BLEND_DESC Blend;
|
||||
unsigned numMRT : 3;
|
||||
D3D12_DEPTH_STENCIL_DESC DepthStencil;
|
||||
@@ -19,23 +18,6 @@ struct D3D12PipelineProperties
|
||||
|
||||
bool operator==(const D3D12PipelineProperties &in) const
|
||||
{
|
||||
if (IASet.size() != in.IASet.size())
|
||||
return false;
|
||||
for (unsigned i = 0; i < IASet.size(); i++)
|
||||
{
|
||||
const D3D12_INPUT_ELEMENT_DESC &a = IASet[i], &b = in.IASet[i];
|
||||
if (a.AlignedByteOffset != b.AlignedByteOffset)
|
||||
return false;
|
||||
if (a.Format != b.Format)
|
||||
return false;
|
||||
if (a.InputSlot != b.InputSlot)
|
||||
return false;
|
||||
if (a.InstanceDataStepRate != b.InstanceDataStepRate)
|
||||
return false;
|
||||
if (a.SemanticIndex != b.SemanticIndex)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (memcmp(&DepthStencil, &in.DepthStencil, sizeof(D3D12_DEPTH_STENCIL_DESC)))
|
||||
return false;
|
||||
if (memcmp(&Blend, &in.Blend, sizeof(D3D12_BLEND_DESC)))
|
||||
@@ -93,7 +75,7 @@ public:
|
||||
ComPtr<ID3DBlob> bytecode;
|
||||
// For debugging
|
||||
std::string content;
|
||||
std::vector<size_t> vertex_shader_inputs;
|
||||
size_t vertex_shader_input_count;
|
||||
std::vector<size_t> FragmentConstantOffsetCache;
|
||||
size_t m_textureCount;
|
||||
|
||||
@@ -118,29 +100,11 @@ bool has_attribute(size_t attribute, const std::vector<D3D12_INPUT_ELEMENT_DESC>
|
||||
return false;
|
||||
}
|
||||
|
||||
static
|
||||
std::vector<D3D12_INPUT_ELEMENT_DESC> completes_IA_desc(const std::vector<D3D12_INPUT_ELEMENT_DESC> &desc, const std::vector<size_t> &inputs)
|
||||
{
|
||||
std::vector<D3D12_INPUT_ELEMENT_DESC> result(desc);
|
||||
for (size_t attribute : inputs)
|
||||
{
|
||||
if (has_attribute(attribute, desc))
|
||||
continue;
|
||||
D3D12_INPUT_ELEMENT_DESC extra_ia_desc = {};
|
||||
extra_ia_desc.SemanticIndex = (UINT)attribute;
|
||||
extra_ia_desc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT;
|
||||
extra_ia_desc.SemanticName = "TEXCOORD";
|
||||
extra_ia_desc.InputSlotClass = D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA;
|
||||
result.push_back(extra_ia_desc);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
struct D3D12Traits
|
||||
{
|
||||
using vertex_program_type = Shader;
|
||||
using fragment_program_type = Shader;
|
||||
using pipeline_storage_type = std::tuple<ComPtr<ID3D12PipelineState>, std::vector<size_t>, size_t>;
|
||||
using pipeline_storage_type = std::tuple<ComPtr<ID3D12PipelineState>, size_t, size_t>;
|
||||
using pipeline_properties = D3D12PipelineProperties;
|
||||
|
||||
static
|
||||
@@ -166,7 +130,7 @@ struct D3D12Traits
|
||||
}
|
||||
}
|
||||
|
||||
fs::file(fs::get_config_dir() + "FragmentProgram" + std::to_string(ID) + ".hlsl", fom::rewrite).write(shader);
|
||||
fs::file(fs::get_config_dir() + "/hlsl/FragmentProgram" + std::to_string(ID) + ".hlsl", fom::rewrite).write(shader);
|
||||
fragmentProgramData.id = (u32)ID;
|
||||
}
|
||||
|
||||
@@ -176,15 +140,15 @@ struct D3D12Traits
|
||||
D3D12VertexProgramDecompiler VS(RSXVP);
|
||||
std::string shaderCode = VS.Decompile();
|
||||
vertexProgramData.Compile(shaderCode, Shader::SHADER_TYPE::SHADER_TYPE_VERTEX);
|
||||
vertexProgramData.vertex_shader_inputs = VS.input_slots;
|
||||
fs::file(fs::get_config_dir() + "VertexProgram" + std::to_string(ID) + ".hlsl", fom::rewrite).write(shaderCode);
|
||||
vertexProgramData.vertex_shader_input_count = RSXVP.rsx_vertex_inputs.size();
|
||||
fs::file(fs::get_config_dir() + "/hlsl/VertexProgram" + std::to_string(ID) + ".hlsl", fom::rewrite).write(shaderCode);
|
||||
vertexProgramData.id = (u32)ID;
|
||||
}
|
||||
|
||||
static
|
||||
pipeline_storage_type build_pipeline(
|
||||
const vertex_program_type &vertexProgramData, const fragment_program_type &fragmentProgramData, const pipeline_properties &pipelineProperties,
|
||||
ID3D12Device *device, gsl::span<ComPtr<ID3D12RootSignature>, 17> root_signatures)
|
||||
pipeline_storage_type build_pipeline(
|
||||
const vertex_program_type &vertexProgramData, const fragment_program_type &fragmentProgramData, const pipeline_properties &pipelineProperties,
|
||||
ID3D12Device *device, gsl::span<ComPtr<ID3D12RootSignature>, 17, 17> root_signatures)
|
||||
{
|
||||
std::tuple<ID3D12PipelineState *, std::vector<size_t>, size_t> result = {};
|
||||
D3D12_GRAPHICS_PIPELINE_STATE_DESC graphicPipelineStateDesc = {};
|
||||
@@ -199,7 +163,7 @@ struct D3D12Traits
|
||||
graphicPipelineStateDesc.PS.BytecodeLength = fragmentProgramData.bytecode->GetBufferSize();
|
||||
graphicPipelineStateDesc.PS.pShaderBytecode = fragmentProgramData.bytecode->GetBufferPointer();
|
||||
|
||||
graphicPipelineStateDesc.pRootSignature = root_signatures[fragmentProgramData.m_textureCount].Get();
|
||||
graphicPipelineStateDesc.pRootSignature = root_signatures[fragmentProgramData.m_textureCount][vertexProgramData.vertex_shader_input_count].Get();
|
||||
|
||||
graphicPipelineStateDesc.BlendState = pipelineProperties.Blend;
|
||||
graphicPipelineStateDesc.DepthStencilState = pipelineProperties.DepthStencil;
|
||||
@@ -211,10 +175,6 @@ struct D3D12Traits
|
||||
graphicPipelineStateDesc.RTVFormats[i] = pipelineProperties.RenderTargetsFormat;
|
||||
graphicPipelineStateDesc.DSVFormat = pipelineProperties.DepthStencilFormat;
|
||||
|
||||
const std::vector<D3D12_INPUT_ELEMENT_DESC> &completed_IA_desc = completes_IA_desc(pipelineProperties.IASet, vertexProgramData.vertex_shader_inputs);
|
||||
|
||||
graphicPipelineStateDesc.InputLayout.pInputElementDescs = completed_IA_desc.data();
|
||||
graphicPipelineStateDesc.InputLayout.NumElements = (UINT)completed_IA_desc.size();
|
||||
graphicPipelineStateDesc.SampleDesc.Count = 1;
|
||||
graphicPipelineStateDesc.SampleMask = UINT_MAX;
|
||||
graphicPipelineStateDesc.NodeMask = 1;
|
||||
@@ -226,7 +186,7 @@ struct D3D12Traits
|
||||
|
||||
std::wstring name = L"PSO_" + std::to_wstring(vertexProgramData.id) + L"_" + std::to_wstring(fragmentProgramData.id);
|
||||
pso->SetName(name.c_str());
|
||||
return std::make_tuple(pso, vertexProgramData.vertex_shader_inputs, fragmentProgramData.m_textureCount);
|
||||
return std::make_tuple(pso, vertexProgramData.vertex_shader_input_count, fragmentProgramData.m_textureCount);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -52,20 +52,40 @@ void D3D12VertexProgramDecompiler::insertHeader(std::stringstream &OS)
|
||||
OS << "};" << std::endl;
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
bool declare_input(std::stringstream & OS, const std::tuple<size_t, std::string> &attribute, const std::vector<rsx_vertex_input> &inputs, size_t reg)
|
||||
{
|
||||
for (const auto &real_input : inputs)
|
||||
{
|
||||
if (static_cast<size_t>(real_input.location) != std::get<0>(attribute))
|
||||
continue;
|
||||
OS << "Texture1D<float4> " << std::get<1>(attribute) << "_buffer : register(t" << reg++ << ");\n";
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void D3D12VertexProgramDecompiler::insertInputs(std::stringstream & OS, const std::vector<ParamType>& inputs)
|
||||
{
|
||||
OS << "struct VertexInput" << std::endl;
|
||||
OS << "{" << std::endl;
|
||||
std::vector<std::tuple<size_t, std::string>> input_data;
|
||||
for (const ParamType PT : inputs)
|
||||
{
|
||||
for (const ParamItem &PI : PT.items)
|
||||
{
|
||||
OS << " " << PT.type << " " << PI.name << ": TEXCOORD" << PI.location << ";" << std::endl;
|
||||
input_slots.push_back(PI.location);
|
||||
input_data.push_back(std::make_tuple(PI.location, PI.name));
|
||||
}
|
||||
}
|
||||
OS << "};" << std::endl;
|
||||
|
||||
std::sort(input_data.begin(), input_data.end());
|
||||
|
||||
size_t t_register = 0;
|
||||
for (const auto &attribute : input_data)
|
||||
{
|
||||
if (declare_input(OS, attribute, rsx_vertex_program.rsx_vertex_inputs, t_register))
|
||||
t_register++;
|
||||
}
|
||||
}
|
||||
|
||||
void D3D12VertexProgramDecompiler::insertConstants(std::stringstream & OS, const std::vector<ParamType> & constants)
|
||||
@@ -140,9 +160,39 @@ static const reg_info reg_table[] =
|
||||
{ "tc8", true, "dst_reg15", "", false },
|
||||
};
|
||||
|
||||
namespace
|
||||
{
|
||||
void add_input(std::stringstream & OS, const ParamItem &PI, const std::vector<rsx_vertex_input> &inputs)
|
||||
{
|
||||
for (const auto &real_input : inputs)
|
||||
{
|
||||
if (real_input.location != PI.location)
|
||||
continue;
|
||||
if (!real_input.is_array)
|
||||
{
|
||||
OS << " float4 " << PI.name << " = " << PI.name << "_buffer.Load(0);\n";
|
||||
return;
|
||||
}
|
||||
if (real_input.frequency > 1)
|
||||
{
|
||||
if (real_input.is_modulo)
|
||||
{
|
||||
OS << " float4 " << PI.name << " = " << PI.name << "_buffer.Load(vertex_id % " << real_input.frequency << ");\n";
|
||||
return;
|
||||
}
|
||||
OS << " float4 " << PI.name << " = " << PI.name << "_buffer.Load(vertex_id / " << real_input.frequency << ");\n";
|
||||
return;
|
||||
}
|
||||
OS << " float4 " << PI.name << " = " << PI.name << "_buffer.Load(vertex_id);\n";
|
||||
return;
|
||||
}
|
||||
OS << " float4 " << PI.name << " = float4(0., 0., 0., 1.);\n";
|
||||
}
|
||||
}
|
||||
|
||||
void D3D12VertexProgramDecompiler::insertMainStart(std::stringstream & OS)
|
||||
{
|
||||
OS << "PixelInput main(VertexInput In)" << std::endl;
|
||||
OS << "PixelInput main(uint vertex_id : SV_VertexID)" << std::endl;
|
||||
OS << "{" << std::endl;
|
||||
|
||||
// Declare inside main function
|
||||
@@ -162,7 +212,9 @@ void D3D12VertexProgramDecompiler::insertMainStart(std::stringstream & OS)
|
||||
for (const ParamType PT : m_parr.params[PF_PARAM_IN])
|
||||
{
|
||||
for (const ParamItem &PI : PT.items)
|
||||
OS << " " << PT.type << " " << PI.name << " = In." << PI.name << ";" << std::endl;
|
||||
{
|
||||
add_input(OS, PI, rsx_vertex_program.rsx_vertex_inputs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +234,7 @@ void D3D12VertexProgramDecompiler::insertMainEnd(std::stringstream & OS)
|
||||
}
|
||||
|
||||
D3D12VertexProgramDecompiler::D3D12VertexProgramDecompiler(const RSXVertexProgram &prog) :
|
||||
VertexProgramDecompiler(prog)
|
||||
VertexProgramDecompiler(prog), rsx_vertex_program(prog)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -18,7 +18,8 @@ protected:
|
||||
virtual void insertOutputs(std::stringstream &OS, const std::vector<ParamType> &outputs);
|
||||
virtual void insertMainStart(std::stringstream &OS);
|
||||
virtual void insertMainEnd(std::stringstream &OS);
|
||||
|
||||
const RSXVertexProgram &rsx_vertex_program;
|
||||
public:
|
||||
std::vector<size_t> input_slots;
|
||||
D3D12VertexProgramDecompiler(const RSXVertexProgram &prog);
|
||||
};
|
||||
|
||||
@@ -753,6 +753,42 @@ bool GLGSRender::load_program()
|
||||
if (d3.end)
|
||||
break;
|
||||
}
|
||||
vertex_program.output_mask = rsx::method_registers[NV4097_SET_VERTEX_ATTRIB_OUTPUT_MASK];
|
||||
|
||||
u32 input_mask = rsx::method_registers[NV4097_SET_VERTEX_ATTRIB_INPUT_MASK];
|
||||
u32 modulo_mask = rsx::method_registers[NV4097_SET_FREQUENCY_DIVIDER_OPERATION];
|
||||
vertex_program.rsx_vertex_inputs.clear();
|
||||
for (u8 index = 0; index < rsx::limits::vertex_count; ++index)
|
||||
{
|
||||
bool enabled = !!(input_mask & (1 << index));
|
||||
if (!enabled)
|
||||
continue;
|
||||
|
||||
if (vertex_arrays_info[index].size > 0)
|
||||
{
|
||||
vertex_program.rsx_vertex_inputs.push_back(
|
||||
{
|
||||
index,
|
||||
vertex_arrays_info[index].size,
|
||||
vertex_arrays_info[index].frequency,
|
||||
!!((modulo_mask >> index) & 0x1),
|
||||
true
|
||||
}
|
||||
);
|
||||
}
|
||||
else if (register_vertex_info[index].size > 0)
|
||||
{
|
||||
vertex_program.rsx_vertex_inputs.push_back(
|
||||
{
|
||||
index,
|
||||
register_vertex_info[index].size,
|
||||
register_vertex_info[index].frequency,
|
||||
!!((modulo_mask >> index) & 0x1),
|
||||
false
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
RSXFragmentProgram fragment_program;
|
||||
u32 shader_program = rsx::method_registers[NV4097_SET_SHADER_PROGRAM];
|
||||
|
||||
@@ -301,7 +301,10 @@ namespace rsx
|
||||
|
||||
if (capture_current_frame)
|
||||
{
|
||||
for (const auto &first_count : first_count_commands)
|
||||
vertex_draw_count += first_count.second;
|
||||
capture_frame("Draw " + std::to_string(vertex_draw_count));
|
||||
vertex_draw_count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -190,7 +190,23 @@ static const std::string rsx_vp_vec_op_names[] =
|
||||
"SEQ", "SFL", "SGT", "SLE", "SNE", "STR", "SSG", "NULL", "NULL", "TXL"
|
||||
};
|
||||
|
||||
struct rsx_vertex_input
|
||||
{
|
||||
u8 location; // between 0 and 15
|
||||
u8 size; // between 1 and 4
|
||||
u16 frequency;
|
||||
bool is_modulo; // either modulo frequency or divide frequency
|
||||
bool is_array; // false if "reg value"
|
||||
|
||||
bool operator==(const rsx_vertex_input other) const
|
||||
{
|
||||
return location == other.location && size == other.size && frequency == other.frequency && is_modulo == other.is_modulo && is_array == other.is_array;
|
||||
}
|
||||
};
|
||||
|
||||
struct RSXVertexProgram
|
||||
{
|
||||
std::vector<u32> data;
|
||||
std::vector<rsx_vertex_input> rsx_vertex_inputs;
|
||||
u32 output_mask;
|
||||
};
|
||||
|
||||
@@ -661,9 +661,9 @@ namespace rsx
|
||||
double limit;
|
||||
switch (rpcs3::state.config.rsx.frame_limit.value())
|
||||
{
|
||||
case rsx_frame_limit::_30: limit = 30.; break;
|
||||
case rsx_frame_limit::_50: limit = 50.; break;
|
||||
case rsx_frame_limit::_59_94: limit = 59.94; break;
|
||||
case rsx_frame_limit::_30: limit = 30.; break;
|
||||
case rsx_frame_limit::_60: limit = 60.; break;
|
||||
case rsx_frame_limit::Auto: limit = rsx->fps_limit; break; //TODO
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ AudioDecoder::AudioDecoder(s32 type, u32 addr, u32 size, vm::ptr<CellAdecCbMsg>
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case CELL_ADEC_TYPE_LPCM_PAMF:
|
||||
case CELL_ADEC_TYPE_AC3:
|
||||
case CELL_ADEC_TYPE_ATRACX:
|
||||
case CELL_ADEC_TYPE_ATRACX_2CH:
|
||||
case CELL_ADEC_TYPE_ATRACX_6CH:
|
||||
@@ -49,6 +51,7 @@ AudioDecoder::AudioDecoder(s32 type, u32 addr, u32 size, vm::ptr<CellAdecCbMsg>
|
||||
break;
|
||||
}
|
||||
case CELL_ADEC_TYPE_MP3:
|
||||
case CELL_ADEC_TYPE_MPEG_L2:
|
||||
{
|
||||
codec = avcodec_find_decoder(AV_CODEC_ID_MP3);
|
||||
input_format = av_find_input_format("mp3");
|
||||
@@ -475,16 +478,16 @@ bool adecCheckType(s32 type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case CELL_ADEC_TYPE_LPCM_PAMF: cellAdec.notice("adecCheckType(): LPCM pamf"); break;
|
||||
case CELL_ADEC_TYPE_AC3: cellAdec.notice("adecCheckType(): AC3"); break;
|
||||
case CELL_ADEC_TYPE_ATRACX: cellAdec.notice("adecCheckType(): ATRAC3plus"); break;
|
||||
case CELL_ADEC_TYPE_ATRACX_2CH: cellAdec.notice("adecCheckType(): ATRAC3plus 2ch"); break;
|
||||
case CELL_ADEC_TYPE_ATRACX_6CH: cellAdec.notice("adecCheckType(): ATRAC3plus 6ch"); break;
|
||||
case CELL_ADEC_TYPE_ATRACX_8CH: cellAdec.notice("adecCheckType(): ATRAC3plus 8ch"); break;
|
||||
case CELL_ADEC_TYPE_MP3: cellAdec.notice("adecCheckType(): MP3"); break;
|
||||
case CELL_ADEC_TYPE_MPEG_L2: cellAdec.notice("adecCheckType(): Mpeg L2"); break;
|
||||
|
||||
case CELL_ADEC_TYPE_LPCM_PAMF:
|
||||
case CELL_ADEC_TYPE_AC3:
|
||||
case CELL_ADEC_TYPE_ATRAC3:
|
||||
case CELL_ADEC_TYPE_MPEG_L2:
|
||||
case CELL_ADEC_TYPE_CELP:
|
||||
case CELL_ADEC_TYPE_M4AAC:
|
||||
case CELL_ADEC_TYPE_CELP8:
|
||||
@@ -592,6 +595,8 @@ s32 cellAdecStartSeq(u32 handle, u32 param)
|
||||
|
||||
switch (adec->type)
|
||||
{
|
||||
case CELL_ADEC_TYPE_LPCM_PAMF:
|
||||
case CELL_ADEC_TYPE_AC3:
|
||||
case CELL_ADEC_TYPE_ATRACX:
|
||||
case CELL_ADEC_TYPE_ATRACX_2CH:
|
||||
case CELL_ADEC_TYPE_ATRACX_6CH:
|
||||
@@ -612,6 +617,7 @@ s32 cellAdecStartSeq(u32 handle, u32 param)
|
||||
break;
|
||||
}
|
||||
case CELL_ADEC_TYPE_MP3:
|
||||
case CELL_ADEC_TYPE_MPEG_L2:
|
||||
{
|
||||
const auto mp3 = vm::cptr<CellAdecParamMP3>::make(param);
|
||||
|
||||
|
||||
@@ -656,26 +656,26 @@ void dmuxOpen(u32 dmux_id) // TODO: call from the constructor
|
||||
{
|
||||
esAVC[es.fidMajor % 16] = task.es.es_ptr;
|
||||
}
|
||||
//else if ((es.fidMajor & -0x10) == 0xe0 && es.fidMinor == 0 && !es.sup1 && !es.sup2)
|
||||
//{
|
||||
// esM2V[es.fidMajor % 16] = task.es.es_ptr;
|
||||
//}
|
||||
else if ((es.fidMajor & -0x10) == 0xe0 && es.fidMinor == 0 && !es.sup1 && !es.sup2)
|
||||
{
|
||||
esM2V[es.fidMajor % 16] = task.es.es_ptr;
|
||||
}
|
||||
else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0 && !es.sup1 && !es.sup2)
|
||||
{
|
||||
esATX[es.fidMinor % 16] = task.es.es_ptr;
|
||||
}
|
||||
//else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0x20 && !es.sup1 && !es.sup2)
|
||||
//{
|
||||
// esDATA[es.fidMinor % 16] = task.es.es_ptr;
|
||||
//}
|
||||
//else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0x30 && !es.sup1 && !es.sup2)
|
||||
//{
|
||||
// esAC3[es.fidMinor % 16] = task.es.es_ptr;
|
||||
//}
|
||||
//else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0x40 && !es.sup1 && !es.sup2)
|
||||
//{
|
||||
// esPCM[es.fidMinor % 16] = task.es.es_ptr;
|
||||
//}
|
||||
else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0x20 && !es.sup1 && !es.sup2)
|
||||
{
|
||||
esDATA[es.fidMinor % 16] = task.es.es_ptr;
|
||||
}
|
||||
else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0x30 && !es.sup1 && !es.sup2)
|
||||
{
|
||||
esAC3[es.fidMinor % 16] = task.es.es_ptr;
|
||||
}
|
||||
else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0x40 && !es.sup1 && !es.sup2)
|
||||
{
|
||||
esPCM[es.fidMinor % 16] = task.es.es_ptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw EXCEPTION("dmuxEnableEs: unknown filter (0x%x, 0x%x, 0x%x, 0x%x)", es.fidMajor, es.fidMinor, es.sup1, es.sup2);
|
||||
|
||||
@@ -453,7 +453,7 @@ s32 cellFontSetEffectWeight()
|
||||
|
||||
s32 cellFontGlyphSetupVertexesGlyph()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFont);
|
||||
//UNIMPLEMENTED_FUNC(cellFont);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@@ -478,7 +478,7 @@ s32 cellFontSetScalePoint()
|
||||
s32 cellFontSetupRenderEffectSlant()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFont);
|
||||
return CELL_OK;
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 cellFontGraphicsSetLineRGBA()
|
||||
@@ -508,30 +508,30 @@ s32 cellFontGraphicsSetupDrawContext()
|
||||
s32 cellFontSetupRenderEffectWeight()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFont);
|
||||
return CELL_OK;
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 cellFontGlyphGetOutlineControlDistance()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFont);
|
||||
//UNIMPLEMENTED_FUNC(cellFont);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFontGlyphGetVertexesGlyphSize()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFont);
|
||||
//UNIMPLEMENTED_FUNC(cellFont);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFontGenerateCharGlyph()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFont);
|
||||
//UNIMPLEMENTED_FUNC(cellFont);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFontDeleteGlyph()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFont);
|
||||
//UNIMPLEMENTED_FUNC(cellFont);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@@ -552,7 +552,7 @@ s32 cellFontExtend(u32 a1, u32 a2, u32 a3)
|
||||
//Something happens
|
||||
}
|
||||
//Something happens?
|
||||
return CELL_OK;
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 cellFontRenderCharGlyphImageVertical()
|
||||
@@ -585,12 +585,14 @@ s32 cellFontGraphicsGetDrawType()
|
||||
|
||||
s32 cellFontGetKerning()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(cellFont);
|
||||
return -1;//throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 cellFontGetRenderScaledKerning()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(cellFont);
|
||||
return -1;//throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 cellFontGetRenderScalePixel()
|
||||
@@ -620,7 +622,8 @@ s32 cellFontGetEffectWeight()
|
||||
|
||||
s32 cellFontGetScalePixel()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(cellFont);
|
||||
return -1;//throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 cellFontClearFileCache()
|
||||
@@ -635,7 +638,8 @@ s32 cellFontAdjustFontScaling()
|
||||
|
||||
s32 cellFontSetupRenderScalePoint()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(cellFont);
|
||||
return CELL_OK; //throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 cellFontGlyphGetVerticalShift()
|
||||
|
||||
@@ -144,7 +144,7 @@ s32 cellFsFsync(u32 fd)
|
||||
{
|
||||
cellFs.todo("cellFsFsync(fd=0x%x)", fd);
|
||||
|
||||
return CELL_OK;
|
||||
return -1; //CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFsFGetBlockSize(u32 fd, vm::ptr<u64> sector_size, vm::ptr<u64> block_size)
|
||||
@@ -987,7 +987,8 @@ s32 cellFsSetIoBufferFromDefaultContainer(u32 fd, u32 buffer_size, u32 page_type
|
||||
|
||||
s32 cellFsUtime()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(cellFs);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFsArcadeHddSerialNumber()
|
||||
@@ -1027,7 +1028,8 @@ s32 cellFsChangeFileSizeWithoutAllocation()
|
||||
|
||||
s32 cellFsAllocateFileAreaWithoutZeroFill()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(cellFs);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFsChangeFileSizeByFdWithoutAllocation()
|
||||
@@ -1037,7 +1039,8 @@ s32 cellFsChangeFileSizeByFdWithoutAllocation()
|
||||
|
||||
s32 cellFsSetDiscReadRetrySetting()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(cellFs);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFsRegisterConversionCallback()
|
||||
|
||||
@@ -139,7 +139,8 @@ s32 cellHddGameExitBroken()
|
||||
|
||||
s32 cellGameDataGetSizeKB()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(cellGame);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellGameDataSetSystemVer()
|
||||
@@ -670,12 +671,14 @@ s32 cellGameThemeInstallFromBuffer()
|
||||
|
||||
s32 cellDiscGameGetBootDiscInfo()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(cellGame);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellDiscGameRegisterDiscChangeCallback()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(cellGame);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellDiscGameUnregisterDiscChangeCallback()
|
||||
|
||||
@@ -1189,12 +1189,14 @@ s32 cellGcmSetTile(u8 index, u8 location, u32 offset, u32 size, u32 pitch, u8 co
|
||||
|
||||
s32 _cellGcmFunc2()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(cellGcmSys);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _cellGcmFunc3()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(cellGcmSys);
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 _cellGcmFunc4()
|
||||
@@ -1204,7 +1206,8 @@ s32 _cellGcmFunc4()
|
||||
|
||||
s32 _cellGcmFunc13()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(cellGcmSys);
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 _cellGcmFunc38()
|
||||
|
||||
@@ -27,7 +27,7 @@ s32 cellMusicSetSelectionContext2()
|
||||
|
||||
s32 cellMusicSetVolume2()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
return CELL_OK; //throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 cellMusicGetContentsId()
|
||||
|
||||
@@ -6,7 +6,8 @@ extern Module<> cellOskDialog;
|
||||
|
||||
s32 cellOskDialogLoadAsync()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(cellOskDialog);
|
||||
return -1; //CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellOskDialogUnloadAsync()
|
||||
@@ -51,7 +52,8 @@ s32 cellOskDialogDisableDimmer()
|
||||
|
||||
s32 cellOskDialogSetKeyLayoutOption()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(cellOskDialog);
|
||||
return -1; //CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellOskDialogAddSupportLanguage()
|
||||
@@ -61,7 +63,8 @@ s32 cellOskDialogAddSupportLanguage()
|
||||
|
||||
s32 cellOskDialogSetLayoutMode()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(cellOskDialog);
|
||||
return -1; //CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellOskDialogGetInputText()
|
||||
|
||||
@@ -302,12 +302,12 @@ s32 cellSysutilGetBgmPlaybackStatus2(vm::ptr<CellSysutilBgmPlaybackStatus2> stat
|
||||
|
||||
s32 cellSysutilSetBgmPlaybackExtraParam()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
return CELL_OK; //throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 cellSysutilRegisterCallbackDispatcher()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
return CELL_OK; //throw EXCEPTION("");
|
||||
}
|
||||
|
||||
s32 cellSysutilPacketWrite()
|
||||
|
||||
@@ -640,6 +640,11 @@ s32 cellVdecDecodeAu(u32 handle, CellVdecDecodeMode mode, vm::cptr<CellVdecAuInf
|
||||
{
|
||||
return CELL_VDEC_ERROR_ARG;
|
||||
}
|
||||
|
||||
if (!vdec || mode == CELL_VDEC_DEC_MODE_B_SKIP)
|
||||
{
|
||||
return CELL_VDEC_ERROR_BUSY;
|
||||
}
|
||||
|
||||
if (mode != CELL_VDEC_DEC_MODE_NORMAL)
|
||||
{
|
||||
|
||||
@@ -425,7 +425,7 @@ s32 sceNpBasicGetEvent(vm::ptr<s32> event, vm::ptr<SceNpUserInfo> from, vm::ptr<
|
||||
// TODO: Check for other error and pass other events
|
||||
*event = SCE_NP_BASIC_EVENT_OFFLINE;
|
||||
|
||||
return CELL_OK;
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 sceNpCommerceCreateCtx()
|
||||
@@ -1482,47 +1482,56 @@ s32 _sceNpSysutilClientFree()
|
||||
|
||||
s32 _Z33_sce_np_sysutil_send_empty_packetiPN16sysutil_cxmlutil11FixedMemoryEPKcS3_()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(sceNp);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _Z27_sce_np_sysutil_send_packetiRN4cxml8DocumentE()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(sceNp);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _Z36_sce_np_sysutil_recv_packet_fixedmemiPN16sysutil_cxmlutil11FixedMemoryERN4cxml8DocumentERNS2_7ElementE()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(sceNp);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _Z40_sce_np_sysutil_recv_packet_fixedmem_subiPN16sysutil_cxmlutil11FixedMemoryERN4cxml8DocumentERNS2_7ElementE()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(sceNp);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _Z27_sce_np_sysutil_recv_packetiRN4cxml8DocumentERNS_7ElementE()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(sceNp);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _Z29_sce_np_sysutil_cxml_set_npidRN4cxml8DocumentERNS_7ElementEPKcPK7SceNpId()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(sceNp);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _Z31_sce_np_sysutil_send_packet_subiRN4cxml8DocumentE()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(sceNp);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _Z37sce_np_matching_set_matching2_runningb()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(sceNp);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _Z32_sce_np_sysutil_cxml_prepare_docPN16sysutil_cxmlutil11FixedMemoryERN4cxml8DocumentEPKcRNS2_7ElementES6_i()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(sceNp);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -235,7 +235,8 @@ s32 sceNpMatching2SetSignalingOptParam()
|
||||
|
||||
s32 sceNpMatching2RegisterContextCallback()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(sceNp2);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sceNpMatching2SendRoomChatMessage()
|
||||
@@ -275,7 +276,8 @@ s32 sceNpMatching2GrantRoomOwner()
|
||||
|
||||
s32 sceNpMatching2CreateContext()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(sceNp2);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sceNpMatching2GetSignalingOptParamLocal()
|
||||
@@ -325,12 +327,14 @@ s32 sceNpMatching2DeleteServerContext()
|
||||
|
||||
s32 sceNpMatching2SetDefaultRequestOptParam()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(sceNp2);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sceNpMatching2RegisterRoomEventCallback()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(sceNp2);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sceNpMatching2GetRoomPasswordLocal()
|
||||
@@ -380,7 +384,8 @@ s32 sceNpMatching2SetLobbyMemberDataInternal()
|
||||
|
||||
s32 sceNpMatching2RegisterRoomMessageCallback()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(sceNp2);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -193,7 +193,8 @@ s32 _sys_memchr()
|
||||
|
||||
s32 _sys_memmove()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(sys_libc);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s64 _sys_strlen(vm::cptr<char> str)
|
||||
|
||||
@@ -70,12 +70,14 @@ void sys_ppu_thread_once(PPUThread& ppu, vm::ptr<atomic_be_t<u32>> once_ctrl, vm
|
||||
|
||||
s32 sys_ppu_thread_register_atexit()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(sysPrxForUser);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_ppu_thread_unregister_atexit()
|
||||
{
|
||||
throw EXCEPTION("");
|
||||
UNIMPLEMENTED_FUNC(sysPrxForUser);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
void sysPrxForUser_sys_ppu_thread_init()
|
||||
|
||||
@@ -100,7 +100,18 @@ s32 sys_fs_open(vm::cptr<char> path, s32 flags, vm::ptr<u32> fd, s32 mode, vm::c
|
||||
throw EXCEPTION("Invalid or unimplemented flags (%#o): '%s'", flags, path.get_ptr());
|
||||
}
|
||||
|
||||
std::shared_ptr<vfsStream> file(Emu.GetVFS().OpenFile(path.get_ptr(), open_mode));
|
||||
const char *path_ptr = path.get_ptr();
|
||||
|
||||
if (strstr(path.get_ptr(), "/dev_hdd0") &&
|
||||
strncmp(path.get_ptr(), "/dev_hdd0", 9))
|
||||
{
|
||||
path_ptr = strstr(path_ptr, "/dev_hdd0");
|
||||
|
||||
LOG_ERROR(HLE, "Path contains device root path but not at the start!");
|
||||
LOG_ERROR(HLE, "Path given is (%s), modified to (%s)", path.get_ptr(), path_ptr);
|
||||
}
|
||||
|
||||
std::shared_ptr<vfsStream> file(Emu.GetVFS().OpenFile(path_ptr, open_mode));
|
||||
|
||||
if (!file || !file->IsOpened())
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
t_name->SetForegroundColour(wxColor(255, 255, 255));
|
||||
t_name->SetPosition(wxPoint(10, 6));
|
||||
|
||||
wxStaticText* t_descr = new wxStaticText(this, wxID_ANY, "An early but promising PS3 emulator and debugger.");
|
||||
wxStaticText* t_descr = new wxStaticText(this, wxID_ANY, "A PlayStation 3 emulator and debugger.");
|
||||
t_descr->SetBackgroundColour(wxColor(100, 100, 100));
|
||||
t_descr->SetForegroundColour(wxColor(255, 255, 255));
|
||||
t_descr->SetPosition(wxPoint(12, 50));
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
s_panel_buttons->AddStretchSpacer();
|
||||
s_panel_buttons->Add(b_forum, 16, 0, 5);
|
||||
s_panel_buttons->AddStretchSpacer(20);
|
||||
s_panel_buttons->Add(new wxButton(this, wxID_OK), 16, 0, 5);
|
||||
s_panel_buttons->Add(new wxButton(this, wxID_OK, "Close") , 16, 0, 5);
|
||||
s_panel_buttons->AddSpacer(12);
|
||||
|
||||
//Panels
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
|
||||
//TODO::Get the enable configuration from ini.
|
||||
AutoPauseManagerDialog::AutoPauseManagerDialog(wxWindow* parent)
|
||||
: wxDialog(parent, wxID_ANY, "Auto Pause Manager")
|
||||
: wxDialog(parent, wxID_ANY, "Automatic pause settings")
|
||||
{
|
||||
SetMinSize(wxSize(400, 360));
|
||||
|
||||
wxBoxSizer* s_main = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
wxStaticText* s_description = new wxStaticText(this, wxID_ANY, "To use auto pause: enter the ID(s) of a function or a system call. Restart of the game is required to apply. You can enable/disable this in the settings.", wxDefaultPosition, wxDefaultSize, 0);
|
||||
wxStaticText* s_description = new wxStaticText(this, wxID_ANY, "To use auto pause: enter the ID(s) of a function or a system call. You must restart your emulated game or application for changed settings to take effect. You can enable/disable this in the settings.", wxDefaultPosition, wxDefaultSize, 0);
|
||||
s_description->Wrap(400);
|
||||
s_main->Add(s_description, 0, wxALL, 5);
|
||||
|
||||
@@ -114,11 +114,11 @@ void AutoPauseManagerDialog::UpdateList(void)
|
||||
|
||||
if (m_entries[i] < 1024)
|
||||
{
|
||||
m_list->SetItem(i, 1, "System Call");
|
||||
m_list->SetItem(i, 1, "System call");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_list->SetItem(i, 1, "Function Call");
|
||||
m_list->SetItem(i, 1, "Function call");
|
||||
}
|
||||
}
|
||||
m_list->SetColumnWidth(0, wxLIST_AUTOSIZE_USEHEADER);
|
||||
@@ -176,7 +176,7 @@ void AutoPauseManagerDialog::OnRemove(wxCommandEvent& event)
|
||||
void AutoPauseManagerDialog::OnSave(wxCommandEvent& event)
|
||||
{
|
||||
SaveEntries();
|
||||
LOG_SUCCESS(HLE,"Auto Pause: File pause.bin was updated.");
|
||||
LOG_SUCCESS(HLE,"Automatic pause: file pause.bin was updated.");
|
||||
//event.Skip();
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ void AutoPauseManagerDialog::OnReload(wxCommandEvent& event)
|
||||
}
|
||||
|
||||
AutoPauseSettingsDialog::AutoPauseSettingsDialog(wxWindow* parent, u32 *entry)
|
||||
: wxDialog(parent, wxID_ANY, "Auto Pause Setting")
|
||||
: wxDialog(parent, wxID_ANY, "Automatic pause Setting")
|
||||
, m_presult(entry)
|
||||
{
|
||||
m_entry = *m_presult;
|
||||
@@ -202,7 +202,7 @@ AutoPauseSettingsDialog::AutoPauseSettingsDialog(wxWindow* parent, u32 *entry)
|
||||
|
||||
wxBoxSizer* s_main = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
wxStaticText* s_description = new wxStaticText(this, wxID_ANY, "Specify ID of System Call or Function Call below. You need to use a Hexadecimal ID.", wxDefaultPosition, wxDefaultSize, 0);
|
||||
wxStaticText* s_description = new wxStaticText(this, wxID_ANY, "Specify ID of system call or function call below. You need to use a hexadecimal ID.", wxDefaultPosition, wxDefaultSize, 0);
|
||||
s_description->Wrap(400);
|
||||
s_main->Add(s_description, 0, wxALL, 5);
|
||||
|
||||
@@ -220,7 +220,7 @@ AutoPauseSettingsDialog::AutoPauseSettingsDialog(wxWindow* parent, u32 *entry)
|
||||
|
||||
m_id->SetValue(fmt::format("%08x", m_entry));
|
||||
|
||||
SetTitle("Auto Pause Setting: " + m_id->GetValue());
|
||||
SetTitle("Automatic pause setting: " + m_id->GetValue());
|
||||
|
||||
Bind(wxEVT_BUTTON, &AutoPauseSettingsDialog::OnOk, this, wxID_OK);
|
||||
Bind(wxEVT_TEXT, &AutoPauseSettingsDialog::OnUpdateValue, this, wxID_STATIC);
|
||||
|
||||
@@ -10,13 +10,13 @@ BEGIN_EVENT_TABLE(CgDisasm, wxFrame)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
CgDisasm::CgDisasm(wxWindow* parent)
|
||||
: wxFrame(parent, wxID_ANY, "Cg Disasm", wxDefaultPosition, wxSize(640, 480))
|
||||
: wxFrame(parent, wxID_ANY, "Cg disassembler", wxDefaultPosition, wxSize(640, 480))
|
||||
{
|
||||
wxMenuBar* menubar = new wxMenuBar();
|
||||
|
||||
wxMenu* menu_general = new wxMenu();
|
||||
menubar->Append(menu_general, "&Open");
|
||||
menu_general->Append(id_open_file, "Open &Cg binary program");
|
||||
menubar->Append(menu_general, "&File");
|
||||
menu_general->Append(id_open_file, "Open &Cg binary");
|
||||
|
||||
wxNotebook* nb_cg = new wxNotebook(this, wxID_ANY);
|
||||
wxPanel* p_cg_disasm = new wxPanel(nb_cg, wxID_ANY);
|
||||
|
||||
@@ -19,7 +19,7 @@ wxFont GetFont(int size)
|
||||
}
|
||||
|
||||
CompilerELF::CompilerELF(wxWindow* parent)
|
||||
: FrameBase(parent, wxID_ANY, "CompilerELF", "", wxSize(640, 680))
|
||||
: FrameBase(parent, wxID_ANY, "ELF compiler", "", wxSize(640, 680))
|
||||
, m_status_bar(*CreateStatusBar())
|
||||
{
|
||||
m_disable_scroll = false;
|
||||
@@ -28,11 +28,11 @@ CompilerELF::CompilerELF(wxWindow* parent)
|
||||
|
||||
wxMenuBar* menubar = new wxMenuBar();
|
||||
wxMenu* menu_code = new wxMenu();
|
||||
menubar->Append(menu_code, "Code");
|
||||
menubar->Append(menu_code, "File");
|
||||
|
||||
//menu_code.Append(id_analyze_code, "Analyze");
|
||||
menu_code->Append(id_compile_code, "Compile");
|
||||
menu_code->Append(id_load_elf, "Load ELF");
|
||||
menu_code->Append(id_compile_code, "Compile");
|
||||
|
||||
SetMenuBar(menubar);
|
||||
asm_list = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(400, -1), wxTE_MULTILINE | wxTE_DONTWRAP | wxTE_RICH2);
|
||||
|
||||
@@ -125,7 +125,7 @@ class DumperThread : public ThreadBase
|
||||
wxArrayString** arr;
|
||||
|
||||
public:
|
||||
DumperThread() : ThreadBase("DumperThread")
|
||||
DumperThread() : ThreadBase("Dumper thread")
|
||||
{
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ struct WaitDumperThread : public ThreadBase
|
||||
wxArrayString** arr;
|
||||
|
||||
WaitDumperThread(bool* _done, u8 _cores, wxString _patch, MTProgressDialog& _prog_dial, wxArrayString** _arr)
|
||||
: ThreadBase("WaitDumperThread")
|
||||
: ThreadBase("Wait dumper thread")
|
||||
, done(_done)
|
||||
, cores(_cores)
|
||||
, patch(_patch)
|
||||
|
||||
@@ -10,7 +10,7 @@ protected:
|
||||
FrameBase(
|
||||
wxWindow* parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString& framename = "UnknownFrame",
|
||||
const wxString& framename = "Unknown frame",
|
||||
const std::string& ininame = "",
|
||||
wxSize defsize = wxDefaultSize,
|
||||
wxPoint defposition = wxDefaultPosition,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "Loader/PSF.h"
|
||||
#include "SettingsDialog.h"
|
||||
|
||||
static const std::string m_class_name = "GameViewer";
|
||||
static const std::string m_class_name = "Game viewer";
|
||||
|
||||
// Auxiliary classes
|
||||
class sortGameData
|
||||
@@ -236,7 +236,7 @@ void GameViewer::RightClick(wxListEvent& event)
|
||||
#endif
|
||||
m_popup->Append(boot_item);
|
||||
m_popup->Append(1, _T("Configure"));
|
||||
m_popup->Append(2, _T("Remove Game"));
|
||||
m_popup->Append(2, _T("Remove game"));
|
||||
|
||||
Bind(wxEVT_MENU, &GameViewer::BootGame, this, 0);
|
||||
Bind(wxEVT_MENU, &GameViewer::ConfigureGame, this, 1);
|
||||
|
||||
@@ -85,12 +85,12 @@ public:
|
||||
m_img_list = new wxImageList(80, 44);
|
||||
|
||||
m_columns.clear();
|
||||
m_columns.emplace_back(m_columns.size(), 90, "Icon");
|
||||
m_columns.emplace_back(m_columns.size(), 90, "");
|
||||
m_columns.emplace_back(m_columns.size(), 160, "Name");
|
||||
m_columns.emplace_back(m_columns.size(), 85, "Serial");
|
||||
m_columns.emplace_back(m_columns.size(), 55, "FW");
|
||||
m_columns.emplace_back(m_columns.size(), 55, "App version");
|
||||
m_columns.emplace_back(m_columns.size(), 75, "Category");
|
||||
m_columns.emplace_back(m_columns.size(), 60, "Min. FW");
|
||||
m_columns.emplace_back(m_columns.size(), 80, "Soft. version");
|
||||
m_columns.emplace_back(m_columns.size(), 75, "Soft. type");
|
||||
m_columns.emplace_back(m_columns.size(), 160, "Path");
|
||||
m_col_icon = &m_columns[0];
|
||||
m_col_name = &m_columns[1];
|
||||
|
||||
@@ -34,8 +34,8 @@ InterpreterDisAsmFrame::InterpreterDisAsmFrame(wxWindow* parent)
|
||||
m_list = new wxListView(this);
|
||||
m_choice_units = new wxChoice(this, wxID_ANY);
|
||||
|
||||
wxButton* b_go_to_addr = new wxButton(this, wxID_ANY, "Go To Address");
|
||||
wxButton* b_go_to_pc = new wxButton(this, wxID_ANY, "Go To PC");
|
||||
wxButton* b_go_to_addr = new wxButton(this, wxID_ANY, "Go to address");
|
||||
wxButton* b_go_to_pc = new wxButton(this, wxID_ANY, "Go to PC");
|
||||
|
||||
m_btn_step = new wxButton(this, wxID_ANY, "Step");
|
||||
m_btn_run = new wxButton(this, wxID_ANY, "Run");
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "KernelExplorer.h"
|
||||
|
||||
KernelExplorer::KernelExplorer(wxWindow* parent)
|
||||
: wxDialog(parent, wxID_ANY, "Kernel Explorer", wxDefaultPosition, wxSize(700, 450))
|
||||
: wxDialog(parent, wxID_ANY, "Kernel explorer", wxDefaultPosition, wxSize(700, 450))
|
||||
{
|
||||
this->SetBackgroundColour(wxColour(240,240,240)); //This fix the ugly background color under Windows
|
||||
wxBoxSizer* s_panel = new wxBoxSizer(wxVERTICAL);
|
||||
@@ -59,7 +59,7 @@ void KernelExplorer::Update()
|
||||
m_tree->DeleteAllItems();
|
||||
const u32 total_memory_usage = vm::get(vm::user_space)->used.load();
|
||||
|
||||
const auto& root = m_tree->AddRoot(fmt::format("Process, ID = 0x00000001, Total Memory Usage = 0x%x (%0.2f MB)", total_memory_usage, (float)total_memory_usage / (1024 * 1024)));
|
||||
const auto& root = m_tree->AddRoot(fmt::format("Process, ID = 0x00000001, Total memory usage = 0x%x (%0.2f MB)", total_memory_usage, (float)total_memory_usage / (1024 * 1024)));
|
||||
|
||||
union name64
|
||||
{
|
||||
@@ -116,7 +116,7 @@ void KernelExplorer::Update()
|
||||
|
||||
if (lwm_map.size())
|
||||
{
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Lightweight Mutexes (%zu)", lwm_map.size()));
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Lightweight mutexes (%zu)", lwm_map.size()));
|
||||
|
||||
for (const auto& data : lwm_map)
|
||||
{
|
||||
@@ -132,7 +132,7 @@ void KernelExplorer::Update()
|
||||
|
||||
if (cond_map.size())
|
||||
{
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Condition Variables (%zu)", cond_map.size()));
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Condition variables (%zu)", cond_map.size()));
|
||||
|
||||
for (const auto& data : cond_map)
|
||||
{
|
||||
@@ -148,7 +148,7 @@ void KernelExplorer::Update()
|
||||
|
||||
if (lwc_map.size())
|
||||
{
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Lightweight Condition Variables (%zu)", lwc_map.size()));
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Lightweight condition variables (%zu)", lwc_map.size()));
|
||||
|
||||
for (const auto& data : lwc_map)
|
||||
{
|
||||
@@ -164,7 +164,7 @@ void KernelExplorer::Update()
|
||||
|
||||
if (eq_map.size())
|
||||
{
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Event Queues (%zu)", eq_map.size()));
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Event queues (%zu)", eq_map.size()));
|
||||
|
||||
for (const auto& data : eq_map)
|
||||
{
|
||||
@@ -180,13 +180,13 @@ void KernelExplorer::Update()
|
||||
|
||||
if (ep_map.size())
|
||||
{
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Event Ports (%zu)", ep_map.size()));
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Event ports (%zu)", ep_map.size()));
|
||||
|
||||
for (const auto& data : ep_map)
|
||||
{
|
||||
const auto& ep = *data.second;
|
||||
|
||||
m_tree->AppendItem(node, fmt::format("Event Port: ID = 0x%08x, Name = %#llx", data.first,
|
||||
m_tree->AppendItem(node, fmt::format("Event port: ID = 0x%08x, Name = %#llx", data.first,
|
||||
ep.name));
|
||||
}
|
||||
}
|
||||
@@ -196,13 +196,13 @@ void KernelExplorer::Update()
|
||||
|
||||
if (ef_map.size())
|
||||
{
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Event Flags (%zu)", ef_map.size()));
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Event flags (%zu)", ef_map.size()));
|
||||
|
||||
for (const auto& data : ef_map)
|
||||
{
|
||||
const auto& ef = *data.second;
|
||||
|
||||
m_tree->AppendItem(node, fmt::format("Event Flag: ID = 0x%08x", data.first));
|
||||
m_tree->AppendItem(node, fmt::format("Event flag: ID = 0x%08x", data.first));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ void KernelExplorer::Update()
|
||||
|
||||
if (rwlock_map.size())
|
||||
{
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Reader/writer Locks (%zu)", rwlock_map.size()));
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Reader/writer locks (%zu)", rwlock_map.size()));
|
||||
|
||||
for (const auto& data : rwlock_map)
|
||||
{
|
||||
@@ -226,7 +226,7 @@ void KernelExplorer::Update()
|
||||
|
||||
if (prx_map.size())
|
||||
{
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("PRX Libraries (%zu)", prx_map.size()));
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("PRX libraries (%zu)", prx_map.size()));
|
||||
|
||||
for (const auto& data : prx_map)
|
||||
{
|
||||
@@ -241,13 +241,13 @@ void KernelExplorer::Update()
|
||||
|
||||
if (ct_map.size())
|
||||
{
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Memory Containers (%zu)", ct_map.size()));
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Memory containers (%zu)", ct_map.size()));
|
||||
|
||||
for (const auto& data : ct_map)
|
||||
{
|
||||
const auto& ct = *data.second;
|
||||
|
||||
m_tree->AppendItem(node, fmt::format("Memory Container: ID = 0x%08x", data.first));
|
||||
m_tree->AppendItem(node, fmt::format("Memory container: ID = 0x%08x", data.first));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,13 +256,13 @@ void KernelExplorer::Update()
|
||||
|
||||
if (mem_map.size())
|
||||
{
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Memory Objects (%zu)", mem_map.size()));
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("Memory objects (%zu)", mem_map.size()));
|
||||
|
||||
for (const auto& data : mem_map)
|
||||
{
|
||||
const auto& mem = *data.second;
|
||||
|
||||
m_tree->AppendItem(node, fmt::format("Memory Object: ID = 0x%08x", data.first));
|
||||
m_tree->AppendItem(node, fmt::format("Memory object: ID = 0x%08x", data.first));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,13 +271,13 @@ void KernelExplorer::Update()
|
||||
|
||||
if (ppu_map.size())
|
||||
{
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("PPU Threads (%zu)", ppu_map.size()));
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("PPU threads (%zu)", ppu_map.size()));
|
||||
|
||||
for (const auto& data : ppu_map)
|
||||
{
|
||||
const auto& ppu = *data.second;
|
||||
|
||||
m_tree->AppendItem(node, fmt::format("PPU Thread: ID = 0x%08x '%s', - %s", data.first,
|
||||
m_tree->AppendItem(node, fmt::format("PPU thread: ID = 0x%08x '%s', - %s", data.first,
|
||||
ppu.get_name().c_str(), ppu.ThreadStatusToString()));
|
||||
}
|
||||
}
|
||||
@@ -287,13 +287,13 @@ void KernelExplorer::Update()
|
||||
|
||||
if (spu_map.size())
|
||||
{
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("SPU Thread Groups (%d)", spu_map.size()));
|
||||
const auto& node = m_tree->AppendItem(root, fmt::format("SPU thread groups (%d)", spu_map.size()));
|
||||
|
||||
for (const auto& data : spu_map)
|
||||
{
|
||||
const auto& tg = *data.second;
|
||||
|
||||
m_tree->AppendItem(node, fmt::format("SPU Thread Group: ID = 0x%08x '%s'", data.first,
|
||||
m_tree->AppendItem(node, fmt::format("SPU thread group: ID = 0x%08x '%s'", data.first,
|
||||
tg.name.c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "Emu/FS/VFS.h"
|
||||
|
||||
LLEModulesManagerFrame::LLEModulesManagerFrame(wxWindow* parent)
|
||||
: wxDialog(parent, wxID_ANY, "LLEModulesManagerFrame", wxDefaultPosition, wxSize(480, 640))
|
||||
: wxDialog(parent, wxID_ANY, "Modules LLE manager", wxDefaultPosition, wxSize(480, 640))
|
||||
{
|
||||
wxBoxSizer *s_panel = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer *s_p_panel = new wxBoxSizer(wxVERTICAL);
|
||||
@@ -18,8 +18,8 @@ LLEModulesManagerFrame::LLEModulesManagerFrame(wxWindow* parent)
|
||||
|
||||
// select / unselect
|
||||
wxStaticBoxSizer* s_selection = new wxStaticBoxSizer(wxHORIZONTAL, p_main);
|
||||
wxButton* b_select = new wxButton(p_main, wxID_ANY, "Select All", wxDefaultPosition, wxSize(80, -1));
|
||||
wxButton* b_unselect = new wxButton(p_main, wxID_ANY, "Unselect All", wxDefaultPosition, wxSize(80, -1));
|
||||
wxButton* b_select = new wxButton(p_main, wxID_ANY, "Select all", wxDefaultPosition, wxSize(80, -1));
|
||||
wxButton* b_unselect = new wxButton(p_main, wxID_ANY, "Unselect all", wxDefaultPosition, wxSize(80, -1));
|
||||
s_selection->Add(b_select);
|
||||
s_selection->Add(b_unselect);
|
||||
|
||||
|
||||
+18
-18
@@ -77,7 +77,7 @@ MainFrame::MainFrame()
|
||||
wxMenuBar* menubar = new wxMenuBar();
|
||||
|
||||
wxMenu* menu_boot = new wxMenu();
|
||||
menubar->Append(menu_boot, "&Boot");
|
||||
menubar->Append(menu_boot, "&File");
|
||||
menu_boot->Append(id_boot_elf, "Boot &ELF / SELF file");
|
||||
menu_boot->Append(id_boot_game, "Boot &game");
|
||||
menu_boot->AppendSeparator();
|
||||
@@ -90,30 +90,30 @@ MainFrame::MainFrame()
|
||||
menu_sys->Append(id_sys_pause, "&Pause")->Enable(false);
|
||||
menu_sys->Append(id_sys_stop, "&Stop\tCtrl + S")->Enable(false);
|
||||
menu_sys->AppendSeparator();
|
||||
menu_sys->Append(id_sys_send_open_menu, "Send &open system menu cmd")->Enable(false);
|
||||
menu_sys->Append(id_sys_send_open_menu, "Press &PS button")->Enable(false);
|
||||
menu_sys->Append(id_sys_send_exit, "Send &exit cmd")->Enable(false);
|
||||
|
||||
wxMenu* menu_conf = new wxMenu();
|
||||
menubar->Append(menu_conf, "&Config");
|
||||
menu_conf->Append(id_config_emu, "&Settings");
|
||||
menu_conf->Append(id_config_pad, "&PAD Settings");
|
||||
menu_conf->Append(id_config_pad, "&Controller settings");
|
||||
menu_conf->AppendSeparator();
|
||||
menu_conf->Append(id_config_autopause_manager, "&Auto Pause Settings");
|
||||
menu_conf->Append(id_config_autopause_manager, "&Auto pause settings");
|
||||
menu_conf->AppendSeparator();
|
||||
menu_conf->Append(id_config_vfs_manager, "Virtual &File System Manager");
|
||||
menu_conf->Append(id_config_vhdd_manager, "Virtual &HDD Manager");
|
||||
menu_conf->Append(id_config_savedata_manager, "Save &Data Utility");
|
||||
menu_conf->Append(id_config_lle_modules_manager, "&LLE Modules Manager");
|
||||
menu_conf->Append(id_config_vfs_manager, "Virtual &file system manager");
|
||||
menu_conf->Append(id_config_vhdd_manager, "Virtual &hard drive manager");
|
||||
menu_conf->Append(id_config_savedata_manager, "Save &data manager");
|
||||
menu_conf->Append(id_config_lle_modules_manager, "Modules &LLE manager");
|
||||
|
||||
|
||||
wxMenu* menu_tools = new wxMenu();
|
||||
menubar->Append(menu_tools, "&Tools");
|
||||
menu_tools->Append(id_tools_compiler, "&ELF Compiler");
|
||||
menu_tools->Append(id_tools_kernel_explorer, "&Kernel Explorer")->Enable(false);
|
||||
menu_tools->Append(id_tools_memory_viewer, "&Memory Viewer")->Enable(false);
|
||||
menu_tools->Append(id_tools_rsx_debugger, "&RSX Debugger")->Enable(false);
|
||||
menu_tools->Append(id_tools_string_search, "&String Search")->Enable(false);
|
||||
menu_tools->Append(id_tools_cg_disasm, "&Cg Disasm")->Enable();
|
||||
menu_tools->Append(id_tools_compiler, "&ELF compiler");
|
||||
menu_tools->Append(id_tools_kernel_explorer, "&Kernel explorer")->Enable(false);
|
||||
menu_tools->Append(id_tools_memory_viewer, "&Memory viewer")->Enable(false);
|
||||
menu_tools->Append(id_tools_rsx_debugger, "&RSX debugger")->Enable(false);
|
||||
menu_tools->Append(id_tools_string_search, "&String search")->Enable(false);
|
||||
menu_tools->Append(id_tools_cg_disasm, "&Cg disassembler")->Enable();
|
||||
|
||||
wxMenu* menu_help = new wxMenu();
|
||||
menubar->Append(menu_help, "&Help");
|
||||
@@ -127,7 +127,7 @@ MainFrame::MainFrame()
|
||||
m_game_viewer = new GameViewer(this);
|
||||
m_debugger_frame = new DebuggerPanel(this);
|
||||
|
||||
AddPane(m_game_viewer, "Game List", wxAUI_DOCK_CENTRE);
|
||||
AddPane(m_game_viewer, "PS3 software", wxAUI_DOCK_CENTRE);
|
||||
AddPane(m_log_frame, "Log", wxAUI_DOCK_BOTTOM);
|
||||
AddPane(m_debugger_frame, "Debugger", wxAUI_DOCK_RIGHT);
|
||||
|
||||
@@ -530,7 +530,7 @@ void MainFrame::UpdateUI(wxCommandEvent& event)
|
||||
// Emulation
|
||||
wxMenuItem& pause = *menubar.FindItem(id_sys_pause);
|
||||
wxMenuItem& stop = *menubar.FindItem(id_sys_stop);
|
||||
pause.SetItemLabel(is_running ? "&Pause\tCtrl + P" : is_ready ? "&Start\tCtrl + E" : "&Resume\tCtrl + E");
|
||||
pause.SetItemLabel(is_running ? "&Pause\tCtrl + P" : is_ready ? "&Start\tCtrl + F" : "&Resume\tCtrl + F");
|
||||
pause.Enable(!is_stopped);
|
||||
stop.Enable(!is_stopped);
|
||||
|
||||
@@ -538,7 +538,7 @@ void MainFrame::UpdateUI(wxCommandEvent& event)
|
||||
wxMenuItem& send_exit = *menubar.FindItem(id_sys_send_exit);
|
||||
wxMenuItem& send_open_menu = *menubar.FindItem(id_sys_send_open_menu);
|
||||
bool enable_commands = !is_stopped;
|
||||
send_open_menu.SetItemLabel(wxString::Format("Send &%s system menu cmd", (m_sys_menu_opened ? "close" : "open")));
|
||||
send_open_menu.SetItemLabel(wxString::Format("Press &PS buton %s", (m_sys_menu_opened ? "close" : "open")));
|
||||
send_open_menu.Enable(enable_commands);
|
||||
send_exit.Enable(enable_commands);
|
||||
|
||||
@@ -565,7 +565,7 @@ void MainFrame::OnKeyDown(wxKeyEvent& event)
|
||||
{
|
||||
switch(event.GetKeyCode())
|
||||
{
|
||||
case 'E': case 'e': if(Emu.IsPaused()) Emu.Resume(); else if(Emu.IsReady()) Emu.Run(); return;
|
||||
case 'F': case 'f': if(Emu.IsPaused()) Emu.Resume(); else if(Emu.IsReady()) Emu.Run(); return;
|
||||
case 'P': case 'p': if(Emu.IsRunning()) Emu.Pause(); return;
|
||||
case 'S': case 's': if(!Emu.IsStopped()) Emu.Stop(); return;
|
||||
case 'R': case 'r': if(!Emu.GetPath().empty()) {Emu.Stop(); Emu.Run();} return;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "MemoryStringSearcher.h"
|
||||
|
||||
MemoryStringSearcher::MemoryStringSearcher(wxWindow* parent)
|
||||
: wxDialog(parent, wxID_ANY, "String Searcher", wxDefaultPosition, wxSize(545, 64))
|
||||
: wxDialog(parent, wxID_ANY, "String searcher", wxDefaultPosition, wxSize(545, 64))
|
||||
, exit(false)
|
||||
{
|
||||
this->SetBackgroundColour(wxColour(240,240,240));
|
||||
|
||||
@@ -19,7 +19,7 @@ MemoryViewerPanel::MemoryViewerPanel(wxWindow* parent)
|
||||
wxBoxSizer* s_tools = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
//Tools: Memory Viewer Options
|
||||
wxStaticBoxSizer* s_tools_mem = new wxStaticBoxSizer(wxHORIZONTAL, this, "Memory Viewer Options");
|
||||
wxStaticBoxSizer* s_tools_mem = new wxStaticBoxSizer(wxHORIZONTAL, this, "Memory viewer options");
|
||||
|
||||
wxStaticBoxSizer* s_tools_mem_addr = new wxStaticBoxSizer(wxHORIZONTAL, this, "Address");
|
||||
t_addr = new wxTextCtrl(this, wxID_ANY, "00000000", wxDefaultPosition, wxSize(60, -1), wxTE_PROCESS_ENTER);
|
||||
@@ -46,7 +46,7 @@ MemoryViewerPanel::MemoryViewerPanel(wxWindow* parent)
|
||||
s_tools_mem->Add(s_tools_mem_buttons);
|
||||
|
||||
//Tools: Raw Image Preview Options
|
||||
wxStaticBoxSizer* s_tools_img = new wxStaticBoxSizer(wxHORIZONTAL, this, "Raw Image Preview");
|
||||
wxStaticBoxSizer* s_tools_img = new wxStaticBoxSizer(wxHORIZONTAL, this, "Raw image preview");
|
||||
|
||||
wxStaticBoxSizer* s_tools_img_size = new wxStaticBoxSizer(wxHORIZONTAL, this, "Size");
|
||||
sc_img_size_x = new wxSpinCtrl(this, wxID_ANY, "256", wxDefaultPosition, wxSize(60, -1));
|
||||
@@ -223,7 +223,7 @@ void MemoryViewerPanel::ShowMemory()
|
||||
|
||||
void MemoryViewerPanel::ShowImage(wxWindow* parent, u32 addr, int mode, u32 width, u32 height, bool flipv)
|
||||
{
|
||||
wxString title = wxString::Format("Raw Image @ 0x%x", addr);
|
||||
wxString title = wxString::Format("Raw image @ 0x%x", addr);
|
||||
|
||||
wxDialog* f_image_viewer = new wxDialog(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, wxMINIMIZE_BOX | wxCLOSE_BOX | wxCAPTION | wxCLIP_CHILDREN);
|
||||
f_image_viewer->SetBackgroundColour(wxColour(240,240,240)); //This fix the ugly background color under Windows
|
||||
|
||||
+14
-14
@@ -7,7 +7,7 @@
|
||||
#include "PADManager.h"
|
||||
|
||||
PADManager::PADManager(wxWindow* parent)
|
||||
: wxDialog(parent, wxID_ANY, "PAD Settings")
|
||||
: wxDialog(parent, wxID_ANY, "Controller settings")
|
||||
, m_button_id(0)
|
||||
, m_key_pressed(false)
|
||||
, m_emu_paused(false)
|
||||
@@ -22,20 +22,20 @@ PADManager::PADManager(wxWindow* parent)
|
||||
wxBoxSizer* s_subpanel = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer* s_subpanel2 = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
// Left Analog Stick
|
||||
wxStaticBoxSizer* s_round_stick_l = new wxStaticBoxSizer(wxVERTICAL, this, _("Left Analog Stick"));
|
||||
// Left analog stick
|
||||
wxStaticBoxSizer* s_round_stick_l = new wxStaticBoxSizer(wxVERTICAL, this, _("Left analog stick"));
|
||||
wxBoxSizer* s_subpanel_lstick_1 = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer* s_subpanel_lstick_2 = new wxBoxSizer(wxHORIZONTAL);
|
||||
wxBoxSizer* s_subpanel_lstick_3 = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
// D-Pad
|
||||
wxStaticBoxSizer* s_round_pad_controls = new wxStaticBoxSizer(wxVERTICAL, this, _("D-Pad"));
|
||||
// Directional pad
|
||||
wxStaticBoxSizer* s_round_pad_controls = new wxStaticBoxSizer(wxVERTICAL, this, _("Directional pad"));
|
||||
wxBoxSizer* s_subpanel_pad_1 = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer* s_subpanel_pad_2 = new wxBoxSizer(wxHORIZONTAL);
|
||||
wxBoxSizer* s_subpanel_pad_3 = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
// Left shifts
|
||||
wxStaticBoxSizer* s_round_pad_shifts_l = new wxStaticBoxSizer(wxVERTICAL, this, _("Left Shifts"));
|
||||
// L buttons
|
||||
wxStaticBoxSizer* s_round_pad_shifts_l = new wxStaticBoxSizer(wxVERTICAL, this, _("L buttons"));
|
||||
wxStaticBoxSizer* s_round_pad_l1 = new wxStaticBoxSizer(wxVERTICAL, this, _("L1"));
|
||||
wxStaticBoxSizer* s_round_pad_l2 = new wxStaticBoxSizer(wxVERTICAL, this, _("L2"));
|
||||
wxStaticBoxSizer* s_round_pad_l3 = new wxStaticBoxSizer(wxVERTICAL, this, _("L3"));
|
||||
@@ -45,8 +45,8 @@ PADManager::PADManager(wxWindow* parent)
|
||||
wxStaticBoxSizer* s_round_pad_select = new wxStaticBoxSizer(wxVERTICAL, this, _("Select"));
|
||||
wxStaticBoxSizer* s_round_pad_start = new wxStaticBoxSizer(wxVERTICAL, this, _("Start"));
|
||||
|
||||
// Right shifts
|
||||
wxStaticBoxSizer* s_round_pad_shifts_r = new wxStaticBoxSizer(wxVERTICAL, this, _("Right Shifts"));
|
||||
// R buttons
|
||||
wxStaticBoxSizer* s_round_pad_shifts_r = new wxStaticBoxSizer(wxVERTICAL, this, _("R buttons"));
|
||||
wxStaticBoxSizer* s_round_pad_r1 = new wxStaticBoxSizer(wxVERTICAL, this, _("R1"));
|
||||
wxStaticBoxSizer* s_round_pad_r2 = new wxStaticBoxSizer(wxVERTICAL, this, _("R2"));
|
||||
wxStaticBoxSizer* s_round_pad_r3 = new wxStaticBoxSizer(wxVERTICAL, this, _("R3"));
|
||||
@@ -61,8 +61,8 @@ PADManager::PADManager(wxWindow* parent)
|
||||
wxBoxSizer* s_subpanel_buttons_2 = new wxBoxSizer(wxHORIZONTAL);
|
||||
wxBoxSizer* s_subpanel_buttons_3 = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
// Right Analog Stick
|
||||
wxStaticBoxSizer* s_round_stick_r = new wxStaticBoxSizer(wxVERTICAL, this, _("Right Analog Stick"));
|
||||
// Right analog stick
|
||||
wxStaticBoxSizer* s_round_stick_r = new wxStaticBoxSizer(wxVERTICAL, this, _("Right analog stick"));
|
||||
wxBoxSizer* s_subpanel_rstick_1 = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer* s_subpanel_rstick_2 = new wxBoxSizer(wxHORIZONTAL);
|
||||
wxBoxSizer* s_subpanel_rstick_3 = new wxBoxSizer(wxVERTICAL);
|
||||
@@ -123,13 +123,13 @@ PADManager::PADManager(wxWindow* parent)
|
||||
s_subpanel_lstick_2->Add(b_right_lstick);
|
||||
s_subpanel_lstick_3->Add(b_down_lstick);
|
||||
|
||||
// D-Pad
|
||||
// Directional pad
|
||||
s_subpanel_pad_1->Add(b_up);
|
||||
s_subpanel_pad_2->Add(b_left);
|
||||
s_subpanel_pad_2->Add(b_right);
|
||||
s_subpanel_pad_3->Add(b_down);
|
||||
|
||||
// Left shifts
|
||||
// L button
|
||||
s_round_pad_l1->Add(b_shift_l1);
|
||||
s_round_pad_l2->Add(b_shift_l2);
|
||||
s_round_pad_l3->Add(b_shift_l3);
|
||||
@@ -138,7 +138,7 @@ PADManager::PADManager(wxWindow* parent)
|
||||
s_round_pad_select->Add(b_select);
|
||||
s_round_pad_start->Add(b_start);
|
||||
|
||||
// Right shifts
|
||||
// R button
|
||||
s_round_pad_r1->Add(b_shift_r1);
|
||||
s_round_pad_r2->Add(b_shift_r2);
|
||||
s_round_pad_r3->Add(b_shift_r3);
|
||||
|
||||
+38
-38
@@ -25,7 +25,7 @@ enum GCMEnumTypes
|
||||
};
|
||||
|
||||
RSXDebugger::RSXDebugger(wxWindow* parent)
|
||||
: wxDialog(parent, wxID_ANY, "RSX Debugger", wxDefaultPosition, wxSize(700, 450))
|
||||
: wxDialog(parent, wxID_ANY, "RSX debugger", wxDefaultPosition, wxSize(700, 450))
|
||||
, m_item_count(37)
|
||||
, m_addr(0x0)
|
||||
, m_cur_texture(0)
|
||||
@@ -38,7 +38,7 @@ RSXDebugger::RSXDebugger(wxWindow* parent)
|
||||
wxBoxSizer* s_tools = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
// Controls
|
||||
wxStaticBoxSizer* s_controls = new wxStaticBoxSizer(wxHORIZONTAL, this, "RSX Debugger Controls");
|
||||
wxStaticBoxSizer* s_controls = new wxStaticBoxSizer(wxHORIZONTAL, this, "RSX debugger controls");
|
||||
|
||||
// Controls: Address
|
||||
wxStaticBoxSizer* s_controls_addr = new wxStaticBoxSizer(wxHORIZONTAL, this, "Address:");
|
||||
@@ -89,9 +89,9 @@ RSXDebugger::RSXDebugger(wxWindow* parent)
|
||||
wxPanel* p_texture = new wxPanel(nb_rsx, wxID_ANY);
|
||||
wxPanel* p_settings = new wxPanel(nb_rsx, wxID_ANY);
|
||||
|
||||
nb_rsx->AddPage(p_commands, wxT("RSX Commands"));
|
||||
nb_rsx->AddPage(p_captured_frame, wxT("Captured Frame"));
|
||||
nb_rsx->AddPage(p_captured_draw_calls, wxT("Captured Draw Calls"));
|
||||
nb_rsx->AddPage(p_commands, wxT("RSX commands"));
|
||||
nb_rsx->AddPage(p_captured_frame, wxT("Captured frame"));
|
||||
nb_rsx->AddPage(p_captured_draw_calls, wxT("Captured draw calls"));
|
||||
nb_rsx->AddPage(p_flags, wxT("Flags"));
|
||||
|
||||
nb_rsx->AddPage(p_lightning, wxT("Lightning"));
|
||||
@@ -177,12 +177,12 @@ RSXDebugger::RSXDebugger(wxWindow* parent)
|
||||
//Buffers
|
||||
wxBoxSizer* s_buffers1 = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer* s_buffers2 = new wxBoxSizer(wxVERTICAL);
|
||||
wxStaticBoxSizer* s_buffers_colorA = new wxStaticBoxSizer(wxHORIZONTAL, p_buffers, "Color Buffer A");
|
||||
wxStaticBoxSizer* s_buffers_colorB = new wxStaticBoxSizer(wxHORIZONTAL, p_buffers, "Color Buffer B");
|
||||
wxStaticBoxSizer* s_buffers_colorC = new wxStaticBoxSizer(wxHORIZONTAL, p_buffers, "Color Buffer C");
|
||||
wxStaticBoxSizer* s_buffers_colorD = new wxStaticBoxSizer(wxHORIZONTAL, p_buffers, "Color Buffer D");
|
||||
wxStaticBoxSizer* s_buffers_depth = new wxStaticBoxSizer(wxHORIZONTAL, p_buffers, "Depth Buffer");
|
||||
wxStaticBoxSizer* s_buffers_stencil = new wxStaticBoxSizer(wxHORIZONTAL, p_buffers, "Stencil Buffer");
|
||||
wxStaticBoxSizer* s_buffers_colorA = new wxStaticBoxSizer(wxHORIZONTAL, p_buffers, "Color buffer A");
|
||||
wxStaticBoxSizer* s_buffers_colorB = new wxStaticBoxSizer(wxHORIZONTAL, p_buffers, "Color buffer B");
|
||||
wxStaticBoxSizer* s_buffers_colorC = new wxStaticBoxSizer(wxHORIZONTAL, p_buffers, "Color buffer C");
|
||||
wxStaticBoxSizer* s_buffers_colorD = new wxStaticBoxSizer(wxHORIZONTAL, p_buffers, "Color buffer D");
|
||||
wxStaticBoxSizer* s_buffers_depth = new wxStaticBoxSizer(wxHORIZONTAL, p_buffers, "Depth buffer");
|
||||
wxStaticBoxSizer* s_buffers_stencil = new wxStaticBoxSizer(wxHORIZONTAL, p_buffers, "Stencil buffer");
|
||||
wxStaticBoxSizer* s_buffers_text = new wxStaticBoxSizer(wxHORIZONTAL, p_buffers, "Texture");
|
||||
|
||||
//Buffers and textures
|
||||
@@ -840,11 +840,11 @@ void RSXDebugger::GetSettings()
|
||||
render.m_color_mask_g,
|
||||
render.m_color_mask_b,
|
||||
render.m_color_mask_a));
|
||||
LIST_SETTINGS_ADD("Context DMA Color A", wxString::Format("0x%x", render.m_context_dma_color_a));
|
||||
LIST_SETTINGS_ADD("Context DMA Color B", wxString::Format("0x%x", render.m_context_dma_color_b));
|
||||
LIST_SETTINGS_ADD("Context DMA Color C", wxString::Format("0x%x", render.m_context_dma_color_c));
|
||||
LIST_SETTINGS_ADD("Context DMA Color D", wxString::Format("0x%x", render.m_context_dma_color_d));
|
||||
LIST_SETTINGS_ADD("Context DMA Zeta", wxString::Format("0x%x", render.m_context_dma_z));
|
||||
LIST_SETTINGS_ADD("Context DMA color A", wxString::Format("0x%x", render.m_context_dma_color_a));
|
||||
LIST_SETTINGS_ADD("Context DMA color B", wxString::Format("0x%x", render.m_context_dma_color_b));
|
||||
LIST_SETTINGS_ADD("Context DMA color C", wxString::Format("0x%x", render.m_context_dma_color_c));
|
||||
LIST_SETTINGS_ADD("Context DMA color D", wxString::Format("0x%x", render.m_context_dma_color_d));
|
||||
LIST_SETTINGS_ADD("Context DMA zeta", wxString::Format("0x%x", render.m_context_dma_z));
|
||||
LIST_SETTINGS_ADD("Depth bounds", wxString::Format("Min:%f, Max:%f", render.m_depth_bounds_min, render.m_depth_bounds_max));
|
||||
LIST_SETTINGS_ADD("Depth func", !(render.m_set_depth_func) ? "(none)" : wxString::Format("0x%x (%s)",
|
||||
render.m_depth_func,
|
||||
@@ -860,16 +860,16 @@ void RSXDebugger::GetSettings()
|
||||
LIST_SETTINGS_ADD("Stencil func", !(render.m_set_stencil_func) ? "(none)" : wxString::Format("0x%x (%s)",
|
||||
render.m_stencil_func,
|
||||
ParseGCMEnum(render.m_stencil_func, CELL_GCM_ENUM)));
|
||||
LIST_SETTINGS_ADD("Surface Pitch A", wxString::Format("0x%x", render.m_surface_pitch_a));
|
||||
LIST_SETTINGS_ADD("Surface Pitch B", wxString::Format("0x%x", render.m_surface_pitch_b));
|
||||
LIST_SETTINGS_ADD("Surface Pitch C", wxString::Format("0x%x", render.m_surface_pitch_c));
|
||||
LIST_SETTINGS_ADD("Surface Pitch D", wxString::Format("0x%x", render.m_surface_pitch_d));
|
||||
LIST_SETTINGS_ADD("Surface Pitch Z", wxString::Format("0x%x", render.m_surface_pitch_z));
|
||||
LIST_SETTINGS_ADD("Surface Offset A", wxString::Format("0x%x", render.m_surface_offset_a));
|
||||
LIST_SETTINGS_ADD("Surface Offset B", wxString::Format("0x%x", render.m_surface_offset_b));
|
||||
LIST_SETTINGS_ADD("Surface Offset C", wxString::Format("0x%x", render.m_surface_offset_c));
|
||||
LIST_SETTINGS_ADD("Surface Offset D", wxString::Format("0x%x", render.m_surface_offset_d));
|
||||
LIST_SETTINGS_ADD("Surface Offset Z", wxString::Format("0x%x", render.m_surface_offset_z));
|
||||
LIST_SETTINGS_ADD("Surface pitch A", wxString::Format("0x%x", render.m_surface_pitch_a));
|
||||
LIST_SETTINGS_ADD("Surface pitch B", wxString::Format("0x%x", render.m_surface_pitch_b));
|
||||
LIST_SETTINGS_ADD("Surface pitch C", wxString::Format("0x%x", render.m_surface_pitch_c));
|
||||
LIST_SETTINGS_ADD("Surface pitch D", wxString::Format("0x%x", render.m_surface_pitch_d));
|
||||
LIST_SETTINGS_ADD("Surface pitch Z", wxString::Format("0x%x", render.m_surface_pitch_z));
|
||||
LIST_SETTINGS_ADD("Surface offset A", wxString::Format("0x%x", render.m_surface_offset_a));
|
||||
LIST_SETTINGS_ADD("Surface offset B", wxString::Format("0x%x", render.m_surface_offset_b));
|
||||
LIST_SETTINGS_ADD("Surface offset C", wxString::Format("0x%x", render.m_surface_offset_c));
|
||||
LIST_SETTINGS_ADD("Surface offset D", wxString::Format("0x%x", render.m_surface_offset_d));
|
||||
LIST_SETTINGS_ADD("Surface offset Z", wxString::Format("0x%x", render.m_surface_offset_z));
|
||||
LIST_SETTINGS_ADD("Viewport", wxString::Format("X:%d, Y:%d, W:%d, H:%d",
|
||||
render.m_viewport_x,
|
||||
render.m_viewport_y,
|
||||
@@ -922,8 +922,8 @@ void RSXDebugger::SetPrograms(wxListEvent& event)
|
||||
wxDEFAULT_DIALOG_STYLE | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxRESIZE_BORDER);
|
||||
|
||||
wxBoxSizer& s_panel = *new wxBoxSizer(wxHORIZONTAL);
|
||||
wxStaticBoxSizer& s_vp_box = *new wxStaticBoxSizer(wxHORIZONTAL, &d_editor, "Vertex Program");
|
||||
wxStaticBoxSizer& s_fp_box = *new wxStaticBoxSizer(wxHORIZONTAL, &d_editor, "Fragment Program");
|
||||
wxStaticBoxSizer& s_vp_box = *new wxStaticBoxSizer(wxHORIZONTAL, &d_editor, "Vertex program");
|
||||
wxStaticBoxSizer& s_fp_box = *new wxStaticBoxSizer(wxHORIZONTAL, &d_editor, "Fragment program");
|
||||
wxTextCtrl* t_vp_edit = new wxTextCtrl(&d_editor, wxID_ANY, program.vp_shader, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
|
||||
wxTextCtrl* t_fp_edit = new wxTextCtrl(&d_editor, wxID_ANY, program.fp_shader, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
|
||||
t_vp_edit->SetFont(wxFont(8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
|
||||
@@ -967,10 +967,10 @@ const char* RSXDebugger::ParseGCMEnum(u32 value, u32 type)
|
||||
case 0x0200: return "Never";
|
||||
case 0x0201: return "Less";
|
||||
case 0x0202: return "Equal";
|
||||
case 0x0203: return "Less or Equal";
|
||||
case 0x0203: return "Less or equal";
|
||||
case 0x0204: return "Greater";
|
||||
case 0x0205: return "Not Equal";
|
||||
case 0x0206: return "Greater or Equal";
|
||||
case 0x0205: return "Not equal";
|
||||
case 0x0206: return "Greater or equal";
|
||||
case 0x0207: return "Always";
|
||||
|
||||
case 0x0: return "Zero";
|
||||
@@ -993,12 +993,12 @@ const char* RSXDebugger::ParseGCMEnum(u32 value, u32 type)
|
||||
case 0x8007: return "Min";
|
||||
case 0x8008: return "Max";
|
||||
case 0x800A: return "Substract";
|
||||
case 0x800B: return "Reverse Substract";
|
||||
case 0xF005: return "Reverse Substract Signed";
|
||||
case 0xF006: return "Add Signed";
|
||||
case 0xF007: return "Reverse Add Signed";
|
||||
case 0x800B: return "Reverse substract";
|
||||
case 0xF005: return "Reverse substract signed";
|
||||
case 0xF006: return "Add signed";
|
||||
case 0xF007: return "Reverse add signed";
|
||||
|
||||
default: return "Wrong Value!";
|
||||
default: return "Wrong value!";
|
||||
}
|
||||
}
|
||||
case CELL_GCM_PRIMITIVE_ENUM:
|
||||
@@ -1016,7 +1016,7 @@ const char* RSXDebugger::ParseGCMEnum(u32 value, u32 type)
|
||||
case 9: return "QUAD_STRIP";
|
||||
case 10: return "POLYGON";
|
||||
|
||||
default: return "Wrong Value!";
|
||||
default: return "Wrong value!";
|
||||
}
|
||||
}
|
||||
default: return "Unknown!";
|
||||
@@ -1078,7 +1078,7 @@ wxString RSXDebugger::DisAsmCommand(u32 cmd, u32 count, u32 currentAddr, u32 ioA
|
||||
break;
|
||||
|
||||
case_16(NV4097_SET_TEXTURE_OFFSET, 0x20):
|
||||
DISASM("Texture Offset[%d]: %08x", index, (u32)args[0]);
|
||||
DISASM("Texture offset[%d]: %08x", index, (u32)args[0]);
|
||||
switch ((args[1] & 0x3) - 1)
|
||||
{
|
||||
case CELL_GCM_LOCATION_LOCAL: DISASM("(Local memory);"); break;
|
||||
|
||||
@@ -134,24 +134,24 @@ SettingsDialog::SettingsDialog(wxWindow *parent, rpcs3::config_t* cfg)
|
||||
wxStaticBoxSizer* s_round_llvm_threshold = new wxStaticBoxSizer(wxHORIZONTAL, p_core, _("Compilation threshold"));
|
||||
|
||||
// Graphics
|
||||
wxStaticBoxSizer* s_round_gs_render = new wxStaticBoxSizer(wxVERTICAL, p_graphics, _("Render"));
|
||||
wxStaticBoxSizer* s_round_gs_d3d_adaptater = new wxStaticBoxSizer(wxVERTICAL, p_graphics, _("D3D Adaptater"));
|
||||
wxStaticBoxSizer* s_round_gs_render = new wxStaticBoxSizer(wxVERTICAL, p_graphics, _("Rendering API"));
|
||||
wxStaticBoxSizer* s_round_gs_d3d_adaptater = new wxStaticBoxSizer(wxVERTICAL, p_graphics, _("D3D Adapter"));
|
||||
wxStaticBoxSizer* s_round_gs_res = new wxStaticBoxSizer(wxVERTICAL, p_graphics, _("Resolution"));
|
||||
wxStaticBoxSizer* s_round_gs_aspect = new wxStaticBoxSizer(wxVERTICAL, p_graphics, _("Aspect ratio"));
|
||||
wxStaticBoxSizer* s_round_gs_frame_limit = new wxStaticBoxSizer(wxVERTICAL, p_graphics, _("Frame limit"));
|
||||
|
||||
// Input / Output
|
||||
wxStaticBoxSizer* s_round_io_pad_handler = new wxStaticBoxSizer(wxVERTICAL, p_io, _("Pad Handler"));
|
||||
wxStaticBoxSizer* s_round_io_keyboard_handler = new wxStaticBoxSizer(wxVERTICAL, p_io, _("Keyboard Handler"));
|
||||
wxStaticBoxSizer* s_round_io_mouse_handler = new wxStaticBoxSizer(wxVERTICAL, p_io, _("Mouse Handler"));
|
||||
wxStaticBoxSizer* s_round_io_pad_handler = new wxStaticBoxSizer(wxVERTICAL, p_io, _("Controller handler"));
|
||||
wxStaticBoxSizer* s_round_io_keyboard_handler = new wxStaticBoxSizer(wxVERTICAL, p_io, _("Keyboard handler"));
|
||||
wxStaticBoxSizer* s_round_io_mouse_handler = new wxStaticBoxSizer(wxVERTICAL, p_io, _("Mouse handler"));
|
||||
wxStaticBoxSizer* s_round_io_camera = new wxStaticBoxSizer(wxVERTICAL, p_io, _("Camera"));
|
||||
wxStaticBoxSizer* s_round_io_camera_type = new wxStaticBoxSizer(wxVERTICAL, p_io, _("Camera type"));
|
||||
|
||||
// Audio
|
||||
wxStaticBoxSizer* s_round_audio_out = new wxStaticBoxSizer(wxVERTICAL, p_audio, _("Audio Out"));
|
||||
wxStaticBoxSizer* s_round_audio_out = new wxStaticBoxSizer(wxVERTICAL, p_audio, _("Audio out"));
|
||||
|
||||
// Miscellaneous
|
||||
wxStaticBoxSizer* s_round_hle_log_lvl = new wxStaticBoxSizer(wxVERTICAL, p_misc, _("Log Level"));
|
||||
wxStaticBoxSizer* s_round_hle_log_lvl = new wxStaticBoxSizer(wxVERTICAL, p_misc, _("Log level"));
|
||||
|
||||
// Networking
|
||||
wxStaticBoxSizer* s_round_net_status = new wxStaticBoxSizer(wxVERTICAL, p_networking, _("Connection status"));
|
||||
@@ -183,17 +183,17 @@ SettingsDialog::SettingsDialog(wxWindow *parent, rpcs3::config_t* cfg)
|
||||
wxCheckBox* chbox_core_hook_stfunc = new wxCheckBox(p_core, wxID_ANY, "Hook static functions");
|
||||
wxCheckBox* chbox_core_load_liblv2 = new wxCheckBox(p_core, wxID_ANY, "Load liblv2.sprx");
|
||||
wxCheckBox* chbox_gs_log_prog = new wxCheckBox(p_graphics, wxID_ANY, "Log shader programs");
|
||||
wxCheckBox* chbox_gs_dump_depth = new wxCheckBox(p_graphics, wxID_ANY, "Write Depth Buffer");
|
||||
wxCheckBox* chbox_gs_dump_color = new wxCheckBox(p_graphics, wxID_ANY, "Write Color Buffers");
|
||||
wxCheckBox* chbox_gs_read_color = new wxCheckBox(p_graphics, wxID_ANY, "Read Color Buffers");
|
||||
wxCheckBox* chbox_gs_read_depth = new wxCheckBox(p_graphics, wxID_ANY, "Read Depth Buffer");
|
||||
wxCheckBox* chbox_gs_dump_depth = new wxCheckBox(p_graphics, wxID_ANY, "Write depth buffer");
|
||||
wxCheckBox* chbox_gs_dump_color = new wxCheckBox(p_graphics, wxID_ANY, "Write color buffers");
|
||||
wxCheckBox* chbox_gs_read_color = new wxCheckBox(p_graphics, wxID_ANY, "Read color buffers");
|
||||
wxCheckBox* chbox_gs_read_depth = new wxCheckBox(p_graphics, wxID_ANY, "Read depth buffer");
|
||||
wxCheckBox* chbox_gs_vsync = new wxCheckBox(p_graphics, wxID_ANY, "VSync");
|
||||
wxCheckBox* chbox_gs_debug_output = new wxCheckBox(p_graphics, wxID_ANY, "Debug Output");
|
||||
wxCheckBox* chbox_gs_3dmonitor = new wxCheckBox(p_graphics, wxID_ANY, "3D Monitor");
|
||||
wxCheckBox* chbox_gs_debug_output = new wxCheckBox(p_graphics, wxID_ANY, "Debug output");
|
||||
wxCheckBox* chbox_gs_3dmonitor = new wxCheckBox(p_graphics, wxID_ANY, "3D monitor");
|
||||
wxCheckBox* chbox_gs_overlay = new wxCheckBox(p_graphics, wxID_ANY, "Debug overlay");
|
||||
wxCheckBox* chbox_audio_dump = new wxCheckBox(p_audio, wxID_ANY, "Dump to file");
|
||||
wxCheckBox* chbox_audio_conv = new wxCheckBox(p_audio, wxID_ANY, "Convert to 16 bit");
|
||||
wxCheckBox* chbox_rsx_logging = new wxCheckBox(p_misc, wxID_ANY, "RSX Logging");
|
||||
wxCheckBox* chbox_audio_conv = new wxCheckBox(p_audio, wxID_ANY, "Convert to 16-bit");
|
||||
wxCheckBox* chbox_rsx_logging = new wxCheckBox(p_misc, wxID_ANY, "RSX logging");
|
||||
wxCheckBox* chbox_hle_exitonstop = new wxCheckBox(p_misc, wxID_ANY, "Exit RPCS3 when process finishes");
|
||||
wxCheckBox* chbox_hle_always_start = new wxCheckBox(p_misc, wxID_ANY, "Always start after boot");
|
||||
wxCheckBox* chbox_hle_use_default_ini = new wxCheckBox(p_misc, wxID_ANY, "Use default configuration");
|
||||
@@ -203,8 +203,8 @@ SettingsDialog::SettingsDialog(wxWindow *parent, rpcs3::config_t* cfg)
|
||||
wxTextCtrl* txt_llvm_threshold = new wxTextCtrl(p_core, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(55, 20));
|
||||
|
||||
//Auto Pause
|
||||
wxCheckBox* chbox_dbg_ap_systemcall = new wxCheckBox(p_misc, wxID_ANY, "Auto Pause at System Call");
|
||||
wxCheckBox* chbox_dbg_ap_functioncall = new wxCheckBox(p_misc, wxID_ANY, "Auto Pause at Function Call");
|
||||
wxCheckBox* chbox_dbg_ap_systemcall = new wxCheckBox(p_misc, wxID_ANY, "Automatically pause at system call");
|
||||
wxCheckBox* chbox_dbg_ap_functioncall = new wxCheckBox(p_misc, wxID_ANY, "Automatically pause at function call");
|
||||
|
||||
//Custom EmulationDir
|
||||
wxCheckBox* chbox_emulationdir_enable = new wxCheckBox(p_system, wxID_ANY, "Use path below as EmulationDir. (Restart required)");
|
||||
@@ -215,7 +215,7 @@ SettingsDialog::SettingsDialog(wxWindow *parent, rpcs3::config_t* cfg)
|
||||
ppu_decoder_modes.Add("Interpreter");
|
||||
ppu_decoder_modes.Add("Interpreter 2");
|
||||
ppu_decoder_modes.Add("Recompiler (LLVM)");
|
||||
rbox_ppu_decoder = new wxRadioBox(p_core, wxID_ANY, "PPU Decoder", wxDefaultPosition, wxSize(215, -1), ppu_decoder_modes, 1);
|
||||
rbox_ppu_decoder = new wxRadioBox(p_core, wxID_ANY, "PPU decoder", wxDefaultPosition, wxSize(215, -1), ppu_decoder_modes, 1);
|
||||
|
||||
#if !defined(LLVM_AVAILABLE)
|
||||
rbox_ppu_decoder->Enable(2, false);
|
||||
@@ -225,7 +225,7 @@ SettingsDialog::SettingsDialog(wxWindow *parent, rpcs3::config_t* cfg)
|
||||
spu_decoder_modes.Add("Interpreter (precise)");
|
||||
spu_decoder_modes.Add("Interpreter (fast)");
|
||||
spu_decoder_modes.Add("Recompiler (ASMJIT)");
|
||||
rbox_spu_decoder = new wxRadioBox(p_core, wxID_ANY, "SPU Decoder", wxDefaultPosition, wxSize(215, -1), spu_decoder_modes, 1);
|
||||
rbox_spu_decoder = new wxRadioBox(p_core, wxID_ANY, "SPU decoder", wxDefaultPosition, wxSize(215, -1), spu_decoder_modes, 1);
|
||||
|
||||
cbox_gs_render->Append("Null");
|
||||
cbox_gs_render->Append("OpenGL");
|
||||
@@ -260,7 +260,7 @@ SettingsDialog::SettingsDialog(wxWindow *parent, rpcs3::config_t* cfg)
|
||||
cbox_gs_aspect->Append("4:3");
|
||||
cbox_gs_aspect->Append("16:9");
|
||||
|
||||
for (auto item : { "Off", "50", "59.94", "30", "60", "Auto" })
|
||||
for (auto item : { "Off", "30", "50", "59.94", "60", "Auto" })
|
||||
cbox_gs_frame_limit->Append(item);
|
||||
|
||||
cbox_pad_handler->Append("Null");
|
||||
|
||||
@@ -116,7 +116,7 @@ enum
|
||||
};
|
||||
|
||||
VFSManagerDialog::VFSManagerDialog(wxWindow* parent)
|
||||
: wxDialog(parent, wxID_ANY, "Virtual File System Manager")
|
||||
: wxDialog(parent, wxID_ANY, "Virtual file system manager")
|
||||
{
|
||||
m_list = new wxListView(this);
|
||||
|
||||
@@ -134,7 +134,7 @@ VFSManagerDialog::VFSManagerDialog(wxWindow* parent)
|
||||
|
||||
m_list->InsertColumn(0, "Path");
|
||||
m_list->InsertColumn(1, "Device path");
|
||||
m_list->InsertColumn(2, "Path to Device");
|
||||
m_list->InsertColumn(2, "Path to device");
|
||||
m_list->InsertColumn(3, "Device");
|
||||
|
||||
m_list->Bind(wxEVT_LIST_ITEM_ACTIVATED, &VFSManagerDialog::OnEntryConfig, this);
|
||||
|
||||
@@ -50,7 +50,7 @@ enum
|
||||
id_add_hdd
|
||||
};
|
||||
|
||||
VHDDExplorer::VHDDExplorer(wxWindow* parent, const std::string& hdd_path) : wxDialog(parent, wxID_ANY, "Virtual HDD Explorer", wxDefaultPosition)
|
||||
VHDDExplorer::VHDDExplorer(wxWindow* parent, const std::string& hdd_path) : wxDialog(parent, wxID_ANY, "Virtual hard drive explorer", wxDefaultPosition)
|
||||
{
|
||||
m_list = new wxListView(this);
|
||||
m_drop_target = new VHDDListDropTarget(m_list);
|
||||
@@ -249,18 +249,18 @@ void VHDDExplorer::OnRemove(wxCommandEvent& event)
|
||||
void VHDDExplorer::OnCreateDir(wxCommandEvent& event)
|
||||
{
|
||||
int i = 1;
|
||||
while(m_hdd->HasEntry(fmt::format("New Dir (%d)", i))) i++;
|
||||
while(m_hdd->HasEntry(fmt::format("New dir (%d)", i))) i++;
|
||||
|
||||
m_hdd->Create(vfsHDD_Entry_Dir, fmt::format("New Dir (%d)", i));
|
||||
m_hdd->Create(vfsHDD_Entry_Dir, fmt::format("New dir (%d)", i));
|
||||
UpdateList();
|
||||
}
|
||||
|
||||
void VHDDExplorer::OnCreateFile(wxCommandEvent& event)
|
||||
{
|
||||
int i = 1;
|
||||
while (m_hdd->HasEntry(fmt::format("New File (%d)", i))) i++;
|
||||
while (m_hdd->HasEntry(fmt::format("New file (%d)", i))) i++;
|
||||
|
||||
m_hdd->Create(vfsHDD_Entry_File, fmt::format("New File (%d)", i));
|
||||
m_hdd->Create(vfsHDD_Entry_File, fmt::format("New file (%d)", i));
|
||||
UpdateList();
|
||||
}
|
||||
|
||||
@@ -376,7 +376,7 @@ void VHDDSetInfoDialog::GetResult(u64& size, u64& block_size)
|
||||
}
|
||||
|
||||
VHDDManagerDialog::VHDDManagerDialog(wxWindow* parent)
|
||||
: wxDialog(parent, wxID_ANY, "Virtual HDD Manager")
|
||||
: wxDialog(parent, wxID_ANY, "Virtual hard drive Manager")
|
||||
{
|
||||
m_list = new wxListView(this);
|
||||
|
||||
@@ -438,7 +438,7 @@ void VHDDManagerDialog::DClick(wxListEvent& event)
|
||||
|
||||
void VHDDManagerDialog::AddHDD(wxCommandEvent& event)
|
||||
{
|
||||
wxFileDialog ctrl(this, "Select HDDs", wxEmptyString, wxEmptyString, "Virtual HDD (*.hdd) | *.hdd",
|
||||
wxFileDialog ctrl(this, "Select hard drives", wxEmptyString, wxEmptyString, "Virtual hard drive (*.hdd) | *.hdd",
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE);
|
||||
|
||||
if(ctrl.ShowModal() == wxID_CANCEL)
|
||||
@@ -498,7 +498,7 @@ void VHDDManagerDialog::OnRemove(wxCommandEvent& event)
|
||||
|
||||
void VHDDManagerDialog::OnCreateHDD(wxCommandEvent& event)
|
||||
{
|
||||
wxFileDialog ctrl(this, "Select HDD path", wxEmptyString, "new_hdd.hdd", "Virtual HDD (*.hdd) | *.hdd",
|
||||
wxFileDialog ctrl(this, "Select hard drive path", wxEmptyString, "new_hdd.hdd", "Virtual hard drive (*.hdd) | *.hdd",
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
|
||||
|
||||
if(ctrl.ShowModal() == wxID_CANCEL)
|
||||
|
||||
+34
-34
@@ -62,9 +62,9 @@ enum class rsx_aspect_ratio
|
||||
enum class rsx_frame_limit
|
||||
{
|
||||
Off,
|
||||
_30,
|
||||
_50,
|
||||
_59_94,
|
||||
_30,
|
||||
_60,
|
||||
Auto
|
||||
};
|
||||
@@ -155,9 +155,9 @@ namespace convert
|
||||
switch (value)
|
||||
{
|
||||
case rsx_frame_limit::Off: return "Off";
|
||||
case rsx_frame_limit::_30: return "30";
|
||||
case rsx_frame_limit::_50: return "50";
|
||||
case rsx_frame_limit::_59_94: return "59.94";
|
||||
case rsx_frame_limit::_30: return "30";
|
||||
case rsx_frame_limit::_60: return "60";
|
||||
case rsx_frame_limit::Auto: return "Auto";
|
||||
}
|
||||
@@ -174,15 +174,15 @@ namespace convert
|
||||
if (value == "Off")
|
||||
return rsx_frame_limit::Off;
|
||||
|
||||
if (value == "30")
|
||||
return rsx_frame_limit::_30;
|
||||
|
||||
if (value == "50")
|
||||
return rsx_frame_limit::_50;
|
||||
|
||||
if (value == "59.94")
|
||||
return rsx_frame_limit::_59_94;
|
||||
|
||||
if (value == "30")
|
||||
return rsx_frame_limit::_30;
|
||||
|
||||
if (value == "60")
|
||||
return rsx_frame_limit::_60;
|
||||
|
||||
@@ -836,8 +836,8 @@ namespace rpcs3
|
||||
|
||||
} llvm{ this };
|
||||
|
||||
entry<ppu_decoder_type> ppu_decoder { this, "PPU Decoder", ppu_decoder_type::interpreter };
|
||||
entry<spu_decoder_type> spu_decoder { this, "SPU Decoder", spu_decoder_type::interpreter_precise };
|
||||
entry<ppu_decoder_type> ppu_decoder { this, "PPU decoder", ppu_decoder_type::interpreter };
|
||||
entry<spu_decoder_type> spu_decoder { this, "SPU decoder", spu_decoder_type::interpreter_precise };
|
||||
entry<bool> hook_st_func { this, "Hook static functions", false };
|
||||
entry<bool> load_liblv2 { this, "Load liblv2.sprx", false };
|
||||
|
||||
@@ -849,30 +849,30 @@ namespace rpcs3
|
||||
{
|
||||
opengl_group(group *grp) : group{ grp, "opengl" } {}
|
||||
|
||||
entry<bool> write_color_buffers { this, "Write Color Buffers", true };
|
||||
entry<bool> write_depth_buffer { this, "Write Depth Buffer", true };
|
||||
entry<bool> read_color_buffers { this, "Read Color Buffers", true };
|
||||
entry<bool> read_depth_buffer { this, "Read Depth Buffer", true };
|
||||
entry<bool> write_color_buffers { this, "Write color buffers", true };
|
||||
entry<bool> write_depth_buffer { this, "Write depth buffer", true };
|
||||
entry<bool> read_color_buffers { this, "Read color buffers", true };
|
||||
entry<bool> read_depth_buffer { this, "Read depth buffer", true };
|
||||
} opengl{ this };
|
||||
|
||||
struct d3d12_group : protected group
|
||||
{
|
||||
d3d12_group(group *grp) : group{ grp, "d3d12" } {}
|
||||
|
||||
entry<u32> adaptater { this, "D3D Adaptater", 1 };
|
||||
entry<bool> debug_output { this, "Debug Output", false };
|
||||
entry<u32> adaptater { this, "D3D adapter", 0 };
|
||||
entry<bool> debug_output { this, "Debug output", false };
|
||||
entry<bool> overlay { this, "Debug overlay", false };
|
||||
} d3d12{ this };
|
||||
|
||||
rsx_group(config_context_t *cfg) : group{ cfg, "rsx" } {}
|
||||
|
||||
entry<rsx_renderer_type> renderer { this, "Renderer", rsx_renderer_type::OpenGL };
|
||||
entry<rsx_renderer_type> renderer { this, "Rendering API", rsx_renderer_type::OpenGL };
|
||||
entry<rsx_resolution> resolution { this, "Resolution", rsx_resolution::_720x480 };
|
||||
entry<rsx_aspect_ratio> aspect_ratio{ this, "Aspect ratio", rsx_aspect_ratio::_16x9 };
|
||||
entry<rsx_frame_limit> frame_limit { this, "Frame limit", rsx_frame_limit::Off };
|
||||
entry<bool> log_programs { this, "Log shader programs", false };
|
||||
entry<bool> vsync { this, "VSync", false };
|
||||
entry<bool> _3dtv { this, "3D Monitor", false };
|
||||
entry<bool> _3dtv { this, "3D monitor", false };
|
||||
|
||||
} rsx{ this };
|
||||
|
||||
@@ -880,33 +880,33 @@ namespace rpcs3
|
||||
{
|
||||
audio_group(config_context_t *cfg) : group{ cfg, "audio" } {}
|
||||
|
||||
entry<audio_output_type> out{ this, "Audio Out", audio_output_type::OpenAL };
|
||||
entry<audio_output_type> out{ this, "Audio out", audio_output_type::OpenAL };
|
||||
entry<bool> dump_to_file { this, "Dump to file", false };
|
||||
entry<bool> convert_to_u16 { this, "Convert to 16 bit", false };
|
||||
entry<bool> convert_to_u16 { this, "Convert to 16-bit", false };
|
||||
} audio{ this };
|
||||
|
||||
struct io_group : protected group
|
||||
{
|
||||
io_group(config_context_t *cfg) : group{ cfg, "io" } {}
|
||||
|
||||
entry<io_camera_state> camera { this, "Camera", io_camera_state::connected };
|
||||
entry<io_camera_type> camera_type { this, "Camera type", io_camera_type::play_station_eye };
|
||||
entry<io_handler_mode> pad_handler_mode { this, "Pad Handler", io_handler_mode::windows };
|
||||
entry<io_handler_mode> keyboard_handler_mode{ this, "Keyboard Handler", io_handler_mode::null };
|
||||
entry<io_handler_mode> mouse_handler_mode { this, "Mouse Handler", io_handler_mode::null };
|
||||
entry<io_camera_state> camera { this, "Camera", io_camera_state::connected };
|
||||
entry<io_camera_type> camera_type { this, "Camera type", io_camera_type::play_station_eye };
|
||||
entry<io_handler_mode> pad_handler_mode { this, "Controller handler", io_handler_mode::windows };
|
||||
entry<io_handler_mode> keyboard_handler_mode{ this, "Keyboard handler", io_handler_mode::null };
|
||||
entry<io_handler_mode> mouse_handler_mode { this, "Mouse handler", io_handler_mode::null };
|
||||
|
||||
struct pad_group : protected group
|
||||
{
|
||||
pad_group(group *grp) : group{ grp, "pad" } {}
|
||||
|
||||
entry<int> left_stick_left { this, "Left Analog Stick Left", 314 };
|
||||
entry<int> left_stick_down { this, "Left Analog Stick Down", 317 };
|
||||
entry<int> left_stick_right { this, "Left Analog Stick Right", 316 };
|
||||
entry<int> left_stick_up { this, "Left Analog Stick Up", 315 };
|
||||
entry<int> right_stick_left { this, "Right Analog Stick Left", 313 };
|
||||
entry<int> right_stick_down { this, "Right Analog Stick Down", 367 };
|
||||
entry<int> right_stick_right{ this, "Right Analog Stick Right", 312 };
|
||||
entry<int> right_stick_up { this, "Right Analog Stick Up", 366 };
|
||||
entry<int> left_stick_left { this, "Left analog stick Left", 314 };
|
||||
entry<int> left_stick_down { this, "Left analog stick Down", 317 };
|
||||
entry<int> left_stick_right { this, "Left analog stick Right", 316 };
|
||||
entry<int> left_stick_up { this, "Left analog stick Up", 315 };
|
||||
entry<int> right_stick_left { this, "Right analog stick Left", 313 };
|
||||
entry<int> right_stick_down { this, "Right analog stick Down", 367 };
|
||||
entry<int> right_stick_right{ this, "Right analog stick Right", 312 };
|
||||
entry<int> right_stick_up { this, "Right analog stick Up", 366 };
|
||||
entry<int> start { this, "Start", 13 };
|
||||
entry<int> select { this, "Select", 32 };
|
||||
entry<int> square { this, "Square", static_cast<int>('J') };
|
||||
@@ -935,8 +935,8 @@ namespace rpcs3
|
||||
{
|
||||
log_group(group *grp) : group{ grp, "log" } {}
|
||||
|
||||
entry<_log::level> level { this, "Log Level", _log::level::success };
|
||||
entry<bool> rsx_logging { this, "RSX Logging", false };
|
||||
entry<_log::level> level { this, "Log level", _log::level::success };
|
||||
entry<bool> rsx_logging { this, "RSX logging", false };
|
||||
} log{ this };
|
||||
|
||||
struct net_group : protected group
|
||||
@@ -951,8 +951,8 @@ namespace rpcs3
|
||||
{
|
||||
debug_group(group *grp) : group{ grp, "debug" } {}
|
||||
|
||||
entry<bool> auto_pause_syscall { this, "Auto Pause at System Call", false };
|
||||
entry<bool> auto_pause_func_call { this, "Auto Pause at Function Call", false };
|
||||
entry<bool> auto_pause_syscall { this, "Automatically pause at system call", false };
|
||||
entry<bool> auto_pause_func_call { this, "Automatically pause at function call", false };
|
||||
} debug{ this };
|
||||
|
||||
entry<bool> exit_on_stop { this, "Exit RPCS3 when process finishes", false };
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
<Lib>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)'=='Debug - LLVM'">..\llvm_build\Debug\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)'=='Release - LLVM'">..\llvm_build\Release\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>LLVMMCJIT.lib;LLVMRuntimeDyld.lib;LLVMVectorize.lib;LLVMX86CodeGen.lib;LLVMX86Disassembler.lib;LLVMExecutionEngine.lib;LLVMAsmPrinter.lib;LLVMSelectionDAG.lib;LLVMCodeGen.lib;LLVMScalarOpts.lib;LLVMInstCombine.lib;LLVMTransformUtils.lib;LLVMipa.lib;LLVMAnalysis.lib;LLVMTarget.lib;LLVMX86Desc.lib;LLVMX86AsmPrinter.lib;LLVMObject.lib;LLVMMCParser.lib;LLVMBitReader.lib;LLVMCore.lib;LLVMX86Utils.lib;LLVMMC.lib;LLVMX86Info.lib;LLVMSupport.lib;LLVMMCDisassembler.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>LLVMMCJIT.lib;LLVMRuntimeDyld.lib;LLVMVectorize.lib;LLVMX86CodeGen.lib;LLVMX86Disassembler.lib;LLVMExecutionEngine.lib;LLVMAsmPrinter.lib;LLVMSelectionDAG.lib;LLVMCodeGen.lib;LLVMScalarOpts.lib;LLVMInstCombine.lib;LLVMTransformUtils.lib;LLVMipa.lib;LLVMAnalysis.lib;LLVMTarget.lib;LLVMX86Desc.lib;LLVMX86AsmPrinter.lib;LLVMObject.lib;LLVMMCParser.lib;LLVMBitReader.lib;LLVMCore.lib;LLVMX86Utils.lib;LLVMMC.lib;LLVMX86Info.lib;LLVMSupport.lib;LLVMMCDisassembler.lib;LLVMInstrumentation.lib</AdditionalDependencies>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup />
|
||||
|
||||
Reference in New Issue
Block a user