Skip to content

Conversation

@MarijnS95
Copy link
Collaborator

@MarijnS95 MarijnS95 commented Sep 21, 2025

Depends on #267
Fixes #265

Without this shaders with cooperative matrix types fail to parse.

Note that separately I copied my own coopmat example together with a function call that is compiled with glslang test.comp -G -o spirv-blobs/cooperative-matrix.spv:

#version 450
#extension GL_KHR_cooperative_matrix : require

coopmat<float, gl_ScopeSubgroup, 16, 8, gl_MatrixUseAccumulator> m;

float f(float x) {
    return x + 2;
}

void main() {
    for (int i = 0; i < m.length(); ++i) {
        m[i] = f(m[i]);
    }
}

This results in a failure when lifting to the structured representation (part of the spirv-blobs parsing test) because lift_op() doesn't handle OpFunctionCall to call f, so I've hacked something in here to start handling that separately via lift_function_call() but not decided how to represent that further. Perhaps fold into enum sr::ops::Op after all?

@kvark
Copy link
Member

kvark commented Sep 23, 2025

@MarijnS95 could you make clippy happy?

@MarijnS95
Copy link
Collaborator Author

@kvark I pushed those fixes in via #262, which we should perhaps merge too.

MarijnS95 and others added 2 commits September 23, 2025 11:14
We fixed a new trigger for `clippy::match_overlapping_arm` in commit
aa260e0 instead, which seemed to supersede this lint error.
Without this shaders with cooperative matrix types fail to parse.
@MarijnS95 MarijnS95 merged commit 89ce4d0 into gfx-rs:master Sep 24, 2025
9 checks passed
@MarijnS95 MarijnS95 deleted the cooperative-matrix branch September 24, 2025 08:12
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.

Cooperative Matrix support

2 participants