mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 08:25:34 +00:00
gpu,gpu/internal: move InputDesc back from gioui.org/shader module
It was moved to gioui.org/shader by mistake. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -274,7 +274,7 @@ func (b *Backend) NewFramebuffer(tex driver.Texture) (driver.Framebuffer, error)
|
||||
return fbo, nil
|
||||
}
|
||||
|
||||
func (b *Backend) newInputLayout(vertexShader shader.Sources, layout []shader.InputDesc) (*d3d11.InputLayout, error) {
|
||||
func (b *Backend) newInputLayout(vertexShader shader.Sources, layout []driver.InputDesc) (*d3d11.InputLayout, error) {
|
||||
if len(vertexShader.Inputs) != len(layout) {
|
||||
return nil, fmt.Errorf("NewInputLayout: got %d inputs, expected %d", len(layout), len(vertexShader.Inputs))
|
||||
}
|
||||
|
||||
@@ -60,11 +60,19 @@ type Pipeline interface {
|
||||
type PipelineDesc struct {
|
||||
VertexShader VertexShader
|
||||
FragmentShader FragmentShader
|
||||
VertexLayout []shader.InputDesc
|
||||
VertexLayout []InputDesc
|
||||
BlendDesc BlendDesc
|
||||
PixelFormat TextureFormat
|
||||
}
|
||||
|
||||
// InputDesc describes a vertex attribute as laid out in a Buffer.
|
||||
type InputDesc struct {
|
||||
Type shader.DataType
|
||||
Size int
|
||||
|
||||
Offset int
|
||||
}
|
||||
|
||||
type BlendDesc struct {
|
||||
Enable bool
|
||||
SrcFactor, DstFactor BlendFactor
|
||||
|
||||
@@ -115,7 +115,7 @@ type framebuffer struct {
|
||||
type pipeline struct {
|
||||
prog *program
|
||||
inputs []shader.InputLocation
|
||||
layout []shader.InputDesc
|
||||
layout []driver.InputDesc
|
||||
blend driver.BlendDesc
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ type uniformLocation struct {
|
||||
|
||||
type inputLayout struct {
|
||||
inputs []shader.InputLocation
|
||||
layout []shader.InputDesc
|
||||
layout []driver.InputDesc
|
||||
}
|
||||
|
||||
// textureTriple holds the type settings for
|
||||
|
||||
Reference in New Issue
Block a user