Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8982751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:39:30+00:00 2026-06-15T20:39:30+00:00

Two part question: I’m working on a school project using the game of life

  • 0

Two part question:

I’m working on a school project using the game of life as a vehicle to experiment with gpgpu. I’m using OpenCL and OpenGL for realtime visualizations and the goal is to get this thing as big and fast as possible. Upon profiling I find that the frame time is dominated by CL Acquiring and Releasing the GL buffers, and that the time cost is directly proportional to the actual size of the buffer.

1) Is this normal? Why should this be? To the best of my understanding, the buffer never leaves device memory, and the CL Acquire/Release acts like a mutex. Does OpenCL lock/unlock each byte individually or something?

To get around this I’ve shrunk from 24-bit RGBA color mode (OpenGL’s preferred color mode as I understand it?) to 8-bit RGB color. This has resulted in a major speedup, but after tuning my kernel, the transfer times are dominating again.

In the absence of any ideas on how to eliminate the transfer times entirely (short of porting my kernel from OpenCL to GLSL, which would exceed the original scope of the project), I now figure that my best bet is to write to a bitmap (as opposed to the 8-bit pixmap I’m currently using) and then use that bitmap with a color index to texture a quad.

2) Can I texture a quad directly using a bitmap? I have considered using glBitmap to draw to an auxiliary buffer, and then using this buffer to texture my quad, but I would prefer to use a more direct route if one is available.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:39:31+00:00Added an answer on June 15, 2026 at 8:39 pm

    The design intent behind the CL/GL interop acquire and release calls was for them to be simply ownership transfers. However, in many early implementations these were doing copies of the images from CL to GL and back.

    Unless you use the sync object extensions in OpenCL 1.1, you need to clFinish before you release and glFinish before you acquire; you will see a lot of time spent here because all queued work will have to finish before these calls continue. Some platforms you can use clFlush instead of clFinish; check the OpenCL documentation from your vendor.

    With the latest NVIDIA and AMD drivers on more or less recent hardware, I’m seeing the acquire and release calls going pretty quickly for HD video sized images.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a two-part question. I'm using jQuery for a project and wanting to
This is a two part question: I am working on a big project where
So this is really a two-part question: why isn't it working, and should I
Two-part question: I am using acts_as_taggable_on, and I want to generate an array of
Two Part Question: What kind of actions does SQL Server process in RAM? Of
Two part question... I've read in other posts that Apple's personal version of Java
So two part question here. Basically, what is the proper practise for javascript function
This is two part question: I have two stored procedures: sp1 & sp2. If
This is really a two part question: I'm seeing some users in the Grantee
This is a two part question. Is it possible to take advantage of xVal

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.