Skip to content

Commit

Permalink
feat(infra): record the shader revision in DB
Browse files Browse the repository at this point in the history
  • Loading branch information
rayanht committed May 2, 2022
1 parent 5ceedfc commit b0df8c5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions amber_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def insert_BQ_entry(
INSERT INTO `spirvsmith.spirv.shader_data`
VALUES (
{shader_id},
{original_entry.shader_rev},
{original_entry.generator_id},
{original_entry.generator_version},
{original_entry.n_buffers},
Expand Down
6 changes: 6 additions & 0 deletions infra/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ resource "google_bigquery_table" "spirv_shader_data_table" {
"mode": "REQUIRED",
"description": "Shader identifier. Not a primary key."
},
{
"name": "shader_rev",
"type": "INT64",
"mode": "REQUIRED",
"description": "Shader revision. A shader can have different revisions due to the reduce & recondition process."
}
{
"name": "generator_id",
"type": "STRING",
Expand Down
1 change: 1 addition & 0 deletions src/fuzzing_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ def broadcast_shader_data(generator_id: ULID, shader: SPIRVShader, monitor: Moni
INSERT INTO `spirvsmith.spirv.shader_data`
VALUES (
{shader.id},
1,
{generator_id},
{shader.context.config.misc.version},
{len(shader.context.get_storage_buffers())},
Expand Down

0 comments on commit b0df8c5

Please sign in to comment.