Skip to content

Add BIND BUFFER modifier to allow binding OPENCL-C arguments #426

@dj2

Description

@dj2

Something along the lines of:

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
EXPECT out_buf IDX 0 EQ 7 4 2 3

This must also correctly detect ubo vs ssbo. The descriptorSet/Binding should be determined by the data provided by the CLSPV compiler.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions