0

I was just wondering, instead of creating a texture, initializing data to it via blit command encoder if it is private or by using MTLTexture replace if it not private, and passing it to GPU using setFragmentTexture, can I have the texture already ready to use inside the .metal file similar to:

constant const texture2d<half> my_texture = {/* Texture Data */};

Is this possible?

user16217248
  • 3,119
  • 19
  • 19
  • 37

1 Answers1

0

As per comment:

It is not possible to do that. Each resource has to have a CPU MTLResource object.

user16217248
  • 3,119
  • 19
  • 19
  • 37