Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- cd /tmp
- # Yosys
- sudo apt install -y build-essential clang bison flex \
- libreadline-dev gawk tcl-dev libffi-dev git \
- graphviz xdot pkg-config python3 libboost-system-dev \
- libboost-python-dev libboost-filesystem-dev
- git clone https://github.com/YosysHQ/yosys.git
- cd yosys
- make config-gcc
- make -j4
- sudo make install
- cd ..
- # IceStorm
- sudo apt install -y build-essential clang bison flex libreadline-dev \
- gawk tcl-dev libffi-dev git mercurial graphviz \
- xdot pkg-config python python3 libftdi-dev \
- qt5-default python3-dev libboost-all-dev cmake
- git clone https://github.com/cliffordwolf/icestorm.git icestorm
- cd icestorm
- make -j4
- sudo make install
- cd ..
- # NextPNR
- sudo apt install qt5-default libboost-dev libboost-filesystem-dev \
- libboost-thread-dev libboost-program-options-dev \
- libboost-python-dev libeigen3-dev
- git clone https://github.com/YosysHQ/nextpnr.git
- cd nextpnr
- # We need to hack out references to OpenGL 3.2
- git apply <<EOF
- diff --git a/3rdparty/qtimgui/ImGuiRenderer.cpp b/3rdparty/qtimgui/ImGuiRenderer.cpp
- index e77b47d..625ae7f 100644
- --- a/3rdparty/qtimgui/ImGuiRenderer.cpp
- +++ b/3rdparty/qtimgui/ImGuiRenderer.cpp
- @@ -39,8 +39,8 @@ QByteArray g_currentClipboardText;
- void ImGuiRenderer::initialize(WindowWrapper *window) {
- m_window.reset(window);
- initializeOpenGLFunctions();
- - g_fun = new QOpenGLFunctions_3_2_Core();
- - g_fun->initializeOpenGLFunctions();
- +// g_fun = new QOpenGLFunctions_3_2_Core();
- +// g_fun->initializeOpenGLFunctions();
- ImGui::CreateContext();
- @@ -117,7 +117,7 @@ void ImGuiRenderer::renderDrawList(ImDrawData *draw_data)
- glUseProgram(g_ShaderHandle);
- glUniform1i(g_AttribLocationTex, 0);
- glUniformMatrix4fv(g_AttribLocationProjMtx, 1, GL_FALSE, &ortho_projection[0][0]);
- - g_fun->glBindVertexArray(g_VaoHandle);
- + //g_fun->glBindVertexArray(g_VaoHandle);
- for (int n = 0; n < draw_data->CmdListsCount; n++)
- {
- @@ -151,7 +151,7 @@ void ImGuiRenderer::renderDrawList(ImDrawData *draw_data)
- glUseProgram(last_program);
- glBindTexture(GL_TEXTURE_2D, last_texture);
- glActiveTexture(last_active_texture);
- - g_fun->glBindVertexArray(last_vertex_array);
- + //g_fun->glBindVertexArray(last_vertex_array);
- glBindBuffer(GL_ARRAY_BUFFER, last_array_buffer);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, last_element_array_buffer);
- glBlendEquationSeparate(last_blend_equation_rgb, last_blend_equation_alpha);
- @@ -244,8 +244,8 @@ bool ImGuiRenderer::createDeviceObjects()
- glGenBuffers(1, &g_VboHandle);
- glGenBuffers(1, &g_ElementsHandle);
- - g_fun->glGenVertexArrays(1, &g_VaoHandle);
- - g_fun->glBindVertexArray(g_VaoHandle);
- + //g_fun->glGenVertexArrays(1, &g_VaoHandle);
- + //g_fun->glBindVertexArray(g_VaoHandle);
- glBindBuffer(GL_ARRAY_BUFFER, g_VboHandle);
- glEnableVertexAttribArray(g_AttribLocationPosition);
- glEnableVertexAttribArray(g_AttribLocationUV);
- @@ -262,7 +262,7 @@ bool ImGuiRenderer::createDeviceObjects()
- // Restore modified GL state
- glBindTexture(GL_TEXTURE_2D, last_texture);
- glBindBuffer(GL_ARRAY_BUFFER, last_array_buffer);
- - g_fun->glBindVertexArray(last_vertex_array);
- + //g_fun->glBindVertexArray(last_vertex_array);
- return true;
- }
- diff --git a/3rdparty/qtimgui/ImGuiRenderer.h b/3rdparty/qtimgui/ImGuiRenderer.h
- index 8962c07..9147991 100644
- --- a/3rdparty/qtimgui/ImGuiRenderer.h
- +++ b/3rdparty/qtimgui/ImGuiRenderer.h
- @@ -54,7 +54,7 @@ private:
- int g_AttribLocationTex = 0, g_AttribLocationProjMtx = 0;
- int g_AttribLocationPosition = 0, g_AttribLocationUV = 0, g_AttribLocationColor = 0;
- unsigned int g_VboHandle = 0, g_VaoHandle = 0, g_ElementsHandle = 0;
- - QOpenGLFunctions_3_2_Core *g_fun = nullptr;
- +// QOpenGLFunctions_3_2_Core *g_fun = nullptr;
- };
- }
- EOF
- cmake -DARCH=ice40 .
- make -j4
- sudo make install
- cd ..
- # Build an example design :)
- git clone https://github.com/Wren6991/RISCBoy.git riscboy
- cd riscboy
- source sourceme
- cd synth
- make -f HX8k-EVN.mk bit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement