mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-25 22:05:41 +01:00
Merge pull request #13075 from liamwhite/mali-having-a-bad-time
shader_recompiler: throw on missing geometry streams in geometry shaders
This commit is contained in:
commit
4f95ee5209
@ -261,7 +261,9 @@ void DefineEntryPoint(const IR::Program& program, EmitContext& ctx, Id main) {
|
|||||||
case Stage::Geometry:
|
case Stage::Geometry:
|
||||||
execution_model = spv::ExecutionModel::Geometry;
|
execution_model = spv::ExecutionModel::Geometry;
|
||||||
ctx.AddCapability(spv::Capability::Geometry);
|
ctx.AddCapability(spv::Capability::Geometry);
|
||||||
|
if (ctx.profile.support_geometry_streams) {
|
||||||
ctx.AddCapability(spv::Capability::GeometryStreams);
|
ctx.AddCapability(spv::Capability::GeometryStreams);
|
||||||
|
}
|
||||||
switch (ctx.runtime_info.input_topology) {
|
switch (ctx.runtime_info.input_topology) {
|
||||||
case InputTopology::Points:
|
case InputTopology::Points:
|
||||||
ctx.AddExecutionMode(main, spv::ExecutionMode::InputPoints);
|
ctx.AddExecutionMode(main, spv::ExecutionMode::InputPoints);
|
||||||
|
@ -129,7 +129,9 @@ void EmitEmitVertex(EmitContext& ctx, const IR::Value& stream) {
|
|||||||
if (ctx.runtime_info.convert_depth_mode && !ctx.profile.support_native_ndc) {
|
if (ctx.runtime_info.convert_depth_mode && !ctx.profile.support_native_ndc) {
|
||||||
ConvertDepthMode(ctx);
|
ConvertDepthMode(ctx);
|
||||||
}
|
}
|
||||||
if (stream.IsImmediate()) {
|
if (!ctx.profile.support_geometry_streams) {
|
||||||
|
throw NotImplementedException("Geometry streams");
|
||||||
|
} else if (stream.IsImmediate()) {
|
||||||
ctx.OpEmitStreamVertex(ctx.Def(stream));
|
ctx.OpEmitStreamVertex(ctx.Def(stream));
|
||||||
} else {
|
} else {
|
||||||
LOG_WARNING(Shader_SPIRV, "Stream is not immediate");
|
LOG_WARNING(Shader_SPIRV, "Stream is not immediate");
|
||||||
@ -140,7 +142,9 @@ void EmitEmitVertex(EmitContext& ctx, const IR::Value& stream) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EmitEndPrimitive(EmitContext& ctx, const IR::Value& stream) {
|
void EmitEndPrimitive(EmitContext& ctx, const IR::Value& stream) {
|
||||||
if (stream.IsImmediate()) {
|
if (!ctx.profile.support_geometry_streams) {
|
||||||
|
throw NotImplementedException("Geometry streams");
|
||||||
|
} else if (stream.IsImmediate()) {
|
||||||
ctx.OpEndStreamPrimitive(ctx.Def(stream));
|
ctx.OpEndStreamPrimitive(ctx.Def(stream));
|
||||||
} else {
|
} else {
|
||||||
LOG_WARNING(Shader_SPIRV, "Stream is not immediate");
|
LOG_WARNING(Shader_SPIRV, "Stream is not immediate");
|
||||||
|
@ -44,6 +44,7 @@ struct Profile {
|
|||||||
bool support_gl_derivative_control{};
|
bool support_gl_derivative_control{};
|
||||||
bool support_scaled_attributes{};
|
bool support_scaled_attributes{};
|
||||||
bool support_multi_viewport{};
|
bool support_multi_viewport{};
|
||||||
|
bool support_geometry_streams{};
|
||||||
|
|
||||||
bool warp_size_potentially_larger_than_guest{};
|
bool warp_size_potentially_larger_than_guest{};
|
||||||
|
|
||||||
|
@ -352,6 +352,7 @@ PipelineCache::PipelineCache(Tegra::MaxwellDeviceMemoryManager& device_memory_,
|
|||||||
.support_native_ndc = device.IsExtDepthClipControlSupported(),
|
.support_native_ndc = device.IsExtDepthClipControlSupported(),
|
||||||
.support_scaled_attributes = !device.MustEmulateScaledFormats(),
|
.support_scaled_attributes = !device.MustEmulateScaledFormats(),
|
||||||
.support_multi_viewport = device.SupportsMultiViewport(),
|
.support_multi_viewport = device.SupportsMultiViewport(),
|
||||||
|
.support_geometry_streams = device.AreTransformFeedbackGeometryStreamsSupported(),
|
||||||
|
|
||||||
.warp_size_potentially_larger_than_guest = device.IsWarpSizePotentiallyBiggerThanGuest(),
|
.warp_size_potentially_larger_than_guest = device.IsWarpSizePotentiallyBiggerThanGuest(),
|
||||||
|
|
||||||
|
@ -499,6 +499,11 @@ public:
|
|||||||
return extensions.transform_feedback;
|
return extensions.transform_feedback;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns true if the device supports VK_EXT_transform_feedback properly.
|
||||||
|
bool AreTransformFeedbackGeometryStreamsSupported() const {
|
||||||
|
return features.transform_feedback.geometryStreams;
|
||||||
|
}
|
||||||
|
|
||||||
/// Returns true if the device supports VK_EXT_custom_border_color.
|
/// Returns true if the device supports VK_EXT_custom_border_color.
|
||||||
bool IsExtCustomBorderColorSupported() const {
|
bool IsExtCustomBorderColorSupported() const {
|
||||||
return extensions.custom_border_color;
|
return extensions.custom_border_color;
|
||||||
|
Loading…
Reference in New Issue
Block a user