DX12: hyperspace, r_clear, minor renames.
This commit is contained in:
parent
12da3b4d44
commit
40af5ae62b
|
|
@ -68,7 +68,7 @@ void GL_Bind( image_t *image ) {
|
|||
VkDescriptorSet set = vk_world.images[final_image->index].descriptor_set;
|
||||
vk_world.current_descriptor_sets[glState.currenttmu] = set;
|
||||
}
|
||||
// D3D
|
||||
// DX12
|
||||
if (dx.active) {
|
||||
dx_world.current_image_indices[glState.currenttmu] = final_image->index;
|
||||
}
|
||||
|
|
@ -387,6 +387,9 @@ static void RB_Hyperspace( void ) {
|
|||
float color[4] = { c, c, c, 1 };
|
||||
vk_clear_attachments(false, true, color);
|
||||
|
||||
// DX12
|
||||
dx_clear_attachments(false, true, color);
|
||||
|
||||
backEnd.isHyperspace = qtrue;
|
||||
}
|
||||
|
||||
|
|
@ -726,7 +729,7 @@ void RE_UploadCinematic (int w, int h, int cols, int rows, const byte *data, int
|
|||
image = vk_create_image(cols, rows, VK_FORMAT_R8G8B8A8_UNORM, 1, false);
|
||||
vk_upload_image_data(image.handle, cols, rows, false, data, 4);
|
||||
}
|
||||
// D3D
|
||||
// DX12
|
||||
if (dx.active) {
|
||||
int image_index = tr.scratchImage[client]->index;
|
||||
Dx_Image& image = dx_world.images[image_index];
|
||||
|
|
@ -745,7 +748,7 @@ void RE_UploadCinematic (int w, int h, int cols, int rows, const byte *data, int
|
|||
const Vk_Image& image = vk_world.images[tr.scratchImage[client]->index];
|
||||
vk_upload_image_data(image.handle, cols, rows, 1, data, 4);
|
||||
}
|
||||
// D3D
|
||||
// DX12
|
||||
if (dx.active) {
|
||||
const Dx_Image& image = dx_world.images[tr.scratchImage[client]->index];
|
||||
dx_upload_image_data(image.texture, cols, rows, 1, data, 4);
|
||||
|
|
@ -890,6 +893,8 @@ const void *RB_DrawBuffer( const void *data ) {
|
|||
|
||||
// VULKAN
|
||||
vk_begin_frame();
|
||||
|
||||
// DX12
|
||||
dx_begin_frame();
|
||||
|
||||
// clear screen for debugging
|
||||
|
|
@ -901,6 +906,9 @@ const void *RB_DrawBuffer( const void *data ) {
|
|||
RB_SetGL2D(); // to ensure we have viewport that occupies entire window
|
||||
float color[4] = {1, 0, 0.5, 1};
|
||||
vk_clear_attachments(false, true, color);
|
||||
|
||||
// DX12
|
||||
dx_clear_attachments(false, true, color);
|
||||
}
|
||||
|
||||
return (const void *)(cmd + 1);
|
||||
|
|
@ -1068,6 +1076,8 @@ const void *RB_SwapBuffers( const void *data ) {
|
|||
|
||||
// VULKAN
|
||||
vk_end_frame();
|
||||
|
||||
// DX12
|
||||
dx_end_frame();
|
||||
|
||||
return (const void *)(cmd + 1);
|
||||
|
|
|
|||
|
|
@ -857,7 +857,7 @@ image_t *R_CreateImage( const char *name, const byte *pic, int width, int height
|
|||
if (vk.active) {
|
||||
vk_world.images[image->index] = upload_vk_image(upload_data, glWrapClampMode == GL_REPEAT);
|
||||
}
|
||||
// D3D
|
||||
// DX12
|
||||
if (dx.active) {
|
||||
dx_world.images[image->index] = upload_dx_image(upload_data, glWrapClampMode == GL_REPEAT, image->index);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@ static void InitRenderAPI( void )
|
|||
}
|
||||
|
||||
// VULKAN
|
||||
// DX12
|
||||
if (r_renderAPI->integer != 0 || r_twinMode->integer) {
|
||||
vk_imp_init();
|
||||
vk_initialize();
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
// VULKAN
|
||||
#include "vk.h"
|
||||
|
||||
// D3D
|
||||
// DX12
|
||||
#include "dx.h"
|
||||
|
||||
#define GL_INDEX_TYPE GL_UNSIGNED_INT
|
||||
|
|
@ -326,7 +326,7 @@ typedef struct {
|
|||
VkPipeline vk_portal_pipeline = VK_NULL_HANDLE;
|
||||
VkPipeline vk_mirror_pipeline = VK_NULL_HANDLE;
|
||||
|
||||
// D3D
|
||||
// DX12
|
||||
ID3D12PipelineState* dx_pipeline_state = nullptr;
|
||||
ID3D12PipelineState* dx_portal_pipeline_state = nullptr;
|
||||
ID3D12PipelineState* dx_mirror_pipeline_state = nullptr;
|
||||
|
|
@ -941,7 +941,7 @@ extern glstate_t glState; // outside of TR since it shouldn't be cleared during
|
|||
extern Vk_Instance vk; // shouldn't be cleared during ref re-init
|
||||
extern Vk_World vk_world; // this data is cleared during ref re-init
|
||||
|
||||
// D3D
|
||||
// DX12
|
||||
extern Dx_Instance dx; // shouldn't be cleared during ref re-init
|
||||
extern Dx_World dx_world; // this data is cleared during ref re-init
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user