Open mjcarroll opened 2 years ago
CC: @darksylinc
Metal SL Compiler Error in _gz_simple_color_330_vs.glsl:
I got confused by this error until I realized it says METAL but the shader is GLSL.
The test is simply faulty because it does not provide a Metal version for Gazebo to use. It should be easy to port and I think we have a very similar shader already ported (in gz-rendering/ogre2/src/media/materials/programs/Metal/plain_color_fs.metal).
I got confused by this error until I realized it says METAL but the shader is GLSL.
Yeah, sorry I traced this one down a few minutes ago and came to the same conclusion. It's a shader that is in test/media
and not src/media
.
It's really late and I think this pair of shaders should be the ported version (untested code):
/*
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#include <metal_stdlib>
using namespace metal;
struct VS_INPUT
{
float4 position [[attribute(VES_POSITION)]];
};
struct PS_INPUT
{
float4 gl_Position [[position]];
};
struct Params
{
float4x4 worldviewproj_matrix;
};
vertex PS_INPUT main_metal
(
VS_INPUT input [[stage_in]],
constant Params &p [[buffer(PARAMETER_SLOT)]]
)
{
PS_INPUT outVs;
outVs.gl_Position = ( p.worldviewproj_matrix * input.position ).xyzw;
return outVs;
}
/*
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#include <metal_stdlib>
using namespace metal;
struct PS_INPUT
{
};
fragment float4 main_metal
(
PS_INPUT inPs [[stage_in]]
)
{
return float4(1.0, 0.0, 0.0, 1.0);
}
Environment
Description
When transitioning to metal, three new test failures were introduced. They are captured here so that we remember to address them.
UtilTest.ClickToScene
CameraTest.VisualAt
This appears to be caused by some shader compilation errors:
RenderPassTest.DepthGaussianNoise