How to check for Shader Model 3.0 Support? - delphi

Currently i am working on a 3d visualization app , requirement of my app is that host's graphic-card does support Shader Model 3.0
do you know any work around checking Shader Model 3.0 Support via delphi
Just for more information
I know this
• DirectX 8.0 - Shader Model 1.0 & 1.1
• DirectX 8.0a - Shader Model 1.3
• DirectX 8.1 - Shader Model 1.4
• DirectX 9.0 - Shader Model 2.0
• DirectX 9.0a - Shader Model 2.0a
• DirectX 9.0b - Shader Model 2.0b
• DirectX 9.0c - Shader Model 3.0
• DirectX 10.0* - Shader Model 4.0
• DirectX 10.1* - Shader Model 4.1
• DirectX 11.0* - Shader Model 5.0
BUT some graphic hardware doesn't support shader model 3.0 ( even with installing proper directx ) , the thing is i want to determine it by checking the hardware
Thanks in advance
EDIT : OK I did figure it out( Thanks to people on gamedev )
Using GPU-Z , Command line
gpu-z.exe -dump gpuz.xml

Using GPU-Z , Command line
gpu-z.exe -dump gpuz.xml

Related

Are SIMD groups supported in Metal on iOS?

I can't figure out whether or not SIMD groups are supported on iOS.
The Metal Shading Language Specification states at the time of writing on page 59, section 4.4.1:
iOS: No support for SIMD-groups.
However, in Table 6.11., "SIMD-group functions in the Metal standard library", some SIMD-group functions are listed as supported on iOS. This is one of the ones I'd like to use:
T simd_shuffle_down(T data, ushort delta)
macOS: Since Metal 2.0.
iOS: Since Metal 2.2.
Similarly, table Table 5.7., "Attributes for kernel function input arguments", states that some attributes are available:
threads_per_simdgroup
macOS: Since Metal 2.0.
iOS: Since Metal 2.2.
So it's not clear from the documentation whether any SIMD group functionality is supposed to be supported. Using a function argument with the threads_per_simdgroup attribute in a compute kernel currently causes the run-time Metal compiler to crash on iPhone 7 and 8 (but not 11):
Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED
All devices tested with iOS 13.3. Metal language version was 2.2. Xcode version 11.3.
I think that the claim that SIMD-groups are unsupported on iOS is either inaccurate, or not specific enough.
If you consult the Metal Feature Set Tables for Metal 2.2, you'll note that "SIMD-scoped permute operations" (simd_broadcast,
simd_shuffle, simd_shuffle_up, etc.) are supported on MTLGPUFamilyApple6, which includes devices with A13 processors. Hence why this works on iPhone 11.
The fact that using this attribute on unsupported devices causes a compiler crash is a bug, and I'd recommend that you file feedback.

How to get EGLNativeWindowType in iOS platform?

How can I obtain a EGLNativeWindowType object in the iOS platform? or achieve the equivalent of the following android code?
To provide a bit more insight, I am currently porting a native android app to iOS which shares a single core C library, while the iOS project itself is written in Objective-C. The project is also using EGL and not EAGL.
The existing source code is standard C but uses Android's NDK; a EGLSurface object is defined with EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list)
EGLNativeWindowType win = AndroidMainGetAndroidActivity()->app->window;
EGLSurface eglSurface = eglCreateWindowSurface(e_eglDisplay, config, win, NULL);
I haven't found any documentation relating to EGLNativeWindowType and iOS.
iOS uses EAGL as an interface between OpenGL ES and the underlying windowing system. EAGL need for iOS as EGL needs for Android to draw via OpenGL ES. So you can not use EGL API on iOS.
Differences between them and how them works very good described in an article.

GL_GEOMETRY_SHADER missing on iOS OpenGL ES 3.0

I am porting my engine to iOS and I got an error
'GL_GEOMETRY_SHADER' undefined
I am using iOS 8 SDK and OpenGL 3.0; Device is iPhone 5s.
Is there any alternative to this? Or how can I access geometry shader stuff?
There are no geometry shaders in OpenGL ES, neither in 3.0 nor in 3.1.
There is an extension, which is based on ES 3.1. Since iOS does not support 3.1 at this point, the extension is of course not available on iOS.
Alternatives? If you really need geometry shaders, Android based devices are always an option. :) Geometry shaders are part of the Android Extension Pack for ES 3.1, which is a selection of extensions that Google encourages device vendors to support.
Update: Geometry shaders are standard in ES 3.2. That does not help on iOS, though, since it still does not support anything higher than ES 3.0.

Instanced drawing with OpenGL ES 2.0 on iOS

In short:
Can anyone confirm whether it is possible to use the built-in variable gl_InstanceID (or gl_InstanceIDEXT) in a vertex shader using OpenGL ES 2.0 on iOS with GL_EXT_draw_instanced enabled?
Longer:
I want to draw multiple instances of an object using glDrawArraysInstanced and gl_InstanceID, and I want my application to run on multiple platforms, including iOS.
The specification clearly says that these features require ES 3.0. According to the iOS Device Compatibility Reference ES 3.0 is only available on a few devices (those based on the A7 GPU; so iPhone 5s, but not on iPhone 5 or earlier).
So my first assumption was that I needed to avoid using instanced drawing on older iOS devices.
However, further down in the compatibility reference document it says that the EXT_draw_instanced extension is supported for all SGX Series 5 processors (that includes iPhone 5 and 4s).
This makes me think that I could indeed use instanced drawing on older iOS devices too, by looking up and using the appropriate extension function (EXT or ARB) for glDrawArraysInstanced.
I'm currently just running some test code using SDL and GLEW on Windows so I haven't tested anything on iOS yet.
However, in my current setup I'm having trouble using the gl_InstanceID built-in variable in a vertex shader. I'm getting the following error message:
'gl_InstanceID' : variable is not available in current GLSL version
Enabling the "draw_instanced" extension in GLSL has no effect:
#extension GL_ARB_draw_instanced : enable
#extension GL_EXT_draw_instanced : enable
The error goes away when I specifically declare that I need ES 3.0 (GLSL 300 ES):
#version 300 es
Although that seem to work fine on my Windows desktop machine in an ES 2.0 context I doubt that this would work on an iPhone 5.
So, shall I abandon the idea of being able to use instanced drawing on older iOS devices?
From here:
Instanced drawing is available in the core OpenGL ES 3.0 API and in
OpenGL ES 2.0 through the EXT_draw_instanced and EXT_instanced_arrays
extensions.
You can see that it's available on all of their GPUs, PowerVR SGX, Apple A7, A8.
(Looks like #Shammi's not coming back... if they do, you can change the accepted answer :)

Setting openGL ES 1.1 as default in xcode 4 for iOS5

I have the latest Xcode. When I setup a new project to use OpenGL ES it seems that Xcode creates it using OpenGL ES 2.0.
How do I make Xcode open projects using OpenGL ES 1.1 instead?
Xcode doesn't really "open projects using OpenGL ES 1.1." The IDE has some stock templates that you can choose for starting new projects, with one of them being an OpenGL ES application. These templates are updated with almost every version of Xcode released, so what they provide as a starting point changes over time.
Currently, the "OpenGL ES Game" template in Xcode 4.2 uses GLKit and assumes OpenGL ES 2.0 capabilities are present on the target device. Given that all devices that run iOS 5.0 (which is needed to use GLKit) support OpenGL ES 2.0, this is a safe bet for a template like this. With developers like Marco Arment reporting that fewer than 3% of iOS devices out there don't support OpenGL ES 2.0 you can see why Apple may have decided to focus on that for their template.
This, however, doesn't mean that you can't develop applications which only target OpenGL ES 1.1 using the latest versions of Xcode. You're just going to need to write your own code to set up the 1.1 context, or start from another template out there. For example, this simple cube sample application I wrote for my class has renderers for both OpenGL ES 1.1 and 2.0. You can just use the 1.1 path as the basis for your application.
I do recommend taking a look at supporting OpenGL ES 2.0, given that almost all iOS hardware out there supports it now and because it gives you some very powerful capabilities.

Resources