-
Notifications
You must be signed in to change notification settings - Fork 93
RemixApi: add AddTextureHash and RemoveTextureHash methods #90
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| /* | ||
| * Copyright (c) 2023-2024, NVIDIA CORPORATION. All rights reserved. | ||
| * Copyright (c) 2023-2025, NVIDIA CORPORATION. All rights reserved. | ||
| * | ||
| * Permission is hereby granted, free of charge, to any person obtaining a | ||
| * copy of this software and associated documentation files (the "Software"), | ||
|
|
@@ -53,7 +53,7 @@ | |
| #define REMIXAPI_VERSION_GET_PATCH(version) (((uint64_t)(version) ) & (uint64_t)0xFFFF) | ||
|
|
||
| #define REMIXAPI_VERSION_MAJOR 0 | ||
| #define REMIXAPI_VERSION_MINOR 5 | ||
| #define REMIXAPI_VERSION_MINOR 6 | ||
| #define REMIXAPI_VERSION_PATCH 1 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. patch version should be reset, since you bumped the minor version. (0.5.1 becomes 0.6.0, not 0.6.1) |
||
|
|
||
|
|
||
|
|
@@ -400,20 +400,20 @@ extern "C" { | |
| REMIXAPI_INSTANCE_CATEGORY_BIT_IGNORE_ANTI_CULLING = 1 << 5, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_IGNORE_MOTION_BLUR = 1 << 6, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_IGNORE_OPACITY_MICROMAP = 1 << 7, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_HIDDEN = 1 << 8, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_PARTICLE = 1 << 9, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_BEAM = 1 << 10, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_DECAL_STATIC = 1 << 11, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_DECAL_DYNAMIC = 1 << 12, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_DECAL_SINGLE_OFFSET = 1 << 13, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_DECAL_NO_OFFSET = 1 << 14, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_ALPHA_BLEND_TO_CUTOUT = 1 << 15, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_TERRAIN = 1 << 16, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_ANIMATED_WATER = 1 << 17, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_THIRD_PERSON_PLAYER_MODEL = 1 << 18, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_THIRD_PERSON_PLAYER_BODY = 1 << 19, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_IGNORE_BAKED_LIGHTING = 1 << 20, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_IGNORE_ALPHA_CHANNEL = 1 << 21, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_IGNORE_ALPHA_CHANNEL = 1 << 8, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changing the order like this will break any existing uses. I know it's just making it match the order of InstanceCategories in the runtime, but making the code slightly nicer isn't a good reason to introduce a breaking change to the API. |
||
| REMIXAPI_INSTANCE_CATEGORY_BIT_HIDDEN = 1 << 9, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_PARTICLE = 1 << 10, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_BEAM = 1 << 11, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_DECAL_STATIC = 1 << 12, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_DECAL_DYNAMIC = 1 << 13, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_DECAL_SINGLE_OFFSET = 1 << 14, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_DECAL_NO_OFFSET = 1 << 15, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_ALPHA_BLEND_TO_CUTOUT = 1 << 16, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_TERRAIN = 1 << 17, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_ANIMATED_WATER = 1 << 18, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_THIRD_PERSON_PLAYER_MODEL = 1 << 19, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_THIRD_PERSON_PLAYER_BODY = 1 << 20, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_IGNORE_BAKED_LIGHTING = 1 << 21, | ||
| REMIXAPI_INSTANCE_CATEGORY_BIT_IGNORE_TRANSPARENCY_LAYER = 1 << 22, | ||
| } remixapi_InstanceCategoryBit; | ||
|
|
||
|
|
@@ -562,6 +562,14 @@ extern "C" { | |
| const char* key, | ||
| const char* value); | ||
|
|
||
| typedef remixapi_ErrorCode(REMIXAPI_PTR* PFN_remixapi_AddTextureHash)( | ||
| const char* textureCategory, | ||
| const char* textureHash); | ||
|
|
||
| typedef remixapi_ErrorCode(REMIXAPI_PTR* PFN_remixapi_RemoveTextureHash)( | ||
| const char* textureCategory, | ||
| const char* textureHash); | ||
|
|
||
| typedef struct remixapi_PresentInfo { | ||
| remixapi_StructType sType; | ||
| void* pNext; | ||
|
|
@@ -642,6 +650,8 @@ extern "C" { | |
| PFN_remixapi_DestroyLight DestroyLight; | ||
| PFN_remixapi_DrawLightInstance DrawLightInstance; | ||
| PFN_remixapi_SetConfigVariable SetConfigVariable; | ||
| PFN_remixapi_AddTextureHash AddTextureHash; | ||
| PFN_remixapi_RemoveTextureHash RemoveTextureHash; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New functions need to be declared at the end of the struct to preserve backwards compatibility |
||
|
|
||
| // DXVK interoperability | ||
| PFN_remixapi_dxvk_CreateD3D9 dxvk_CreateD3D9; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The arguments we used for
SetConfigVariableare actually something we regret, and we'd like to avoid repeating the same mistake. Primarily, in that it would be a breaking change to add any more arguments.Instead of
AddTextureHashandRemoveTextureHash, we'd prefer to see aModifyRtxOptionfunction that takes in a struct. That struct can be extended without breaking backwards compatibility, and could have fields for adding & removing values from a HashSet.May also be a good idea to define a
REMIXAPI_EMPTY_HASHthat's set to 0 somewhere in the API, instead of just having 0 as a magic value in that comment.There may be a better way to encode newValue that would support actual int/float/etc values, but