Post

Replies

Boosts

Views

Activity

Metal shader: extract _bits() returns incorrect results
Hello. I have a problem with extract _bits() in Metal shader returning wrong result in some cases. Here is one specific case: float variable gets its value from device memory, and extracting bits from this variable only returns correct data for the first 4 bits - the rest is either invalid or mostly returns zeroes. To verify extract_bits() usage I have hardcoded that float value in another variable in the same shader - in that case extract_bits() returns correct values. A few screenshots from shader debugger to illustrate. Here paramsFloat is read from device memory and equals 0.6549019814. It gets converted to uint packedParams which is used to extract bits from it after that. Variables bits_* are here to show that extract_bits() gives incorrect result. hardcodedParamsFloat has the same value 0.6549019814. It also gets converted into uint and hardcoded_bits_* variables are here to show that in this case, for the same value (but hardcoded instead of read from device memory) extract_bits() gives correct results. It all happens in a vertex shader: With GrassPositions being a simple struct: That looks like a bug somewhere deep inside driver r Metal... Or do I miss something obvious? It seems that this issue is present on MacBook Pros with AMD GPUs. OS is at the latest update 12.2.1. Thank you!
1
0
719
Mar ’22
Activate Game Mode for my App in Sonoma?
Hello everyone. I wonder what conditions should be met to let Sonoma activate Game Mode for my App? The app is a 3D application with high demands on GPU, so gaining additional performance from OS would be great. But simply going full screen does not activate Game Mode like e.g. games from Steam do. Are there any settings that one could influence to let the app trigger Game Mode? Best regards, Alex
4
0
3.1k
Oct ’23
App document icon in spotlight on mac
Hello. I'm adding my mac app contents to spotlight index. I have created a dedicated exported document type which Finder also recognises and shows documents with my extension "artcl" with correct icon I provide with the app. But it does not happen in Spotlight - it shows my documents with default icon. I create items for Spotligh index as follows: let myType = UTType(filenameExtension: "artcl")! var searchableItems: [CSSearchableItem] = [] for itm in items.reversed() { let attributeSet = CSSearchableItemAttributeSet(contentType: myType) attributeSet.title = item.title attributeSet.contentDescription = item.desc attributeSet.displayName = item.name attributeSet.keywords = [ item.title ] attributeSet.comment = item.title + " " + item.desc attributeSet.contentType = "com.devaikin.spottest.artcl" let id = "artcl." + item.title + "." + item.name let indexItem = CSSearchableItem(uniqueIdentifier: id, domainIdentifier: "artcl", attributeSet: attributeSet) searchableItems.append(indexItem) let defaultIndex = CSSearchableIndex(name: "Spottest") defaultIndex.deleteAllSearchableItems() defaultIndex.beginBatch() defaultIndex.indexSearchableItems(searchableItems) ... Items are added to the spotlight and I can find them, but default icon is displayed while I would expect my exported type icon to be shown like Finder does it. Am I missing something in attributeSet setup?
0
0
337
Aug ’24