Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build for iOS, document build instructions #401

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions external/vulkancts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ If building for 32-bit x86 with GCC, you probably also want to add `-msse2
cmake <path to vulkancts> -DCMAKE_BUILD_TYPE=Debug -DDEQP_TARGET=osx -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_FLAGS=-m64
make -j

### iOS

cmake <path to vulkancts> -GXcode -DDEQP_TARGET=ios -DDE_OS=DE_OS_IOS -DDE_CPU=DE_CPU_ARM_64 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_DEPLOYMENT_TARGET=16.0 -DCMAKE_OSX_ARCHITECTURES=arm64

Open `dEQP-Core-ios.xcodeproj` in Xcode, select the "deqp" scheme, and build.

### Android

Following command will build dEQP.apk:
Expand Down
2 changes: 1 addition & 1 deletion framework/platform/ios/tcuIOSPlatform.hh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public:
ContextFactory (ScreenManager* screenManager);
~ContextFactory (void);

glu::RenderContext* createContext (const glu::RenderConfig& config, const tcu::CommandLine& cmdLine) const;
glu::RenderContext* createContext (const glu::RenderConfig& config, const tcu::CommandLine& cmdLine, const glu::RenderContext* sharedContext) const override;

private:
ScreenManager* const m_screenManager;
Expand Down
7 changes: 6 additions & 1 deletion framework/platform/ios/tcuIOSPlatform.mm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "glwInitES20Direct.hpp"
#include "glwInitES30Direct.hpp"

#include <OpenGLES/ES3/gl.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need this include here?

It should be sufficient to have it in
framework/egl/egluStaticESLibrary.cpp and
framework/opengl/wrapper/glwInitES30Direct.cpp

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this I get:

VK-GL-CTS/framework/platform/ios/tcuIOSPlatform.mm:241:45: error: use of undeclared identifier 'GL_RENDERBUFFER'
        if (![getEAGLContext() renderbufferStorage:GL_RENDERBUFFER fromDrawable:(CAEAGLLayer *)m_layer])

Is there a better place I should put it? Maybe in the tcuIOSPlatform.hh next to the existing #import <OpenGLES/EAGL.h> include?


namespace tcu
{
Expand Down Expand Up @@ -71,8 +72,12 @@
{
}

glu::RenderContext* ContextFactory::createContext (const glu::RenderConfig& config, const tcu::CommandLine&) const
glu::RenderContext* ContextFactory::createContext (const glu::RenderConfig& config, const tcu::CommandLine&, const glu::RenderContext* sharedContext) const
{
if (sharedContext) {
throw NotSupportedError("sharedContext not supported on iOS");
}

RawContext* rawContext = new RawContext(config.type);

try
Expand Down