Skip to content

Add RUN support for OPENCL-C shaders #427

@dj2

Description

@dj2

The run command can currently either draw or execute compute kernels. What changes need to be done to support opencl-c?

SHADER opencl-c my_kernel CLSPV
kernel void foo(global int4* in, global int4* out, int z) {
  out[z] = in[z];
END
BUFFER in_buf TYPE int4 DATA
7 4 2 3
END
BUFFER out_buf TYPE int4 SIZE 1

PIPELINE my_pipeline
  ATTACH my_kernel
  BIND BUFFER foo OPENCL-C KERNEL in_buf ARG in
  BIND BUFFER foo OPENCL-C KERNEL out_buf ARG out
END
RUN my_pipeline  # Just this? Or something else?

Metadata

Metadata

Assignees

No one assigned

    Labels

    amberscriptWork related to AmberScriptenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions