Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
93cd327873 | |||
12cbacffca | |||
437c78e198 |
@ -544,7 +544,7 @@
|
||||
"SwkbdMinCharacters": "Must be at least {0} characters long",
|
||||
"SwkbdMinRangeCharacters": "Must be {0}-{1} characters long",
|
||||
"SoftwareKeyboard": "Software Keyboard",
|
||||
"SoftwareKeyboardModeNumbersOnly": "Must be numbers only",
|
||||
"SoftwareKeyboardModeNumeric": "Must be 0-9 or '.' only",
|
||||
"SoftwareKeyboardModeAlphabet": "Must be non CJK-characters only",
|
||||
"SoftwareKeyboardModeASCII": "Must be ASCII text only",
|
||||
"DialogControllerAppletMessagePlayerRange": "Application requests {0} player(s) with:\n\nTYPES: {1}\n\nPLAYERS: {2}\n\n{3}Please open Settings and reconfigure Input now or press Close.",
|
||||
|
@ -136,10 +136,10 @@ namespace Ryujinx.Ava.UI.Controls
|
||||
string localeText;
|
||||
switch (mode)
|
||||
{
|
||||
case KeyboardMode.NumbersOnly:
|
||||
localeText = LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.SoftwareKeyboardModeNumbersOnly);
|
||||
case KeyboardMode.Numeric:
|
||||
localeText = LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.SoftwareKeyboardModeNumeric);
|
||||
validationInfoText = string.IsNullOrEmpty(validationInfoText) ? localeText : string.Join("\n", validationInfoText, localeText);
|
||||
_checkInput = text => text.All(char.IsDigit);
|
||||
_checkInput = text => text.All(NumericCharacterValidation.IsNumeric);
|
||||
break;
|
||||
case KeyboardMode.Alphabet:
|
||||
localeText = LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.SoftwareKeyboardModeAlphabet);
|
||||
|
@ -967,7 +967,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
|
||||
if (!_cachedConvertedBuffers.TryGetValue(offset, size, key, out var holder))
|
||||
{
|
||||
holder = _gd.BufferManager.Create(_gd, (size * 2 + 3) & ~3);
|
||||
holder = _gd.BufferManager.Create(_gd, (size * 2 + 3) & ~3, baseType: BufferAllocationType.DeviceLocal);
|
||||
|
||||
_gd.PipelineInternal.EndRenderPass();
|
||||
_gd.HelperShader.ConvertI8ToI16(_gd, cbs, this, holder, offset, size);
|
||||
@ -993,7 +993,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
{
|
||||
int alignedStride = (stride + (alignment - 1)) & -alignment;
|
||||
|
||||
holder = _gd.BufferManager.Create(_gd, (size / stride) * alignedStride);
|
||||
holder = _gd.BufferManager.Create(_gd, (size / stride) * alignedStride, baseType: BufferAllocationType.DeviceLocal);
|
||||
|
||||
_gd.PipelineInternal.EndRenderPass();
|
||||
_gd.HelperShader.ChangeStride(_gd, cbs, this, holder, offset, size, stride, alignedStride);
|
||||
@ -1023,7 +1023,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
|
||||
int convertedCount = pattern.GetConvertedCount(indexCount);
|
||||
|
||||
holder = _gd.BufferManager.Create(_gd, convertedCount * 4);
|
||||
holder = _gd.BufferManager.Create(_gd, convertedCount * 4, baseType: BufferAllocationType.DeviceLocal);
|
||||
|
||||
_gd.PipelineInternal.EndRenderPass();
|
||||
_gd.HelperShader.ConvertIndexBuffer(_gd, cbs, this, holder, pattern, indexSize, offset, indexCount);
|
||||
|
@ -5,7 +5,6 @@ using Ryujinx.Graphics.Shader.Translation;
|
||||
using Silk.NET.Vulkan;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Numerics;
|
||||
using CompareOp = Ryujinx.Graphics.GAL.CompareOp;
|
||||
using Format = Ryujinx.Graphics.GAL.Format;
|
||||
@ -27,6 +26,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
class HelperShader : IDisposable
|
||||
{
|
||||
private const int UniformBufferAlignment = 256;
|
||||
private const int ConvertElementsPerWorkgroup = 32 * 100; // Work group size of 32 times 100 elements.
|
||||
private const string ShaderBinariesPath = "Ryujinx.Graphics.Vulkan/Shaders/SpirvBinaries";
|
||||
|
||||
private readonly PipelineHelperShader _pipeline;
|
||||
@ -894,7 +894,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
_pipeline.SetStorageBuffers(1, sbRanges);
|
||||
|
||||
_pipeline.SetProgram(_programStrideChange);
|
||||
_pipeline.DispatchCompute(1, 1, 1);
|
||||
_pipeline.DispatchCompute(1 + elems / ConvertElementsPerWorkgroup, 1, 1);
|
||||
|
||||
gd.BufferManager.Delete(bufferHandle);
|
||||
|
||||
@ -1742,7 +1742,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
_pipeline.SetStorageBuffers(1, sbRanges);
|
||||
|
||||
_pipeline.SetProgram(_programConvertD32S8ToD24S8);
|
||||
_pipeline.DispatchCompute(1, 1, 1);
|
||||
_pipeline.DispatchCompute(1 + inSize / ConvertElementsPerWorkgroup, 1, 1);
|
||||
|
||||
gd.BufferManager.Delete(bufferHandle);
|
||||
|
||||
|
@ -29,7 +29,7 @@ void main()
|
||||
int sourceOffset = stride_arguments_data.w;
|
||||
|
||||
int strideRemainder = targetStride - sourceStride;
|
||||
int invocations = int(gl_WorkGroupSize.x);
|
||||
int invocations = int(gl_WorkGroupSize.x * gl_NumWorkGroups.x);
|
||||
|
||||
int copiesRequired = bufferSize / sourceStride;
|
||||
|
||||
@ -39,7 +39,7 @@ void main()
|
||||
int allInvocationCopies = copiesRequired / invocations;
|
||||
|
||||
// - Extra remainder copy that this invocation performs.
|
||||
int index = int(gl_LocalInvocationID.x);
|
||||
int index = int(gl_GlobalInvocationID.x);
|
||||
int extra = (index < (copiesRequired % invocations)) ? 1 : 0;
|
||||
|
||||
int copyCount = allInvocationCopies + extra;
|
||||
|
@ -23,7 +23,7 @@ layout (std430, set = 1, binding = 2) buffer out_s
|
||||
void main()
|
||||
{
|
||||
// Determine what slice of the stride copies this invocation will perform.
|
||||
int invocations = int(gl_WorkGroupSize.x);
|
||||
int invocations = int(gl_WorkGroupSize.x * gl_NumWorkGroups.x);
|
||||
|
||||
int copiesRequired = pixelCount;
|
||||
|
||||
@ -33,7 +33,7 @@ void main()
|
||||
int allInvocationCopies = copiesRequired / invocations;
|
||||
|
||||
// - Extra remainder copy that this invocation performs.
|
||||
int index = int(gl_LocalInvocationID.x);
|
||||
int index = int(gl_GlobalInvocationID.x);
|
||||
int extra = (index < (copiesRequired % invocations)) ? 1 : 0;
|
||||
|
||||
int copyCount = allInvocationCopies + extra;
|
||||
|
Binary file not shown.
Binary file not shown.
@ -11,9 +11,9 @@
|
||||
Default = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Only numbers allowed.
|
||||
/// Only 0-9 or '.' allowed.
|
||||
/// </summary>
|
||||
NumbersOnly = 1,
|
||||
Numeric = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Only ASCII characters allowed.
|
||||
|
@ -0,0 +1,17 @@
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
|
||||
{
|
||||
public static partial class NumericCharacterValidation
|
||||
{
|
||||
public static bool IsNumeric(char value)
|
||||
{
|
||||
Regex regex = NumericRegex();
|
||||
|
||||
return regex.IsMatch(value.ToString());
|
||||
}
|
||||
|
||||
[GeneratedRegex("[0-9]|.")]
|
||||
private static partial Regex NumericRegex();
|
||||
}
|
||||
}
|
@ -154,6 +154,28 @@ namespace Ryujinx.HLE.HOS.Services.Audio
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[CommandCmif(8)] // 16.0.0+
|
||||
// GetWorkBufferSizeExEx(OpusParametersEx) -> u32
|
||||
public ResultCode GetWorkBufferSizeExEx(ServiceCtx context)
|
||||
{
|
||||
// NOTE: GetWorkBufferSizeEx use hardcoded values to compute the returned size.
|
||||
// GetWorkBufferSizeExEx fixes that by using dynamic values.
|
||||
// Since we're already doing that, it's fine to call it directly.
|
||||
|
||||
return GetWorkBufferSizeEx(context);
|
||||
}
|
||||
|
||||
[CommandCmif(9)] // 16.0.0+
|
||||
// GetWorkBufferSizeForMultiStreamExEx(buffer<unknown<0x118>, 0x19>) -> u32
|
||||
public ResultCode GetWorkBufferSizeForMultiStreamExEx(ServiceCtx context)
|
||||
{
|
||||
// NOTE: GetWorkBufferSizeForMultiStreamEx use hardcoded values to compute the returned size.
|
||||
// GetWorkBufferSizeForMultiStreamExEx fixes that by using dynamic values.
|
||||
// Since we're already doing that, it's fine to call it directly.
|
||||
|
||||
return GetWorkBufferSizeForMultiStreamEx(context);
|
||||
}
|
||||
|
||||
private static int GetOpusMultistreamDecoderSize(int streams, int coupledStreams)
|
||||
{
|
||||
if (streams < 1 || coupledStreams > streams || coupledStreams < 0)
|
||||
|
@ -90,9 +90,9 @@ namespace Ryujinx.Ui.Applet
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case KeyboardMode.NumbersOnly:
|
||||
_validationInfoText += "<i>Must be numbers only.</i>";
|
||||
_checkInput = text => text.All(char.IsDigit);
|
||||
case KeyboardMode.Numeric:
|
||||
_validationInfoText += "<i>Must be 0-9 or '.' only.</i>";
|
||||
_checkInput = text => text.All(NumericCharacterValidation.IsNumeric);
|
||||
break;
|
||||
case KeyboardMode.Alphabet:
|
||||
_validationInfoText += "<i>Must be non CJK-characters only.</i>";
|
||||
|
Reference in New Issue
Block a user