Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation how to build FFX SDK from source #84

Open
StefanPoelloth opened this issue Jul 30, 2024 · 3 comments
Open

Documentation how to build FFX SDK from source #84

StefanPoelloth opened this issue Jul 30, 2024 · 3 comments

Comments

@StefanPoelloth
Copy link

The repository contains precompiled binaries, eg: amd_fidelityfx_vk.dll. However when crashes inside the dll happen, binaries with debug informations are required.
A step by step guide should be added how to build the amd_fidelityfx_*.dll binaries.

@HerveRV
Copy link

HerveRV commented Aug 22, 2024

i'm stuck too in a crash in that dll, i'm waiting for a solution like that, too

@StefanPoelloth
Copy link
Author

i'm stuck too in a crash in that dll, i'm waiting for a solution like that, too

the library relies on vkGetBufferMemoryRequirements2KHR, vkCmdBeginDebugUtilsLabelEXT and vkCmdEndDebugUtilsLabelEXT. if not available you have to override vkDeviceProcAddr in the ffxCreateBackendVKDesc to return valid funktion pointers

@HerveRV
Copy link

HerveRV commented Aug 22, 2024

Thank you so much !

There is my solution :


VKAPI_ATTR PFN_vkVoidFunction Override_vkGetDeviceProcAddr(VkDevice device, const char *pName)
{
	if(strcmp(pName, "vkSetDebugUtilsObjectNameEXT") == 0)		return (PFN_vkVoidFunction)vkSetDebugUtilsObjectNameEXT;
	if(strcmp(pName, "vkFlushMappedMemoryRanges") == 0)			return (PFN_vkVoidFunction)vkFlushMappedMemoryRanges;
	if(strcmp(pName, "vkCreateDescriptorPool") == 0)			return (PFN_vkVoidFunction)vkCreateDescriptorPool;
	if(strcmp(pName, "vkCreateSampler") == 0)					return (PFN_vkVoidFunction)vkCreateSampler;
	if(strcmp(pName, "vkCreateDescriptorSetLayout") == 0)		return (PFN_vkVoidFunction)vkCreateDescriptorSetLayout;
	if(strcmp(pName, "vkCreateBuffer") == 0)					return (PFN_vkVoidFunction)vkCreateBuffer;
	if(strcmp(pName, "vkCreateBufferView") == 0)				return (PFN_vkVoidFunction)vkCreateBufferView;
	if(strcmp(pName, "vkCreateImage") == 0)						return (PFN_vkVoidFunction)vkCreateImage;
	if(strcmp(pName, "vkCreateImageView") == 0)					return (PFN_vkVoidFunction)vkCreateImageView;
	if(strcmp(pName, "vkCreateShaderModule") == 0)				return (PFN_vkVoidFunction)vkCreateShaderModule;
	if(strcmp(pName, "vkCreatePipelineLayout") == 0)			return (PFN_vkVoidFunction)vkCreatePipelineLayout;
	if(strcmp(pName, "vkCreateComputePipelines") == 0)			return (PFN_vkVoidFunction)vkCreateComputePipelines;
	if(strcmp(pName, "vkDestroyPipelineLayout") == 0)			return (PFN_vkVoidFunction)vkDestroyPipelineLayout;
	if(strcmp(pName, "vkDestroyPipeline") == 0)					return (PFN_vkVoidFunction)vkDestroyPipeline;
	if(strcmp(pName, "vkDestroyImage") == 0)					return (PFN_vkVoidFunction)vkDestroyImage;
	if(strcmp(pName, "vkDestroyImageView") == 0)				return (PFN_vkVoidFunction)vkDestroyImageView;
	if(strcmp(pName, "vkDestroyBuffer") == 0)					return (PFN_vkVoidFunction)vkDestroyBuffer;
	if(strcmp(pName, "vkDestroyBufferView") == 0)				return (PFN_vkVoidFunction)vkDestroyBufferView;
	if(strcmp(pName, "vkDestroyDescriptorSetLayout") == 0)		return (PFN_vkVoidFunction)vkDestroyDescriptorSetLayout;
	if(strcmp(pName, "vkDestroyDescriptorPool") == 0)			return (PFN_vkVoidFunction)vkDestroyDescriptorPool;
	if(strcmp(pName, "vkDestroySampler") == 0)					return (PFN_vkVoidFunction)vkDestroySampler;
	if(strcmp(pName, "vkDestroyShaderModule") == 0)				return (PFN_vkVoidFunction)vkDestroyShaderModule;
	if(strcmp(pName, "vkGetBufferMemoryRequirements") == 0)		return (PFN_vkVoidFunction)vkGetBufferMemoryRequirements;
	if(strcmp(pName, "vkGetBufferMemoryRequirements2KHR") == 0)	return (PFN_vkVoidFunction)vkGetBufferMemoryRequirements2; // vkGetBufferMemoryRequirements2KHR == NULL !
	if(strcmp(pName, "vkGetImageMemoryRequirements") == 0)		return (PFN_vkVoidFunction)vkGetImageMemoryRequirements;
	if(strcmp(pName, "vkAllocateDescriptorSets") == 0)			return (PFN_vkVoidFunction)vkAllocateDescriptorSets;
	if(strcmp(pName, "vkFreeDescriptorSets") == 0)				return (PFN_vkVoidFunction)vkFreeDescriptorSets;
	if(strcmp(pName, "vkAllocateMemory") == 0)					return (PFN_vkVoidFunction)vkAllocateMemory;
	if(strcmp(pName, "vkFreeMemory") == 0)						return (PFN_vkVoidFunction)vkFreeMemory;
	if(strcmp(pName, "vkMapMemory") == 0)						return (PFN_vkVoidFunction)vkMapMemory;
	if(strcmp(pName, "vkUnmapMemory") == 0)						return (PFN_vkVoidFunction)vkUnmapMemory;
	if(strcmp(pName, "vkBindBufferMemory") == 0)				return (PFN_vkVoidFunction)vkBindBufferMemory;
	if(strcmp(pName, "vkBindImageMemory") == 0)					return (PFN_vkVoidFunction)vkBindImageMemory;
	if(strcmp(pName, "vkUpdateDescriptorSets") == 0)			return (PFN_vkVoidFunction)vkUpdateDescriptorSets;
	if(strcmp(pName, "vkCmdPipelineBarrier") == 0)				return (PFN_vkVoidFunction)vkCmdPipelineBarrier;
	if(strcmp(pName, "vkCmdBindPipeline") == 0)					return (PFN_vkVoidFunction)vkCmdBindPipeline;
	if(strcmp(pName, "vkCmdBindDescriptorSets") == 0)			return (PFN_vkVoidFunction)vkCmdBindDescriptorSets;
	if(strcmp(pName, "vkCmdDispatch") == 0)						return (PFN_vkVoidFunction)vkCmdDispatch;
	if(strcmp(pName, "vkCmdDispatchIndirect") == 0)				return (PFN_vkVoidFunction)vkCmdDispatchIndirect;
	if(strcmp(pName, "vkCmdCopyBuffer") == 0)					return (PFN_vkVoidFunction)vkCmdCopyBuffer;
	if(strcmp(pName, "vkCmdCopyImage") == 0)					return (PFN_vkVoidFunction)vkCmdCopyImage;
	if(strcmp(pName, "vkCmdCopyBufferToImage") == 0)			return (PFN_vkVoidFunction)vkCmdCopyBufferToImage;
	if(strcmp(pName, "vkCmdClearColorImage") == 0)				return (PFN_vkVoidFunction)vkCmdClearColorImage;
	if(strcmp(pName, "vkCmdFillBuffer") == 0)					return (PFN_vkVoidFunction)vkCmdFillBuffer;
	if(strcmp(pName, "vkCmdWriteBufferMarkerAMD") == 0)			return (PFN_vkVoidFunction)vkCmdWriteBufferMarkerAMD; // NULL sur nVidia
	if(strcmp(pName, "vkCmdWriteBufferMarker2AMD") == 0)		return (PFN_vkVoidFunction)vkCmdWriteBufferMarker2AMD; // NULL sur nVidia
	if(strcmp(pName, "vkCmdBeginDebugUtilsLabelEXT") == 0)		return (PFN_vkVoidFunction)vkCmdBeginDebugUtilsLabelEXT;
	if(strcmp(pName, "vkCmdEndDebugUtilsLabelEXT") == 0)		return (PFN_vkVoidFunction)vkCmdEndDebugUtilsLabelEXT;

	DebugBreak();
	return NULL;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants