Input texture types / Cache and copy
site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=DeMontfortUniversity.onmicrosoft.com; s=selector2-DeMontfortUniversity-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z4V0hwgng9xAfOjxn0MAShwFZn0rlKYR+Auv3yUXock=; b=dK4QB7W5cUJ9mvAb53CPn1sj7NDX7XE23c2IWUyFQ9pcZNWvHa7j6yv4UJ9mlPfQtyZvwoQxmBfcfLX8k6AJaxlUKmVO/JVwdP2tt2H/szQwX47niwhqo9DPBkrDUlM96VdfFkxgw00CquzXgs6FZ8Ib0Yh4hdwNTclNoo6Vb3s= Thread-index: AQHWKG1AsQZXlBL9U0mlH7J6UQw3Zg== Thread-topic: Input texture types / Cache and copy User-agent: Microsoft-MacOutlook/10.10.15.200413 Hi ProAppsDev, Continuing my plugin conversion from OpenGL to Metal in FxPlug 4. My plugin unfortunately requires copying the input texture to RAM in order to support a special search/crawl process on the RGB data. In the OpenGL version, I used glReadPixels to request GL_FLOAT data and so built my crawl code around the processing of floats. I notice that the input texture in my FxPlug 4 version is reading MTLPixelFormatRGBA16Float. So it is half-float, which Obj C is not in a ready position to deal with elegantly. I notice that the example MTLDeviceCache code is written to suggest that RBGA32Float might also be received. It would be helpful to know which texture pixel formats might come in to the plugin and why. Seem unlikely, but is there any way to force the input texture to come in as 32Float? If not, seems my most efficient conversion from half to float will be to draw the input texture to a 32Float texture and then do a Metal GetBytes from that. I’m testing doing that using the Brightness example, using a MTLPixelFormatRGBA32Float pixel format when setting up the Device Cache (instead of querying the input pixel format), creating a new MTLPixelFormatRGBA32Float texture to target and setting up the pipeline accordingly. So far no joy – though hard to assess the issue w/o a Metal debugger available. I’m just wondering if I’m missing something in the nature of the Metal Device Cache design that might preclude me doing this… (I haven’t yet tried doing the whole thing manually without using the Metal Device Cache.) Thanks, -=Bret _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/pro-apps-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Bret Battey via Pro-apps-dev