Skip to content

Commit

Permalink
[WebGPU] Make compute things compile again
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Jan 17, 2024
1 parent 1bce5ad commit b2e3c89
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 56 deletions.
43 changes: 0 additions & 43 deletions Backends/Graphics5/WebGPU/Sources/kinc/backend/compute.cpp

This file was deleted.

13 changes: 0 additions & 13 deletions Backends/Graphics5/WebGPU/Sources/kinc/backend/compute.h

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <string.h>
#include <kinc/graphics5/commandlist.h>
#include <kinc/graphics5/compute.h>
#include <kinc/graphics5/indexbuffer.h>
#include <kinc/graphics5/pipeline.h>
#include <kinc/graphics5/vertexbuffer.h>
Expand Down Expand Up @@ -124,6 +125,9 @@ void kinc_g5_command_list_set_fragment_constant_buffer(kinc_g5_command_list_t *l

}

void kinc_g5_command_list_set_compute_constant_buffer(kinc_g5_command_list_t *list, struct kinc_g5_constant_buffer *buffer, int offset, size_t size) {

}

void kinc_g5_command_list_set_render_target_face(kinc_g5_command_list_t *list, kinc_g5_render_target_t *texture, int face) {}

Expand Down Expand Up @@ -152,3 +156,7 @@ void kinc_g5_command_list_get_query_result(kinc_g5_command_list_t *list, unsigne
void kinc_g5_command_list_set_texture_from_render_target(kinc_g5_command_list_t *list, kinc_g5_texture_unit_t unit, kinc_g5_render_target_t *renderTarget) {}

void kinc_g5_command_list_set_texture_from_render_target_depth(kinc_g5_command_list_t *list, kinc_g5_texture_unit_t unit, kinc_g5_render_target_t *renderTarget) {}

void kinc_g5_command_list_set_compute_shader(kinc_g5_command_list_t *list, kinc_g5_compute_shader *shader) {}

void kinc_g5_command_list_compute(kinc_g5_command_list_t *list, int x, int y, int z) {}
16 changes: 16 additions & 0 deletions Backends/Graphics5/WebGPU/Sources/kinc/backend/graphics5/compute.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <kinc/graphics5/compute.h>
#include <kinc/math/core.h>

void kinc_g5_compute_shader_init(kinc_g5_compute_shader *shader, void *source, int length) {}

void kinc_g5_compute_shader_destroy(kinc_g5_compute_shader *shader) {}

kinc_g5_constant_location_t kinc_g5_compute_shader_get_constant_location(kinc_g5_compute_shader *shader, const char *name) {
kinc_g5_constant_location_t location = {0};
return location;
}

kinc_g5_texture_unit_t kinc_g5_compute_shader_get_texture_unit(kinc_g5_compute_shader *shader, const char *name) {
kinc_g5_texture_unit_t unit = {0};
return unit;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#pragma once

typedef struct kinc_g5_compute_shader_impl {
int nothing;
} kinc_g5_compute_shader_impl;
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ typedef struct {
typedef struct {
int vertexOffset;
int fragmentOffset;
int computeOffset;
} ConstantLocation5Impl;

#ifdef __cplusplus
Expand Down

0 comments on commit b2e3c89

Please sign in to comment.