Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Compute shader error on Metal #3

Open
@Prin-E

Description

I'm using 2018年3月6日f1, MacBook Pro. I found out that some compute shaders are not correctly compiled on Metal because the lines of #pragma kernel contain comments. Unity shows error like "Macro names must be identifiers at kernel [KERNEL_NAME] metal :00".

ex) Boids.compute

// カーネル関数を指定
#pragma kernel ForceCS // 操舵力を計算
#pragma kernel IntegrateCS // 速度, 位置を計算

When I remove comments at the right, I can run samples without problems.

// カーネル関数を指定
#pragma kernel ForceCS
#pragma kernel IntegrateCS

Maybe it's Unity bug but I think it's safe to delete comments after #pragma kernel lines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /