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

Prevent CudaEnumComputeCapableGpus V2 crash #128

Merged
merged 2 commits into from
Jun 6, 2023
Merged

Prevent CudaEnumComputeCapableGpus V2 crash #128

merged 2 commits into from
Jun 6, 2023

Conversation

jp7677
Copy link
Owner

@jp7677 jp7677 commented May 31, 2023

It doesn't allow hardware PhysX in #127, but at least it doesn't crash anymore.

The header says:

typedef struct _NV_COMPUTE_GPU_TOPOLOGY_V2
{
    NvU32 version;                 //!< Structure version
    NvU32 gpuCount;                //!< Size of array
    NV_COMPUTE_GPU *computeGpus;   //!< Array of compute-capable physical GPUs (allocate memory of size of Physical gpuCount of system).

} NV_COMPUTE_GPU_TOPOLOGY_V2;

I would interpret it that this has to be done on the consumer side, but here we are...

@gabriele2000
Copy link

With wine 7.20 the game crashes while opening.
With wine 8.9 the game deadlocks (fatally) a second after loading the level.

@jp7677 jp7677 force-pushed the apex-crash branch 5 times, most recently from df3f455 to 32b8f79 Compare June 6, 2023 18:52
@jp7677 jp7677 changed the title WIP Prevent CudaEnumComputeCapableGpus V2 crash Jun 6, 2023
@jp7677 jp7677 requested a review from Saancreed June 6, 2023 19:01
@jp7677 jp7677 marked this pull request as ready for review June 6, 2023 19:10
src/nvapi_gpu.cpp Outdated Show resolved Hide resolved
This matches Windows behavior and prevents
usage of uninitialized computeGpus pointer.
@jp7677 jp7677 linked an issue Jun 6, 2023 that may be closed by this pull request
@jp7677 jp7677 merged commit cb61c3f into master Jun 6, 2023
@jp7677 jp7677 deleted the apex-crash branch June 11, 2023 17:36
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

Successfully merging this pull request may close these issues.

Call of Duty: Ghosts - Crash if I don't delete "APEX" folder
3 participants