[gtk+/wip/otte/shader: 126/176] gskspv: Implement writing constructor functions
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/shader: 126/176] gskspv: Implement writing constructor functions
- Date: Wed, 25 Oct 2017 03:27:19 +0000 (UTC)
commit cf174a124013ef6ade3782eb52169558be309e1f
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]