nosklo / cemu_utils

Useful code to deal with cemu configs and files
GNU Lesser General Public License v3.0
50 stars 1 forks source link

Feature request remove shaders #1

Closed Neodymium5312 closed 6 years ago

Neodymium5312 commented 6 years ago

Request for adding of the ability to remove shaders by hash or offset to enable removing shaders with link or compile errors

nosklo commented 6 years ago

This is the log.txt for loading the complaining gamer's shader cache file. log.txt

nosklo commented 6 years ago

While inspecting the actual shader cache I can't find all those shaders in the file. I found only one of them, the 0086e7ebadb97735 shader. Removing it stops the error from showing up on log.txt so it seems to be the right track. But I can't find the other shaders with errors in the shader cache file.

nosklo commented 6 years ago
nosklo commented 6 years ago

I have isolated a single shader with the problem.

This shader cache contains only one shader. When trying to load it I get the error below on the log.txt:

[12:13:35] Link error in shader f5d76d8d8fbfa76f. Log:

However in the binary file offset 160 I get: 6F A7 BF 8F 8D 6D D7 15

nosklo commented 6 years ago

That means the 3 last bits (most significant bits) are being changed before writing to the log

nosklo commented 6 years ago

Ok, just confirmed with exzap that the 3 bits are indeed reserved for the shader type and should not be used when trying to locate the shader based on the log error.

nosklo commented 6 years ago

Ok, version 3 of the shaderutils can unpack shaders. Just unpack and remove the ones you want.