This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Shader Development Studio Problem

Note: This was originally posted on 12th May 2011 at http://forums.arm.com

Hello,
Recently I decided to try out Mali Developer Tools, which look very promising.

Unfortunately I have a problem with Shader Development Studio.
When trying to make SimpleTest Project (from the User Guide) while rendering the shader effect
the Shader Preview shows a triangle instead of a square shown in the Guide.
In general, it is not surprising, since the option VERTICES in Shader Attributes View has by default  three
vertices:
-1.0 -1.0,0.0,1.0,
1.0 -1.0,0.0,1.0,
1.0,1.0,0.0,1.0,

The problem however is that there is no possibility to add additional vertices
(when choosing the option USER_DEFINED). You can only change the three given.
Changing the geometry in Shader Control View do not bring any effect, always showing three vertices.
Even when using a Shader Examples from Mali GPU Shader Library shaders are applied to that triangle.
The shaders themselves are working (changing color, texturing, etc).

Plugin has been tested on the following configurations:
Eclipse 3.6.2
  • GeForce 9600M GT Windows 7 64bit
  • GeForce GTS 250 Windows 7 32bit

All necessary OpenGL extensions are present, Emulator and Offline Shader Compiler are installed and work.

[font=arial, sans-serif]Had someone the same problem and is there a solution?[/font]
[font=arial, sans-serif]Thanks.[/font]
  • Note: This was originally posted on 18th May 2011 at http://forums.arm.com

    Hi estrige,

    I'm trying to recreate the problem here but can't seem to reproduce this on my Windows XP platform. I find that the default geometry is in fact a plane (rather than a triangle). I don't have a Windows 7 platform handy at the moment but I don't see how this would cause an issue. Does the Eclipse error log show anything that might give us a clue (you can find it in "Window > Show View")?

    In terms of adding more vertices to a geometry, this is a interesting idea and supporting arbitrary geometry is something we'd definitely like to do in the future. At the moment, selecting one of the more complex geometries should give you extra vertices to play with (once we've managed to solve your problem with selecting something other than the triangle!).
  • Note: This was originally posted on 20th May 2011 at http://forums.arm.com

    Yes, in general the version of windows should not play a special role here, but I was able to try the plugin
    on the third computer with windows 7 already (albeit with similar characteristics that were given above)
    on a clean eclipse installation. The problem is the same.

    About adding additional vertices, I just wanted to add a fourth vertex to the three present, in order to
    turn it into a square, but in principle, several different meshes should be sufficient for shader testing.
    Speaking about the three vertices, I proceed from the fact that VERTICES variable represent 3 homogeneous vertices
    (one in each row). Since I am not sure, here is a picture
     
    In error log I found two errors related to the plugin:

    The first one happened rarely apparently at the opening of a (closed) project:

    Message: Unhandled event loop exception

    Stack Trace:
    java.lang.NullPointerException
    at com.arm.mali.shaderdebugger.preview.PreviewModel.redrawPreviewImage(PreviewModel.java:542)
    at com.arm.mali.shaderdebugger.preview.PreviewModel$1.run(PreviewModel.java:596)
    at org.eclipse.swt.widgets.Display.runTimer(Display.java:4167)
    at org.eclipse.swt.widgets.Display.messageProc(Display.java:3256)
    at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2459)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1408)

    [size="2"]As well as a "Widget is disposed", when closing eclipse with an opened shader studio project.

    When I try to change geometry simply nothing happens, there are no logged errors in this case.[/size]
  • Note: This was originally posted on 27th May 2011 at http://forums.arm.com

    Thanks for the response! I'm a bit suspicious of that NullPointerError so I will add a note about this to the internal bug tracker, and one of our developers will be able to take a look at it.
  • Note: This was originally posted on 1st August 2011 at http://forums.arm.com

    Looks like I have the exact same problem on WinXP.
    Eclipse is v3.7.0.
    GPU: GeForce 8300GS
    The Mali OpenGL ES 2.0 Emulator works fine when used intependently of the Shader Dev Studio.

    I've tried both creating my own SimpleTest as per the PDF docs and importing ShaderExamples from the Shader Library but all I can render is single triangle.
    Changing the Geometry from the Shader Control view does not help.

    It's just using the hardcoded values from the Shader Attributes view. So if I edit them I can modify the render but I can't get it to use the Geometry specified by the Shader Control.

    Am I simply missing something or do you have a bug with the latest Eclipse release?


  • Note: This was originally posted on 1st August 2011 at http://forums.arm.com

    Same issue with Eclipse 3.6.2. and 3.5.2.
    I'm using OpenGL ES 2.0 Emulator v1.3.0M1
    Maybe it's an issue with the Renderer Server?
  • Note: This was originally posted on 15th May 2013 at http://forums.arm.com


    Hi all,
    I have had the same issue. And I think i know the root cause.
    Looks like it's happens then you have non "." (point) separator in your system for float numbers. For me it was "," (coma).
    So just set US locale setting.

    For plugin developers: Please dont use system separator. It happens inside of com.arm.mali.shaderdevelopmentstudio.callscript.Geometry. The java.util.Scanner throws java.util.InputMismatchException then trying to parse float number.
    Sorry for my English.


    Thanks shapkin! That did it! Well done!

    adding "-Duser.language=en -Duser.country=US" to the eclipse.ini worked.


    But this is just a workaround... Hopefully this is fixed in the next version/patch... shouldn't be too hard i guess.
  • Note: This was originally posted on 23rd March 2013 at http://forums.arm.com

    Hi there,

    just wanted to bump this topic... i have the same problem on
    Win 7 64bit
    JDK7_17
    [color="#444444"][font="arial"][size="2"]Eclipse Juno
    latest Android SDK (and projects)

    Is there any solution yet?

    Best Regards

    DrNoes
    [/size][/font][/color]


    [color="#444444"][font="arial"][size="2"]EDIT: This Error message appears in the logs, when  I try to save chages in the shader control:[/size][/font][/color]

    [color="#444444"][font="arial"][size="2"]
    java.lang.ClassCastException: org.eclipse.ui.editors.text.TextEditor cannot be cast to com.arm.mali.shaderdevelopmentstudio.editors.ShaderStockpileEditor
    at com.arm.mali.shaderdevelopmentstudio.Activator.getShaderStockpileEditor(Activator.java:660)
    at com.arm.mali.shaderdevelopmentstudio.control.ShaderToolbarFactory$3.run(ShaderToolbarFactory.java:133)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)[/size][/font][/color]
    [color="#444444"] [/color]
    [color="#444444"] [/color]
    [color="#444444"][font="arial"][size="2"]Maybe theres a similar problem with the Dropdown-Box using deprecated (not longer used) methods to change the actual geometry ?[/size][/font][/color]
    [color="#444444"][font="arial"] [/font][/color]
    [color="#444444"][font="arial"][size="2"]EDIT2:[/size][/font][/color]
    [color="#444444"][font="arial"] [/font][/color]
    [color="#444444"][font="arial"][size="2"]This is the shader config... the shaders are the default vertex and fragment shaders[/size][/font][/color]
    [color="#444444"][font="arial"] [/font][/color]
    [color="#444444"][font="arial"][size="2"]
    ShaderStockpile:
      localTimeStamp: 1364053487225
      shaderEffects:
        ShaderEffect:
          name: bounds
          vertexSources:
            ShaderSource:
              fileName: shader\bounds.vert
          fragmentSources:
            ShaderSource:
              fileName: shader\bounds.frag
          CompilerSettings:
            useCompiler: true
            revisionTarget:
            compilerPath: malisc
            basePath:
          vertexInstructionWords: 0
          vertexShortestCodePath: 0
          vertexLongestCodePath: 0
          fragmentInstructionWords: 0
          fragmentShortestCodePath: 0
          fragmentLongestCodePath: 0
          data: null
          axis:
            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
          uniforms:
            Uniform:
              type: GL_FLOAT_MAT4
              initialData:
                data:
                  -[[1.0, 0.0, 0.0, 0.0],
                  [0.0, 1.0, 0.0, 0.0],
                  [0.0, 0.0, 1.0, 0.0],
                  [0.0, 0.0, 0.0, 1.0]]-
              location: 0
              name: camera
              pushed: true
              mapping: CAMERA_MATRIX
              finalData:
                data:
                  -[[1.0, 0.0, 0.0, 0.0],
                  [0.0, 1.0, 0.0, 0.0],
                  [0.0, 0.0, 1.0, 0.0],
                  [0.0, 0.0, 0.0, 1.0]]-
          attributes:
            Attribute:
              type: GL_FLOAT_VEC4
              initialData:
                data:
                  -[-1.0, -1.0, 0.0, 1.0]
                  -[1.0, -1.0, 0.0, 1.0]
                  -[1.0, 1.0, 0.0, 1.0]-
              location: 0
              name: coord
              pushed: true
              mapping: VERTICES
          backgroundColour:
            [0.0, 0.0, 0.0]
          orthographic: true
          maxFrames: 1
          geometry: PLANE
          blendEnabled: true
          BlendMode:
            blendColour:
              [0.0, 0.0, 0.5]
            useEquationSeperateMode: false
            useFunctionSeperateMode: false
            equationMode: GL_FUNC_ADD
            equationAlphaMode: GL_FUNC_ADD
            blendFuncSource: GL_ONE
            blendFuncDest: GL_ZERO
            blendFuncSourceAlpha: GL_ONE
            blendFuncDestAlpha: GL_ZERO[/size][/font][/color]
  • Note: This was originally posted on 23rd March 2013 at http://forums.arm.com

    Hi all,
    I have had the same issue. And I think i know the root cause.
    Looks like it's happens then you have non "." (point) separator in your system for float numbers. For me it was "," (coma).
    So just set US locale setting.

    For plugin developers: Please dont use system separator. It happens inside of com.arm.mali.shaderdevelopmentstudio.callscript.Geometry. The java.util.Scanner throws java.util.InputMismatchException then trying to parse float number.
    Sorry for my English.
  • Note: This was originally posted on 26th March 2013 at http://forums.arm.com

    Hey Shapkin,

    Excellent detective work! I can now reproduce this here.

    You are correct, the system local setting is the root cause. I've looked into the code and can provide an explanation for the behaviour:
    • The geometry files contain the vertex data as floating-point with a '.' separator
    • An instance of a java.util.Scanner is used to parse that data
    • The scanner will pick up the current system locale and use that to interpret the floating point number
    That's all well, but on systems that do not have "." as a floating-point separator, an exception will be thrown that forces the geometry back to a triangle. The workaround is to, as you say, change to a locale that has a "." separator.

    Many thanks for finding and reporting this issue!
  • Note: This was originally posted on 20th October 2011 at http://forums.arm.com

    Thanks, that's helpful!

    I don't feel that the two exceptions you mentioned are related to this problem; the first looks like an accidental call to set a previous renderer connection when none exists, and the second is someone trying to dispose an SWT widget that's already been disposed (both are bugs, and I've logged them in our bug tracker).

    My installation of Eclipse was also a fresh 3.7, running on Java 6. I haven't tried it on Java 7 yet. Maybe you're on to something there. I'll try to install Java 7 and try to reproduce it.

    In answer to your questions; I installed everything to the default locations and haven't made any changes to the PATH etc that weren't made by the installers themselves (i.e. adding the OpenGL ES 2.0 Emulator to the PATH).
  • Note: This was originally posted on 20th October 2011 at http://forums.arm.com

    Might be helpful.

    java -version yields:

    java version "1.6.0_29"
    Java™ SE Runtime Environment (build 1.6.0_29-b11)
    Java HotSpot™ Client VM (build 20.4-b02, mixed mode, sharing)

    If you have additional ideas or want me to try out a bugfix/workaround I will help out.
  • Note: This was originally posted on 24th October 2011 at http://forums.arm.com

    Hmm, that's frustrating""I was hoping that it would be an issue with Java 7, but evidently the problem exists with Java 6, too. I'll need to do some more investigation.
  • Note: This was originally posted on 24th October 2011 at http://forums.arm.com

    One thought - when running are you running as administrator or as an unpriviledged user? Windows 7 is a lot more picky about what it lets a non-admin write to specific locations.
  • Note: This was originally posted on 24th October 2011 at http://forums.arm.com


    One thought - when running are you running as administrator or as an unpriviledged user? Windows 7 is a lot more picky about what it lets a non-admin write to specific locations.


    Already tried that, no success :/
  • Note: This was originally posted on 28th July 2012 at http://forums.arm.com

    Same here. Windows 7 and Eclipse Juno.