mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 05:38:49 +00:00
Implement MUBUF instructions for shorts/bytes (#2856)
* implement loads/store instructions for types smaller than dwords * initialize s16/s8 types * set profile for int8/16/64 * also need to zero extend u8/u16 to u32 result * document unrelated bugs with atomic fmin/max * remove profile checks and simple emit for added opcodes --------- Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
This commit is contained in:
@@ -94,6 +94,21 @@ public:
|
||||
return features.shaderFloat64;
|
||||
}
|
||||
|
||||
/// Returns true if 64-bit ints are supported in shaders
|
||||
bool IsShaderInt64Supported() const {
|
||||
return features.shaderInt64;
|
||||
}
|
||||
|
||||
/// Returns true if 16-bit ints are supported in shaders
|
||||
bool IsShaderInt16Supported() const {
|
||||
return features.shaderInt16;
|
||||
}
|
||||
|
||||
/// Returns true if 8-bit ints are supported in shaders
|
||||
bool IsShaderInt8Supported() const {
|
||||
return vk12_features.shaderInt8;
|
||||
}
|
||||
|
||||
/// Returns true when VK_EXT_custom_border_color is supported
|
||||
bool IsCustomBorderColorSupported() const {
|
||||
return custom_border_color;
|
||||
|
||||
@@ -203,6 +203,9 @@ PipelineCache::PipelineCache(const Instance& instance_, Scheduler& scheduler_,
|
||||
profile = Shader::Profile{
|
||||
.supported_spirv = SpirvVersion1_6,
|
||||
.subgroup_size = instance.SubgroupSize(),
|
||||
.support_int8 = instance.IsShaderInt8Supported(),
|
||||
.support_int16 = instance.IsShaderInt16Supported(),
|
||||
.support_int64 = instance.IsShaderInt64Supported(),
|
||||
.support_float64 = instance.IsShaderFloat64Supported(),
|
||||
.support_fp32_denorm_preserve = bool(vk12_props.shaderDenormPreserveFloat32),
|
||||
.support_fp32_denorm_flush = bool(vk12_props.shaderDenormFlushToZeroFloat32),
|
||||
|
||||
Reference in New Issue
Block a user