-
Notifications
You must be signed in to change notification settings - Fork 26
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
GROK-16923: implement web gpu colors support #3115
GROK-16923: implement web gpu colors support #3115
Conversation
…ching and points rendering
…lamarchuk/GROK-16923-Implement-WebGPU-colors-and-shapes-support
import {awaitCheck, category, expect, expectArray, test, testEvent} from '@datagrok-libraries/utils/src/test'; | ||
import { _scWebGPURender } from '../package'; | ||
|
||
export const _package = new DG.Package(); |
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.
nitpicking but please remove these :D
import $ from 'cash-dom'; | ||
|
||
import {awaitCheck, category, expect, expectArray, test, testEvent} from '@datagrok-libraries/utils/src/test'; | ||
import { _scWebGPURender, _scWebGPUPointHitTest } from '../package'; |
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.
generally, this is a recipe for cyclic dependency errors :D
instead of these, use the native grok func calls and remove imports from package:
const renderFunc = DG.Func.Find({tags: ['webGPURenderTag']})[0]
const hitTestFunc = DG.Func.Find({tags: ['webGPUHitTestTag']})[0]
and then use the arguments in structured way (yes the typing is lost, but build will be smaller and you will avoid any cyclic dependencies)
await renderFunc.apply({sc: sc, show: true})
}); | ||
} | ||
} | ||
} |
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.
colorBuffer: GPUBuffer | null = null; | ||
colorColumnName = ''; | ||
colorLength = -1; | ||
colorAxisType: keyof typeof DG.AxisType = DG.AxisType.logarithmic; |
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.
do I get this right that you initialize it to log because you expect a missmatch when linear comes by default?
…lamarchuk/GROK-16923-Implement-WebGPU-colors-and-shapes-support
…pes-support' of ssh://github.com/datagrok-ai/public into opalamarchuk/GROK-16923-Implement-WebGPU-colors-and-shapes-support
Added coloring for textures and dot types for scatterplot.
Implemented color caching and cache invalidation checks.
Introduced benchmarks for gpuRendering and gpuHitTest (see screenshot results on my PC with integrated AMD Radeon GPU on AMD Ryzen 7 7730U CPU)