[gtk+/wip/otte/shader: 169/226] gskspv: Implement writing constructor functions
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/shader: 169/226] gskspv: Implement writing constructor functions
- Date: Mon, 30 Oct 2017 02:14:44 +0000 (UTC)
commit d6c2c00a0aa54360bbbf8bc98e915886658de0d8
Author: Benjamin Otte <otte redhat com>
Date: Wed Oct 11 16:55:38 2017 +0200
gskspv: Implement writing constructor functions
Calling a constructor is a simple OpConstantComposite call. Who'd have
thought.
gsk/gskslfunction.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gsk/gskslfunction.c b/gsk/gskslfunction.c
index a94b7e6..122e810 100644
--- a/gsk/gskslfunction.c
+++ b/gsk/gskslfunction.c
@@ -162,9 +162,12 @@ gsk_sl_function_constructor_write_call_spv (GskSlFunction *function,
GskSpvWriter *writer,
guint32 *arguments)
{
- g_assert_not_reached ();
+ const GskSlFunctionConstructor *constructor = (const GskSlFunctionConstructor *) function;
- return 0;
+ return gsk_spv_writer_composite_construct (writer,
+ constructor->type,
+ arguments,
+ gsk_sl_type_get_n_members (constructor->type));
}
static const GskSlFunctionClass GSK_SL_FUNCTION_CONSTRUCTOR = {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]