Comments (5)
Since there isn't any aligned realloc primitive in POSIX, I think a good workaround would be to prepend a header to each allocation and remember the allocation size there.
from xgl.
That looks fairly broken. I'm not aware of a case where we use realloc but I'm guessing you've hit one.
from xgl.
@JonCampbell407 Are you fine with moving forward with a fix along these lines?
I think a good workaround would be to prepend a header to each allocation and remember the allocation size there.
from xgl.
Doing that would add a small amount of overhead to every allocation. Since realloc is never used in the driver I'd rather not do that. I think we should just change DefaultReallocFunc() to assert with VK_NEVER_CALLED(). What are you doing to hit this? I can't think of a case where we would want to use realloc in the driver.
from xgl.
Like you suggest, bailing out sound more lightweight that doing extra work on every allocation and free. I don't know if there would be any measurable slowdown caused by adding such header to every allocation.
I'll prepare a PR to return a nullptr
and assert in reallocation to make sure things don't misbehave in the future..
I hit this when working on cache creator and testing corner cases related to possible error codes after my refactoring changes. The ICD doesn't use realloc but we have a vulkan layer test that does reallocation. I wanted to move default vulkan allocation function implementation to either PAL or the XGL cache support library and use them in the cache creator tool.
from xgl.
Related Issues (20)
- Exposing subgroup ops for unsupported shader stages HOT 1
- Invalid unit in VkPipelineCreationFeedbackEXT::duration on Windows
- Cleanup of CreateMemoryPoolAndSubAllocate does not handle OOM properly HOT 2
- Settings folder should be configurable HOT 3
- Switchable graphics layer filters out cards AMDVLK dropped support for HOT 1
- Write immutable sampler to the descriptor sets
- Cache info test reads unaligned memory HOT 2
- Incorrect assertion for `VkRenderPassAttachmentBeginInfo` with a non-imageless `VkFramebuffer` HOT 1
- cache_creator build failed since https://github.com/GPUOpen-Drivers/llpc/actions/runs/4005730865 HOT 2
- vkCreateRenderPass2 crash with null pDepthStencilResolveAttachment HOT 1
- No Support for VK_EXT_graphics_pipeline_library on windows HOT 7
- vkQueueSubmit2 does not respect VkCommandBufferSubmitInfo::deviceMask HOT 2
- vkQueueSubmit/vkQueueSubmit2 returns VK_TIMEOUT when non-primary GPU is asked to wait on non-signaled timeline semaphore. HOT 4
- Missing VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR in supportedCompositeAlpha
- vkResetCommandPool slower than recreating, regardless of TRANSIENT_BIT HOT 5
- XGL cache creator tool HOT 4
- Documentation for guards using `LLPC_CLIENT_INTERFACE_MAJOR_VERSION` HOT 3
- Making cache creator usable with the open-source AMDVLK HOT 1
- CTS random fail with dEQP-VK.pipeline.creation_feedback.graphics_tests.vertex_stage_fragment_stage_delayed_destroy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xgl.